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:
parent
5f7f5b2437
commit
7c94559355
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user