简体   繁体   English

ArcGis 定位器任务与 REST 调用有不同的结果

[英]ArcGis locator task vs REST call has different results

I am using the android and iOS sdks to perform a geocode request to the server.我正在使用 android 和 iOS sdks 对服务器执行地理编码请求。 When I am calling the same endpoint using REST I get different results back.当我使用 REST 调用相同的端点时,我得到了不同的结果。

In my case the REST call has way more results.在我的情况下,REST 调用有更多的结果。

iOS code: iOS 代码:

        let locatorTask = AGSLocatorTask(url: URL(string: "https://my-server/services/GeocodeServer/")!)
        
        let params = AGSGeocodeParameters()
        params.maxResults = payload.maxSuggestions
        params.countryCode = "DE"
        params.outputSpatialReference = .wgs84()
        params.resultAttributeNames = ["*"]

        locatorTask.geocode(withSearchText: payload.searchQuery, parameters: params) {
          // handle result
        }

REST call: REST 致电:

https://my-server/services/GeocodeServer/suggest?f=json&text=SomeStreet

It would be nice to know what request url the iOS lib generates.很高兴知道 iOS 库生成的请求 url 是什么。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM