leuquim
leuquim

Reputation: 655

Google maps: Same positioned clustered markers disappear on zoom

I'm currently using the MarkerClusterer v3 library in my app to group markers inside a Google map instance.

I've found that when I have 2 markers on the same exact coordinates, the clusterer displays a group of 2 markers correctly, but when clicking on the cluster to zoom into the 2 individual markers, no markers appear. Zooming back out re-paints the "2 marker" cluster.

I'm using the default Google Maps API, adding markers to the clusterer individually inside a loop. When I disable the clusterer I can zoom into the 2 markers properly.

Any thoughts on why this may be happening?

Upvotes: 0

Views: 1707

Answers (1)

leuquim
leuquim

Reputation: 655

Finally found the answer:

Marker Clusterer accepts a parameter maxZoom that controls the maximum zoom to display clusters. If this value is too high (in my case higher than the possible zoom in that area) it won't display the markers properly.

Playing around with this parameter allows for fine-tuned cluster behaviour, as you zoom into your markers.

Upvotes: 3

Related Questions