Markers for Google maps not in right spot -
i have created google map using google maps rails gem. using custom svg markers.
the markers not appearing on proper location (see dallas or chicago in attached image).
in controller have created hash object. have tried adjust marker's position marker_anchor property, doesn't appear have effect on position of image on map. tried using int 1-9 format or richmarker (ie [1, true]) did not work either.
@hash = gmaps4rails.build_markers(@cities_for_map) |city, marker| marker.lat city.latitude marker.lng city.longitude marker.picture({ "url" => "/images/maps/regular.marker.svg", "width" => 13, "height" => 13, "marker_anchor" => [0, 50] }) marker.infowindow render_to_string(:partial => "/destinations/map_tile.html", :locals => { :city => city}) end
am trying modify wrong property or bug gem?
@apneadiving solved
use need use anchor, not marker_anchor. assumed using richmarker library out of box.
Comments
Post a Comment