The ArcGIS Online web app templates are a great way to share your work with others. Many templates leverage capabilities and content in your web maps. A newly added web map application setting – Find Locations – By Layer allows you to set attributes and queries to support the feature search functionality within a map.
Enabling Feature Search
You can use the Simple Map Viewer template to publish an app that will allow Search to find specific attributes. For example, the map below has layers that enable us to search for Switch IDs and Substations for utilities. To set this up Edit the web map details as follows:
- Check By Layer
- Click Add Layer to set the Layer, Fields, and Condition.
- Edit the Hint text to provide user guidance.
Note: Currently only the map application settings within the green box apply to the map viewer and several templates. The other settings are for native apps like Collector.
Using Feature Search
Example 1: Search where feature attribute equals search condition.
- Choose to Search in the “Switch” layer.
- Enter the search string.
- Find the desired feature.
Example 2: Reuse the same app in a mobile browser to search where feature contains a value.
- Choose to Search in the “Substation” layer.
- Enter the search string, notice the suggested list of features that contain the string.
- Select and find the desired feature.
Example 3: Reuse the map to create a new app
The last example will show using the map configured for feature search earlier in the post in a new app. The configurable apps section of the Esri-featured content gallery contains many templates that can be used to create apps. Locate the Basic Viewer in the gallery and click on the Details button. Once signed in, you will see Publish Application.
On the Configure template panel, click Select Web Map, and browse to the map you want to use.
The feature search functionality is accessed through the address search box, so be sure to leave Address Finder enabled. Next make any additional changes to the app’s configuration then click Save and Done.
In this example, the available tools has been reduced and the color theme has been changed. The Basic Viewer search box provides the same experience as the simple map viewer examples above.
Consider how you can use the feature search functionality to provide more functional web app for your customers.