ruby on rails - Gmaps4Rails - Custom marker picture not clickable / not opening infowindow -
i have problem gmaps4rails (2.1.2) when seek utilize custom marker.picture.
this code works perfectly:
regular googlemaps pin (red) shown. if click pin, infowindow opens.
@hash = gmaps4rails.build_markers(@nearbys) |location, marker| marker.title location[:name] marker.lat location[:coordinates].y marker.lng location[:coordinates].x marker.json({title: location[:name]}) end when add together marker.picture image shown. not clickable anymore.
@hash = gmaps4rails.build_markers(@nearbys) |location, marker| marker.title location[:name] marker.lat location[:coordinates].y marker.lng location[:coordinates].x marker.json({title: location[:name]}) marker.picture({ marker_anchor: [40, 58], # added optionally <- doesn't work either url: "#{view_context.image_path("map/icons/3dmarker.png") }", width: "44", height: "58" }) end any suggestions doing wrong?
thank in advance
several things:
i uncertainty have infowindow working: dont pass info create (marker.infowindow), wont created
replace marker_anchor anchor
doing marker.title location[:name] same marker.json({title: location[:name]}) have 1 many
ruby-on-rails google-maps gmaps4rails gmaps4rails2
No comments:
Post a Comment