Created
November 5, 2013 20:54
-
-
Save alexcabrera/7326051 to your computer and use it in GitHub Desktop.
Disable all touch events from a leaflet.js map
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
disableMapTouch = (map) -> | |
map.scrollWheelZoom.disable() | |
map.dragging.disable() | |
map.touchZoom.disable() | |
map.doubleClickZoom.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