Geocode + Autocomplete + Rails
I am reading RailsCast #102 on AutoCompelte, however this describes how to do stuff with a .json file, however if I'm using something like Geocode it doesn't have such a thing since it's calling information from Google Maps. I have found many guid开发者_开发知识库es to connect jQuery AutoCompelte to Rails and Geocode to Rails, but not one that does all three. So I was wondering how do I go about doing an AutoCompelte form which calls data from Geocode.
Thanks,
You might want to look at https://ubilabs.github.io/geocomplete/ which is a ready solution for autocompleting Google Maps locations.
You can then listen to the geocomplete events and populate your fields as you like.
精彩评论