JulianLenz
JulianLenz

Reputation: 307

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. 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.

Upvotes: 0

Views: 58

Answers (1)

Related Questions