Skip to content

Instantly share code, notes, and snippets.

@froemken
Created May 5, 2021 15:02
Show Gist options
  • Save froemken/05f924d7a319f9220d12c45ee8c6e721 to your computer and use it in GitHub Desktop.
Save froemken/05f924d7a319f9220d12c45ee8c6e721 to your computer and use it in GitHub Desktop.
Remove on click event after applying popup with bindPopup in Leaflet
// Example for TYPO3 extension maps2
$maps2OpenStreetMaps[0].map.eachLayer(function(layer) {
if (layer instanceof L.Polygon){
layer.off("click");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment