When a user is dragging the page on mobile browsers, it acts like scrolling but when it comes to the map and the users finger is on the map, leaflet's dragging event is fired and scrolling is not.
I want to disable single finger dragging but keep double fingers dragging so that the user can drag the map with 2 fingers whilst scrolling the page with 1 finger.
Question: Is there any ways to do the above?
Yes, there is. Just set dragging option to false and use tap option to keep scrolling up or down.
var oMap = new L.Map('Map', {
'...Other options...'
dragging: false,
tap: false
});
This should do what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With