Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have built a tool that allows my users to perform geocode requests against the World Geocoding Service provided from Esri.

I would like to extend my tool to have an autocomplete feature, similar to how this can be achieved with the Autocomplete class from the Google Geocode API.

Although there is not a similar class available at the Esri service end, I was thinking that you could still hit the geocode service with a GET request, after listening for a slight delay after each keystroke from the end-user in something like a combo-box, and just return the top 5 results based on score.

I am looking for an answer that provides some code (can be pseudocode, or any language) on how to accomplish this, or if this workflow is even achievable. Something similar to this, but against the Esri Geocode service as opposed to map services.

share|improve this question
up vote 5 down vote accepted

Yes, you can autocomplete against a geocode service.


if >4 chars + keystroke + delay 300ms
  Send Geocode request using text=inputBox.value

Here is how it looks at the front-end:

enter image description here

It waits for user to type in 4 characters, then populates a autocomplete flex component with the response.

When you choose an item from the dropdown, it zoom to the feature, and presents any additional results it found, using a green outline for high confident matches, and orange ones for lesser confident ones.

I have taken it a step further, and allowd the user to configure a bounding box, source country, state, and minimum candidate score within an XML file.

I need to tidy up some of the logic, and then I will try to put it into a flexviewer widget and upload to

share|improve this answer
Just found this which looks awesome – Simon Dec 3 '12 at 11:49
There's also a javascript sample up here, which might be useful for others migrating from flex: – Mike D Oct 30 '14 at 17:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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