Auto Complete

What I’m trying to do:
I want to create an auto completed field for locations, but didn’t
want to have the locations stored in my app. My idea is to somehow use
Google to fill that auto complete text field and then retrieve chords
using gmaps geocoding. Have anyone done something like this? does
Google was some api to do something like that? You think there is any
chance of doing this, without storing a list of locations in my db??
and which do you think is the best plugin for auto complete. Thanks in
advanced every one

Miguel R. wrote:

What I’m trying to do:
I want to create an auto completed field for locations, but didn’t
want to have the locations stored in my app. My idea is to somehow use
Google to fill that auto complete text field and then retrieve chords
using gmaps geocoding. Have anyone done something like this? does
Google was some api to do something like that? You think there is any
chance of doing this, without storing a list of locations in my db??
and which do you think is the best plugin for auto complete. Thanks in
advanced every one

The Ajax.Autocompleter would definitely work for your auto-complete text
field so that’s not an issue. What will be the challenge in your case
will be the server-side action that builds the unordered list that will
contain the locations.

http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter

All that’s expected from the server-side action is that it returns an
unordered list. How you build that is up to you. What might be tricky in
your case is getting decent performance.

What do you mean by locations? The Earth has effectively infinite
locations. And even if you talking about “named” locations, in the sense
they can be searched for in Google Maps, the number of them is extremely
large. If you’re expecting that when the user type “A” every location
from Google Maps that start with “A” gets returned in a list, I don’t
think you’ll find that. I could be wrong, but I think that if it was
that simple Google Maps would provide that sort of auto-completion.

yes, I realised I’ll need to fill my data base with a bunch of
locations. It seems wikipedia has a big list of UK locations and towns
I’ll have to do a parser to somehow retrieve that information. About
the plugin I would like to use jquery in my app, I found this plugin
GitHub - chris/auto_complete_jquery: Rails plugin for auto_complete with jQuery instead of Prototype/Scriptaculous but I noticed there is a
few more, is there some default in the community, or any big
differences between this and the one you suggested?