简体   繁体   中英

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 guides 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM