There are a wide variety of configurable apps offered in the ArcGIS Online gallery that provide many types of functionality for interacting with web maps. A common functionality included in most configurable apps is the ability to search within the map. Search can be configured using a geocoder such as the Esri World Geocoding Service, or a searchable feature layer contained in the web map. By default, search is usually configured to use the Esri World Geocoder. Other search sources, such as custom geocoders or searchable feature layers, must be enabled manually within the app’s configuration. There are a few steps that are necessary for setting up a searchable feature layer besides enabling search.
Apps that support search have a “Search” tab in the configuration panel where all parameters are located. This includes a list of all available search sources.
If a searchable feature layer is detected in the web map, it will appear in this list identified by the layer name. Follow these steps to successfully enable a searchable feature layer:
1) If necessary, enable the search tool. This will usually be a check box near the top of the Search tab.
2) Enable the searchable feature layer. To do this, check the check box next to the layer name in the list.
3) Declare a search field. Access this by clicking the Edit button next to the layer name in the list and then choose from the ‘Search Fields’ list on the resulting window. *Note: This step is mandatory. You must declare a search field for search by feature layer to work.
These three steps will successfully establish a searchable feature layer as a valid search source to be used in the app. However, within the Edit window from Step 3, there are various optional parameters that can be used to more effectively control the performance and behavior of the searchable feature layer.
The following are offered:
Name – Choose a custom name for the search source.
Placeholder – Determine the preset text shown in the search box before a search value is typed. Think of this as help text or hint text.
Constrain search within map – Choose to only find features that are within the extent of the map. This is the extent saved at the web map level.
Enable Suggestions – As a search value is being typed, potential matches will appear in a drop down list if this is enabled.
Maximum Suggestions – Choose the max number of suggestions that will be offered at a time in the drop down list.
Display Suggestions – This will control how the suggestions are displayed in the suggestion drop down list. Choose between ‘Field’ or ‘Template’. ’Field’ will display the suggestions as a specified field’s value. ’Template’ will allow customization of this display by adding text and field values together. Example:
Exact Match – This will limit search results to only results that exactly match the value typed in the search box.
The search experience can be tested by clicking the View button on the bottom right of the configuration panel. Once finished, don’t forget to save the changes that have been made.