To make it easier for users to locate features in a map you own or administer, you can configure specific layers in your map to be searchable. For example, you could enable search on your parcel layer so users can find specific parcels. Users select the parcel layer in the search box drop-down menu, enter the parcel ID they want to find, and the map zooms to the parcel and shows a pop-up (that you can configure).
You can configure search in hosted feature layers and ArcGIS Server feature and map service layers that have the Query operation enabled. In the layer, search is supported for string and integer fields that do not have coded domains.
- Verify that you are the owner or administrator of the map you want to configure for feature search.
- From the My Content tab of the content page, open the map's item page.
- On the item page, click the Settings tab and click the Web Map link.
- Expand the Find Locations setting if it is not already expanded and check the By Layer check box.
- Click Add Layer.
- Choose a layer from the drop-down menu.
Hosted feature layers and ArcGIS Server feature and map service layers with Query enabled are searchable and, therefore, appear in the drop-down menu. If you publish your feature data from ArcGIS Pro, the Query operation is enabled by default.For ArcGIS Server feature and map services, you can edit operation settings in ArcGIS Server Manager.
- Choose an attribute field in the layer.
For a field to be searchable and, therefore, appear in the drop-down menu, it must contain strings or integers and not use a coded domain. Integer fields only support the Equals condition. For the best search results, choose a field with unique values.
- Choose whether the result should contain or be equal to the search terms.
- Provide hint text that will appear in the search box when the user selects a layer to search. The same hint appears for all your searchable layers.
- Repeat the steps to enable search on additional layers or specify additional search fields. You can specify multiple search fields per layer.
- Click Save.
Your map now has feature search enabled. Others can use the search box in Map Viewer (formerly known as Map Viewer Beta) or in Map Viewer Classic (formerly known as Map Viewer) to find features in the layers you've configured. To do so, they click the drop-down arrow in the search box and choose a layer from the drop-down menu. The hint text you provided will be displayed in the search box. Once their keywords are typed in the search box, the map will zoom to the located feature and a pop-up with any available attribute information will be displayed.