The Geocoder widget enables end users to find locations or search features on the map. The widget defaults to the geocoding service from your organization or portal. Additional geocoding services can be added using the widget's configuration window. When the application starts, you can select one geocoding service from the list to make it the active service that all geocoding tasks are processed against.
The following methods of finding a location are supported given they are supported in the geocoding services:
- By a place name
- By a point of interest
- By an address
In addition, if the map has feature search enabled, you can use the search box to find features within the layers. See Configure feature search.
Configuring the Geocoder widget
The widget configuration window allows you to specify the geocoding services that you want the widget to work with.
Hover the mouse over the Geocoder widget and click the small eye icon to show or hide this widget in your application .
By default, the widgets included with a theme are visible.
- Hover the mouse over the widget and click the small edit icon .
This opens the configuration window for this widget.
- Click Add Geocoder.
The add geocoder window displays.
- Click Set to provide a valid URL for the geocoding service you want to use.
- Click OK. The geocoder url is added.
- Provide a name, and a placeholder text. The placeholder text is the label shown in the geocoder box when the application starts.
- Click OK. The specified geocoding service is added to the list.
- Optionally, move the mouse to the existing geocoder on the list to edit or reorder it.
- Click OK to close the configuration window.
Using the Geocoder widget
- When click the arrow in the search box, it displays the list of geocoding services and searchable layers if the map has feature search enabled. Choose one from the drop-down list, and type a place name or an address in the search box if it is a geocoding service, or type keywords if it is a layer.
- A pop-up appears at the location of the place or the feature and displays any available attribute information.