Make this work on old leaflet too. Thanks @nkovacs

This commit is contained in:
danzel
2013-04-24 10:08:20 +12:00
parent 0ae31e9164
commit ef4227dcd2
+1 -1
View File
@@ -272,7 +272,7 @@ L.MarkerCluster = L.Marker.extend({
for (i = c._childClusters.length - 1; i >= 0; i--) {
m = c._childClusters[i];
if (!exceptBounds || !exceptBounds.contains(m._latlng)) {
if (L.FeatureGroup.prototype.hasLayer.call(c._group, m)) {
if (!L.FeatureGroup.prototype.hasLayer || L.FeatureGroup.prototype.hasLayer.call(c._group, m)) {
L.FeatureGroup.prototype.removeLayer.call(c._group, m);
}
m.setOpacity(1);