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();

1

2 Answers 2

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.

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;
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.