Skip To Content

Search widget

The Search widget enables end users to find locations or search features on the map. By default, the widget uses the geocoding service from your organization or portal and displays searchable layers configured in the map, if available. See Configure feature search for more information. Further, you can add more geocoding services or configure specific layers within your map to be searchable using the widget's configuration window.

The following methods of finding a location are supported, given that they are supported in the geocoding services:

  • Place-name
  • Point of interest
  • Address

The following layers are searchable with Query capability enabled:

  • Hosted feature layers
  • ArcGIS for Server feature service layers
  • ArcGIS for Server map service layers

Configuring the Search widget

The widget configuration window allows you to specify the geocoding services and searchable layers you want the widget to work with.

  1. Hover over the Search widget and click the small eye icon Show or hide to show or hide this widget in your application.
  2. Hover over the widget and click the small edit icon Edit. The configuration window for this widget opens.
  3. By default, the widget uses the geocoding service from your organization or portal and displays searchable layers configured in the map, if available. All the existing search sources are listed on the table. You can add new search sources or modify the existing ones. You'll add new search sources first.
  4. Click Add Search Source. There are two options: Geocoder and Feature Layer.
    • Choose Feature Layer.
    1. Click a radio button to choose a layer and click OK to close the window.
    2. The new layer source is automatically listed on the table. You can change the searchable layer name in the Name text box.
    3. Optionally type the text in the Placeholder Text text box.
    4. Click the pencil icon to add search fields. This opens the Set Search Fields window. Choose one or multiple fields. Numerical fields and string fields, including coded domains, are searchable. Click OK to close the window. You should see all the selected fields listed in the Search Fields text box.
    5. Click the drop-down list to choose the display field in the search suggestion.
    6. By default, 6 is the maximum suggestions returned for a searchable layer. Change it if necessary.
    7. By default, 6 is the maximum results returned for a searchable layer. Change it if necessary.
    8. Be default, zoom scale is defined as 1:50,000. Change it if necessary.
    9. Optionally check the Exact Match box if needed.
    10. Optionally check the Only search in current map extent box if needed.
    • Choose Geocoder.
    1. The new Geocoder source is automatically listed on the table.
    2. Click the Set button to open the Set Geocoder URL window.
    3. Provide a valid URL for the geocoding service you want to use, click Validate to load the service, choose the service, and click OK.

      The geocoder URL is automatically added in the Geocoder URL text box. You can change the geocoder name in the Geocode Name text box.

    4. Optionally type text in the Placeholder Text text box.
    5. Optionally type the country code to limit the search area. See Geocode coverage for a country code list.
    6. By default, 6 is the maximum results returned. Change it if necessary.
    7. Optionally check the Only search in current map extent box if needed.
  5. Repeat step 4 to add more feature layers and geocoder search sources.
  6. To modify the existing search sources, click the source on the table.
  7. Under General Settings, set the placeholder text for searching all of the layers and geocoders.
  8. By default, the pop-up displays when the feature or location is found on the map. Uncheck the box to disable the pop-up.
  9. Click OK to close the configuration window.

Using the Search widget

  1. When you enter a place-name or a keyword in the search box, you see suggestions as you type. If you see an arrow in the search box, you can search on all sources, or click the arrow and choose a locator or layer form the drop-down list.
    List of geocoding services and searchable layers
  2. A pop-up appears at the location of the place-name or the feature and displays any available attribute information.