Generating Google Maps markers using Ruby
I would like to do a very simpl开发者_如何学Ce task: add some markers in a Google Map using a list of addresses from an array.
I have been thinking about generating the Google Maps JavaScript API code using ruby (printf) but this does not seem like a very clean and beautiful solution...
I have read about YM4R for Ruby on Rails... my project is pretty simple and I have never worked with Ruby on Rails... I have also never used JQuery... but I am very willing to learn to use this tools :)
What do you think will be the best approach to generating the markers?
Fyi, I've just released a new version of gmaps4rails.
It's based on Rails 3 and uses Google maps API V3:
https://github.com/apneadiving/Google-Maps-for-Rails
YM4R is a good choice. In the end you'll just need a few lines of code to get this done, as outlined in the tutorial. Even given your background, you should be able to follow the examples and get things working.
We also use the Geokit plugin, which is a little more complicated because of the set-up. But if you already have the lat/lon, you're good.
精彩评论