Created
September 2, 2013 16:45
-
-
Save nclzz/6414870 to your computer and use it in GitHub Desktop.
This little hack permits to open more than one popup at time with leaflet.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*** Place this before Map initialization ***/ | |
L.Map = L.Map.extend({ | |
openPopup: function(popup) { | |
// this.closePopup(); // just comment this | |
this._popup = popup; | |
return this.addLayer(popup).fire('popupopen', { | |
popup: this._popup | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment