diff --git a/src/MarkerCluster.Default.js b/src/MarkerCluster.Default.js index 15e64de3e..903bc11d9 100644 --- a/src/MarkerCluster.Default.js +++ b/src/MarkerCluster.Default.js @@ -17,6 +17,11 @@ bindEvents: function (map, markerClusterGroup) { var me = this; + var inZoomAnimation = false; + + map.on('zoomstart', function () { inZoomAnimation = true; }); + map.on('zoomend', function () { inZoomAnimation = false; }); + //Zoom on cluster click or spiderfy if we are at the lowest level markerClusterGroup.on('clusterclick', function (a) { @@ -29,6 +34,9 @@ //Show convex hull (boundary) polygon on mouse over markerClusterGroup.on('clustermouseover', function (a) { + if (inZoomAnimation) { + return; + } if (me._shownPolygon) { map.removeLayer(me._shownPolygon); }