googlearchive / js-marker-clusterer

A marker clustering library for the Google Maps JavaScript API v3.
https://googlemaps.github.io/js-marker-clusterer/docs/reference.html
Apache License 2.0
1.28k stars 772 forks source link

Duplicate Clusters #91

Open ldrrp opened 8 years ago

ldrrp commented 8 years ago

image

Notice i only have 4 markers, and the clusters have two groups of 4. I added a debug console log to count the amount of markers created, at each zoom level only 9 are created in this image total for both zoom levels.

d4nyll commented 8 years ago

My guess is that you have some event handler where every time you zoom/pan, you instantiate a new instance of MarkerClusterer. So that's why your clusters are so close together - because there are actually two MarkerClusterer overlays on top of each other.

What you need to do is to: