googlearchive/js-marker-clusterer

Panning the map with the dragging starting on cluster marker provoke a zoom

chifret opened this issue · 2 comments

Hi,

I've noticed that when panning the map, if the initial click of the dragging happens on a cluster marker, it provoke a zoom when the draggins ends.
So, the dragging event is handled as a click for the cluster marker.

I don't know if that's intended, but other google maps controlers don't work the same way. Maybe a propagation issue somewhere ?

Thanks for the great job done btw !

@chifret
I think this repo is not maintained anymore. The most active repo which I found is:Gmap Marker Clusterer Plus

Anyway I was havin some problem this stackoverflow answer helped me, basically you need to add this code
google.maps.event.addListener(map,'dragstart',function(){ mc.zoomOnClick_=false;}); google.maps.event.addListener(map,'mouseup',function(){setTimeout(function(){ mc.zoomOnClick_=true;},50);});

Also see this: https://code.google.com/archive/p/google-maps-utility-library-v3/issues/157

You're right, it's even marked so on the GitHub description...

Thanks for the mention, and for the code. The lil' hack will serve :)