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?

  • 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 Dec 14 '16 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 Dec 15 '16 at 15:30
  • This workaround worked for me, you should add it as a self-answer! – Jason Coyne Feb 22 '17 at 16:01
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, privacy policy and cookie policy

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