When removing a marker from a FeatureGroup, only remove the popup if it was put there by the FeatureGroup.

Refs danzel/Leaflet.markercluster#24
This commit is contained in:
danzel 2012-08-01 13:40:43 +12:00 committed by Vladimir Agafonkin
parent a393cdec20
commit a0ee757e2d

View File

@ -26,7 +26,11 @@ L.FeatureGroup = L.LayerGroup.extend({
L.LayerGroup.prototype.removeLayer.call(this, layer);
return this.invoke('unbindPopup');
if (this._popupContent) {
return this.invoke('unbindPopup');
} else {
return this;
}
},
bindPopup: function (content) {