开发者

Geocode + Autocomplete + Rails

开发者 https://www.devze.com 2023-04-12 16:10 出处:网络
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 in

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消