Skip to content

Instantly share code, notes, and snippets.

@nclzz
Created September 2, 2013 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nclzz/6414870 to your computer and use it in GitHub Desktop.
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
/*** 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