HOW TO
In some cases, it is necessary to limit the geocoding results to a certain area. For example, an international company with franchises all over the world, and an analyst only requires data for the franchises located in the United Kingdom (UK).
The instructions provided describe how to limit the result of geocoding to a specific area:
Use Locator View in ArcGIS Online
Configure the JSON file of the custom widget in Web AppBuilder for ArcGIS
It is possible to configure the JSON file to narrow down the geocoding results by editing the suffix parameter. For example, set the suffix parameter to New York and sourceCountry to US to limit the search within New York, US, as shown in the following JSON.
{ "geocoder":{ "autoComplete": true, "minCharacters": 3, "name": "Esri World Geocoder", "maxLocations": 3, "arcgisGeocoder": false, "geocoders":[ { "url": "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer", "name": "Esri World Geocoder", "singleLineFieldName": "SingleLine", "placeholder": "Find address or place", "suffix": "New York", "sourceCountry":"US" } ] } }
The searchExtent parameter can also be added to limit the search within a specific extent. For more information, refer to: Class: Geocoder.
"searchExtent": { "xmin":-10105000, "ymin":2855000, "xmax":-8226000, "ymax":3649000, "spatialReference": {"wkid":102100} }
Article ID: 000019446
Get help from ArcGIS experts
Download the Esri Support App