1

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?

3
  • Did you ever get an answer on this? As far as I can tell this has not been address and isn't fixed yet. Commented Dec 14, 2016 at 14:34
  • 2
    Didn't get an answer, did find a workaround however. See the answer here: geonet.esri.com/thread/177970#comment-612463
    – Björn
    Commented Dec 15, 2016 at 15:30
  • This workaround worked for me, you should add it as a self-answer! Commented Feb 22, 2017 at 16:01

1 Answer 1

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);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.