Fix clearLayers not unsetting __parent of the markers, preventing them from being re-added. Fixes #99

This commit is contained in:
danzel
2012-12-06 13:42:27 +13:00
parent c01050fd85
commit e86afca04a
+4
View File
@@ -209,6 +209,10 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
}
}
this.eachLayer(function (marker) {
delete marker.__parent;
});
if (this._map) {
//Reset _topClusterLevel and the DistanceGrids
this._generateInitialClusters();