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 Server feature service layers
  • ArcGIS 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 Configure this widget button Configure this widget to open the configuration properties dialog box.
  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.
      Caution:

      A geocode service must meet the following requirements to support the suggest operation:

      • The address locator from which the geocode service was published must support suggestions. Only address locators created using ArcGIS 10.3 for Desktop and later can support suggestions. See the Create Address Locator geoprocessing tool help topic for more information.
      • The geocode service must have the Suggest capability enabled. Only geocode services published using ArcGIS 10.3 for Server or later support the Suggest capability.

    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 if applicable. See Geocode coverage for a country code list.
    6. By default, 6 is the maximum suggestions and results returned. Change it if necessary.
    7. Define the scale to zoom to when geocoder does not return an extent.
      Caution:
      The zoom scale set in the widget only takes effect when the result does not have an associated extent. If the result returns an extent, it will be ignored.

    8. Check the Enable local search box if needed . It allows you to define when to enable the local search by setting the map scale and specify a search distance around the current map center so the candidates closest to the location are returned first.
    9. 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 from the drop-down list.
    List of geocoding services and searchable layers

    A pop-up appears at the location of the place-name or the feature and displays any available attribute information.

  2. Click the ellipsis ( button under the low right of the pop up, a list of actions displays including adding or removing a marker from the map. If the Directions widget presents in the app, you can set Directions from Here or Directions to here to open the Directions widget automatically.