0
我正在使用ym4r_gm在我的網站上創建標記地圖。我用下面的代碼創建了1個很好的標記。Ruby on Rails ym4r_gm Google地圖
@map = GMap.new("locations_map")
@map.control_init(:large_map => true,:map_type => true)
geocode = GMap::Geocoding.get("G12 8BZ")
@map.record_init @map.add_overlay(GMarker.new([geocode.first.latitude,geocode.first.longitude], :title => "Hillhead, Glasgow", :info_window =>"Hillhead, Glasgow"))
我該如何去獲取一組標記以在地圖上顯示?我的郵政編碼(郵編)數組,像這樣:
postcodes = ["G11 6PR", "G1 T3R", "G12 8BZ"]
我已經注意到ym4r_gm的MarkerGroup類,但我無法弄清楚:-S
如果有人能夠給我一個手說將是驚人的,這裏也是鏈接到文檔。
http://ym4r.rubyforge.org/ym4r_gm-doc/
任何幫助,將不勝感激。
乾杯
EEF
僅供參考:https://github.com/apneadiving/Google-Maps-for-Rails – apneadiving 2011-02-16 16:48:38