Handle removeLayers([]) where some elements aren't in the MarkerClusterGroup

This commit is contained in:
danzel
2012-11-14 09:58:22 +13:00
parent f72bb13324
commit 9fb345543a
+5
View File
@@ -156,6 +156,11 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
for (i = 0, l = layersArray.length; i < l; i++) {
m = layersArray[i];
if (!m.__parent) {
continue;
}
this._removeLayer(m, true, true);
if (m._icon) {