I’m working on a project right now where we make use of the Google Maps API to display various information on Google Maps. One page calls for a view of all golf courses in Sweden. To my surprice there are actually quite a few of them, closer to 500 golf courses. When you position lots and lots of markers in a small area of a map it can get quite cluttered and eventually the map starts to load painfully slow.
So with this in mind I set out to find a way to avoid this problem. I’ve seen on other sites markers that change depending on what level of zoom you’re currently in and a quick search on Google gave me the answer I was looking for. Cluster markers. Cluster markers is not a part of the Google Maps API but are supplied by third party developers. I went through a couple of different solutions but finally choose to use ClusterMarker by Martin Pearman.
‘ClusterMarker detects any group(s) of two or more markers whose icons visually intersect when displayed. Each group of intersecting markers is then replaced with a single cluster marker. The cluster marker, when clicked, simply centers and zooms the map in on the markers whose icons previously intersected.
The ClusterMarker API is well documented and really easy to implement and use.
November 16th, 2008
by Charles Nullens
Thanks for the link to Martin’s excellent website – well the content is excellent
December 21st, 2008
by Stephanie
Thanks so much! Exactly what I was looking for.
January 20th, 2009
by Maksud
It is superb. I had tested it and it is so simple and easy to use that I was quite surprised.
May 19th, 2009
by Black
I use the marker-clusterer from the gmaps utility libary.
http://gmaps-utility-library-dev.googlecode.com/svn/trunk/markerclusterer/
It’s simple to use and it automaticly shows how many markers are clustered in one point.
I use here: http://www.norwegen-reise.com/camping.karte.html
December 10th, 2009
by nick
I haven’t seen markerclusterer working together with Drupal…