Practice time with the locator service
In this exercise you will learn how to use the Locator
task to geocode addresses using a locator service provided by ArcGIS Online at https://geocode.arcgis.com. You will enable a user to search for an address, find the top match, and display on the map.
Start by examining the contents of the geocoding-begin.html
file in the Chapter08
folder of the sample code in your text editor of choice. Some of the code for this exercise has been prewritten for you so that you can focus on the geocoding functionality. The application in its current state requests all the modules that the exercise requires, and displays a map and a text box that allows your users to search for an address, as shown in the following diagram:
Once you have obtained the geocoding-begin.html
file from the sample code, open it in a web browser and then follow the given steps:
- Click the
Locate
button next to the text box and you'll see that nothing happens. It is up to you to provide the address...