Select to view content in your preferred language

AGSLocatorTask and AGSGeocodeParameters.maxResults

680
1
05-30-2017 12:20 PM
NikolayYekimov1
Deactivated User

I am using a AGSLocatorTask to geocode places that match a search term. AGSGeocodeParameters has a maxResults parameter. It stays for "The maximum number of results desired". v10.2.5 had a comment that the search engine limits it to max 20 or so, but in reality the max number returned was and is currently 50. I want the locator to return more results. Is there a way to achieve my goal?

0 Kudos
1 Reply
MarkDostal
Esri Regular Contributor

Thank you for your question!  The Runtime SDK limits research for "POI" (points of interest) search to 50.  For addresses, the limit is 20.  You cannot get more results than those.  However, there is one property in `AGSGeocodeParameters` that might help you ensure the returned results are relevant:

`searchArea` - The search area used to spatially filter the geocoded results. Only results that lie within this area are included.

I will push to get the documentation updated for the next release.

Thank you again,

Mark