apneadiving / Google-Maps-for-Rails

Enables easy Google map + overlays creation in Ruby apps
https://apneadiving.github.io/
MIT License
2.26k stars 382 forks source link

How to group markers? #348

Closed xtoine closed 11 years ago

xtoine commented 11 years ago

When I use

<%= gmaps4rails(@markers) %>

If I have lot of markers around the same city, it will group them like the screenshot.

screen shot 2013-06-10 at 12 10 39 am

But when I use something customize: <%= gmaps({ "map_options" => {"libraries" => ["adsense"], "auto_zoom" => true}, "markers" => {"data" => @checkins} }) %>

It doesn't happen and all the markers are show on the map (not very nice to see the informations). Any solution? An option to set?

Thanks

apneadiving commented 11 years ago

look at the do_clustering option in the doc: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Markers