powered by
Prevents accidental map scrolling when scrolling in a document.
suspendScroll( map, sleep = TRUE, sleepTime = 750, wakeTime = 750, sleepNote = TRUE, hoverToWake = TRUE, wakeMessage = "Click or Hover to Wake", sleepOpacity = 0.7 )
The leaflet map
false if you want an unruly map
time(ms) until map sleeps on mouseout
time(ms) until map wakes on mouseover
should the user receive wake instructions?
should hovering wake the map? (non-touch devices only)
a message to inform users about waking the map
opacity for the sleeping map
leaflet(width = "100%") %>% setView(0, 0, 1) %>% addTiles() %>% suspendScroll()
Run the code above in your browser using DataLab