Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disable all (or almost all!) leaflet map events
// Assumes your L.Map is called "map". Untested!
map.dragging.disable();
map.touchZoom.disable();
map.doubleClickZoom.disable();
map.scrollWheelZoom.disable();
map.boxZoom.disable();
map.keyboard.disable();
if (map.tap) {
map.tap.disable();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.