Skip to content

Instantly share code, notes, and snippets.

@alexcabrera
Created November 5, 2013 20:54
Show Gist options
  • Save alexcabrera/7326051 to your computer and use it in GitHub Desktop.
Save alexcabrera/7326051 to your computer and use it in GitHub Desktop.
Disable all touch events from a leaflet.js map
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