This example allows you to enter an address, then displays the location of matching addresses. This is commonly known as geocoding. In the ArcGIS javascript API, you use thelocator Class to perform geocoding.
In this example, you can enterAddressAnd then display the matchedLocation. This is usually called geocode.
The locator constructor requires the URL of An ArcGIS Server geocode service. A geocode service represents an address locator that has been made available on the server. this example uses the esri_geocode_usa service on the ESRI sample server. you can use the Services Directory to discover the URL to your own geocode service.
The locator constructor requires the URL of the geocode service of ArcGIS Server. Geocode service represents a location locator available on the server.
When the user clicks the locate button,LocateFunction is called. this function parses the address text entered by the user into a four-item array. the four items (address, city, state, and zip) correspond to the address fields defined in the locator. you can discover these address fields by looking up the geocode service in the Services Directory. for example, this page shows the four address fields for the geocode service used in this example.
When you click the locate button, the positioning function is called. This function parses the location text entered by the user as an array of four elements. The four elements (address, city, state, and zip) match the fields defined in locator. You can find these address fields by viewing the geocode service in the service directory
The locator begins searching for matches when the addresstolocations method is called:
Locator. addresstolocations (Address );
Reverse geocoding determines the address of a given point on a map. This sample shows how to do reverse geocoding with the ArcGIS javascript API.
Anti-geographic Code determines address of a given vertex .