From 9152c2aaba47d3dfa7fa76ab7f167e13fe0c22af Mon Sep 17 00:00:00 2001 From: danzel Date: Fri, 14 Jun 2013 16:22:34 +1200 Subject: [PATCH] Another _noHas hack to fix removing layers. --- src/MarkerClusterGroup.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index 6458a01f3..cfa88c3fd 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -448,7 +448,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({ //Cluster is currently on the map, need to put the marker on the map instead L.FeatureGroup.prototype.removeLayer.call(this, cluster); if (!dontUpdateMap) { + otherMarker._noHas = true; L.FeatureGroup.prototype.addLayer.call(this, otherMarker); + delete otherMarker._noHas; } } } else {