The mouse wheel behaviour in the 4.1 version of the ArcGIS JS API is causing problems with maps on scrollable pages, see Scrolling down a page with a map from here and a question on esri.com. I thought I'd disable zoom by mouse wheel altogether until this is fixed, but I can't find how.
For 3.18 this should be possible using the disableScrollWheelZoom() method, but this isn't supported in 4.1. Does anyone know the 4.1 equivalent?
-
Did you ever get an answer on this? As far as I can tell this has not been address and isn't fixed yet.Jason Glisson– Jason Glisson2016年12月14日 14:34:36 +00:00Commented Dec 14, 2016 at 14:34
-
2Didn't get an answer, did find a workaround however. See the answer here: geonet.esri.com/thread/177970#comment-612463Björn– Björn2016年12月15日 15:30:12 +00:00Commented Dec 15, 2016 at 15:30
-
This workaround worked for me, you should add it as a self-answer!Jason Coyne– Jason Coyne2017年02月22日 16:01:59 +00:00Commented Feb 22, 2017 at 16:01
1 Answer 1
As far as I've been able to find, this is not possible in ArcGIS. I've tried every single solution that I could find and thought about trying to do some kind of overlay.
Instead I opted to use openlayers 3 and implemented the solution below. Works perfectly. Outlined here: http://www.wikihow.com/Change-Advanced-Features-of-an-OpenLayers-3-Map
map.getInteractions().forEach(function(interaction) {
if (interaction instanceof ol.interaction.MouseWheelZoom) {
interaction.setActive(false);
}
}, this);
Explore related questions
See similar questions with these tags.