New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scrollWheelZoom set as false, map is still zoomable with mouse wheel #2720
Comments
The right way is |
Great ! I thought this option was to be set like minZoom and maxZoom. Anyway. Thanks ;) |
@mourner Why is it listed as an option then if it doesn't work? http://leafletjs.com/reference.html#map-scrollwheelzoom |
@timblakely it works; if you set Although not entirely apparent from the question, the issue is if you want to disable scroll wheel zoom after the map is instantiated. You can't do it by just overwriting the option, Leaflet has no way of knowing that you changed the option. Instead, you need to disable the |
@perliedman Ah, sorry for the confusion. |
map.scrollWheelZoom.disable(). is not working for my case. now on ctrl+scroll need to set scrollWheelZoom: true. Can anyone please help , how to update the leaflet properties? |
@snehakamble if you want to enabled the scroll wheel again, simply use |
I'm trying to disable an existing map scrollWheelZoom as per the above
but am getting a TypeError: Cannot read properties of undefined (reading 'disable'). What am I missing? |
Hey ! :)
I have a hard time disabling the scroll wheel zoom on my map. The scrollWheelZoom option is set as false, but the map is still zoomable :
Code :
_map.leafletMap.options.scrollWheelZoom = false;
Result in console :
Do you have any idea about this issue ?
Thanks a lot in advance !
Em.
The text was updated successfully, but these errors were encountered: