Miguel Regedor 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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

