How To: Limit geocoding results to a specific area


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

  1. Log in to ArcGIS Online using an ArcGIS Online organizational account.
  2. Navigate to Content. Click Create > Locator (view).
  3. Configure the Locator View by setting the location depending on the type of location to search. Click Save.
  4. Navigate to Organization. Click Edit settings.
  5. Go to Utility Services, and add the locator in the Geocoding section. Click Save.
  6. In the map viewer, click the down arrow in the search bar and select the locator to begin searching. For more information, refer to: Customize your Geocoding experience with Locator Views

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.

             "autoComplete": true, 
             "minCharacters": 3, 
             "name": "Esri World Geocoder", 
	     "maxLocations": 3,
             "arcgisGeocoder": false, 
                          "url": "https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer", 
                          "name": "Esri World Geocoder", 
                          "singleLineFieldName": "SingleLine", 
                          "placeholder": "Find address or place", 
                          "suffix": "New York",

 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}  

Related Information

Last Published: 1/9/2019

Article ID: 000019446