Closed jodygarnett closed 6 years ago
@MarvinGI please setup a meeting with @ahocevar to fix this problem.
Looks like this is a one liner: https://gis.stackexchange.com/questions/136782/how-do-i-disable-mouse-scroll-zoom-in-openlayers-3
var map = new ol.Map({
interactions: ol.interaction.defaults({mouseWheelZoom:false}),
...
});
@jodygarnett This is added to the website http://osgeo.getinteractive.nl/initiatives/geo-for-all/ On desktop this solves the scrolling issues, but not for mobile/tablet.
Okay we need to ask @ahocevar for help
Here's a solution that works for both desktop and mobile:
var map = new ol.Map({
interactions: ol.interaction.defaults({
mouseWheelZoom:false,
dragPan: false
}),
...
});
function onMouseMove(e) {
documnent.removeEventListener('mousemove', onMouseMove, false);
map.addInteraction(new ol.interaction.DragPan());
}
document.addEventListener('mousemove', onMouseMove, false);
Mobile users will then need two fingers to pan the map, which has become default behaviour in similar apps that use Google Maps as well.
issue is solved.
When scrolling down the following page using the mouse scroll wheel:
The scroll action is captured by the map and used to zoom; making it hard to reach the end of the page!
This is more a challenge on mobile, once your screen enters the map ... you can never leave!
Options: