ngx-openlayers
ngx-openlayers copied to clipboard
How to prevent page scrolling while map zooming in/out with mouse scroll?
As stated above. I would like to disable page scroll while mouse scrolling inside map div. Is there a way to do that?
Hey MSkraburski, could you tell us which browser you're using ?
In safari/chrome, I don't get page scroll when I'm scrolling inside the map canvas.
Could you report if you have the same behaviour in this example : https://openlayers.org/en/latest/examples/mousewheel-zoom.html
I checked it only in Chrome, since that's the main browser I use.
In sent example everything seems to work fine, no bugs or issues to report... Any ideas what might cause my problems? Regards
I have the same issue. The OpenLayers example pages work fine, but this the angular component scrolls while using mouse-wheel zoom. Any solution?
Silent is golden.
A quick fix could be to listen to scroll event at canvas level, and then to stop this event's propagation so it wouldn't impact map's container (not tested though)