AGSLocatorTask and AGSGeocodeParameters.maxResults

590
1
05-30-2017 12:20 PM
NikolayYekimov1
New Contributor III

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