Search widget with multiple sources
This sample demonstrates how to use the Search widget to search multiple Layer Sources based on given fields. The search widget provides the capability to search features in Layers or geocode locations with a locator. By default, the Search widget sets the view on the Search result. The level of detail (LOD) at the center of the view depends on the data source, with higher quality data sources returning extents closer to the
feature obtained from the search.
To use multiple sources with the Search widget, you must set the widget's sources property.
The geocoding service requires a token for authentication. This sample uses an apiKey to authenticate. You can either replace it with your own apiKey, or remove it and log in once prompted. Alternatively, you can use another authentication method to access the geocoding service.