[英]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 是什么。
See my response to your question on Esri Community: https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/mp/1200868/highlight/true#M7422请参阅我对 Esri 社区问题的回复: https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/arcgis-locator-task-vs-rest-call-has-different/ mp/1200868/highlight/true#M7422
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.