You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Benjamin Roth edited this page Oct 22, 2013
·
1 revision
The gem comes with a hash builder:
@hash=Gmaps4rails.build_markers(@users)do |user,marker|
marker.latuser.latitudemarker.lnguser.longitudemarker.json({:id=>user.id})marker.picture({"url"=>"/logo.png","width"=>32,"height"=>32})marker.infowindowrender_to_string(:partial=>"/users/my_template",:locals=>{:object=>user})end# @hash is a Hash, convert it to json using @hash.to_json or any other method
Depending on your setup, use your own json builders, just stick to the expected keys.