0

When scrolling down a page and past a leaflet map, if the user's mouse cursor is inside of the map, then the scroll bar stops and the browser window becomes stuck on the map.

Is there a way to completely disable the scroll behavior on the map so that scrolling operates as normal?

I'm already using map.dragging.disable();

  • 2
    See here. http://gis.stackexchange.com/questions/54454/disable-leaflet-interaction-temporary. Sounds like scrollWheelZoom is what you are looking for. – timlohnes Aug 27 '15 at 16:00

2 Answers2

1

Have a look at this Plugin if you don't want to completely disable the scrolling function in the map. It allows to disable any map interaction until the user clicks on the map.

Krxldfx
  • 251
  • 2
  • 6
0

This is how i achieve it using jQuery :

$('#mymap').on('load', function () {
    this.map.options.tap = !L.Browser.mobile;
    this.map.options.dragging = !L.Browser.mobile;
});
JLuc
  • 101
  • 2