1

What's the difference between ESRI's Geocoder and Locator module in the javascript API? I know the Geocoder defaults to ESRI's geocoding service, or both modules can be set to a custom Address Locator service on ArcGIS Server, which is my use scenario. Is the Geocoder intended to be used more like a "widget" because it adds a search box? Is there a reason you'd use one module over the other, or a case where'd you'd want to use both? Thanks for any info or opinions offered.

4

Great question! Very subjective but I'll try to keep it brief. Yes, with JavaScript API in mind, Geocoder is a dijit and Locator is a task. However, generally speaking, Geocoder and Locator terms can be used interchangeably.

If you need a pre-built solution for letting users search an address going to a locator service, you can just pull Geocoder widget in your application and it'll start working without you having to create an input text box, etc. However, it consumes a locator service/task/class (how ever you want to reference it) in the background it uses a locator/geocoding service (for the ease of understanding - a service that ends in "GeocodeServer") and performs a Locator task in the background.

Locator task in JS API is basically bare bone class that does the same thing, however, you'd have to call it and also have it read input from a text box etc. You could also use it with any kind of background geocoding that you want to do without requiring user interactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.