From 89d22369176514019489fc1c6a7b4dd5efa97aa9 Mon Sep 17 00:00:00 2001 From: danzel Date: Wed, 17 Oct 2012 15:16:27 +1300 Subject: [PATCH] Remove __layer property on markers that are removed, otherwise on re-adding them we'll assume they are already added. Woops! --- src/MarkerClusterGroup.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js index cf4434b65..31ff22729 100644 --- a/src/MarkerClusterGroup.js +++ b/src/MarkerClusterGroup.js @@ -120,6 +120,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({ L.FeatureGroup.prototype.removeLayer.call(this, layer); layer.setOpacity(1); } + + delete layer.__parent; + return this; },