Map` like this:
L.Map = L.Map.extend({
openPopup: function(popup) {
this._popup = popup;
return this.addLayer(popup).fire('popupopen', {
popup: this._popup
});
}
});
But I am using leaflet. Is there anyway to extent like so that i can prevent closing my marker popup?
L.mapbox.accessToken = constant.accessToken;
var map = L.mapbox.map('map', 'mapbox.streets', {zoomControl: true});
Update Dec 2017 Leaflet popup options have been extended to include
{ autoClose: false }
which has the required effect :Let me quote the Leaflet documentation on
L.Popup
:In order to open several popups, instantiate them using
L.popup(latlng, options)
, then.addTo(map)
them.