Geocoding with a Locator service in the ArcGIS API for JavaScript

An ArcGIS Server Locator service can perform geocoding and reverse geocoding. Using the ArcGIS Server API for JavaScript, you can submit an address to the Locator service and retrieve geographic coordinates for the address, which can then be plotted on the map. The following figure illustrates this process. An address, defined by a JSON object in JavaScript, is an input to a Locator object, which geocodes the address and returns the results in an AddressCandidate object, which can then be displayed as a point on your map. This pattern is the same as the other tasks we saw in previous chapters, where an input object (the Address object) provides input parameters to the task (Locator ...

Get Building Web and Mobile ArcGIS Server Applications with JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.