I am using the android and iOS sdks to perform a geocode request to the server. When I am calling the same endpoint using REST I get different results back.
In my case the REST call has way more results.
iOS code:
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:
https://my-server/services/GeocodeServer/suggest?f=json&text=SomeStreet
It would be nice to know what request url the iOS lib generates.
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/m-p/1200868/highlight/true#M7422