Disable mouse scroll in an embedded web mapping application

209
3
Jump to solution
04-11-2022 02:45 PM
Labels (1)
AJ_devaccount
Occasional Contributor

I've created a web mapping application using WAB, and have embedded it into an ArcGIS Hub page. Is it possible to disable scrolling on the map using the mouse wheel? Anytime a user passes over the map, instead of scrolling up/down the page, it zooms in/out of the map, which can be a disruptive experience. 

I've created it using the WAB, and unfortunately I'm not familiar with creating it using developer tools. 

Edit: It seems that disabling it using WAB or embed settings in Hub doesn't work. Can I download the code of the application, and change it that way?

Thanks very much for your help.

0 Kudos
1 Solution

Accepted Solutions
BryndaHatch
Esri Contributor

I found this other thread that explains that turning the Allow Scrolling to No only turns it off for embedded apps like StoryMaps.  https://community.esri.com/t5/arcgis-hub-questions/no-allow-scrolling-for-application-card-not/m-p/1...

However, if you really want to turn it off, I found this other page that explains how: https://developers.arcgis.com/javascript/latest/sample-code/view-disable-zoom/

 

View solution in original post

3 Replies
BryndaHatch
Esri Contributor

If you embedded your WAB in the Hub page using an iframe, then look for the setting called Allow Scrolling and turn it off.

BryndaHatch_0-1650298318973.png

https://doc.arcgis.com/en/hub/sites/embed-video-social-media-and-iframes.htm#ESRI_SECTION1_C30D73392...

The link above is for the help doc on this.

BryndaHatch_1-1650298415763.png

 

0 Kudos
AJ_devaccount
Occasional Contributor

thanks @BryndaHatch! I did try that option, but somehow it still auto scrolls if the cursor is on the map.

0 Kudos
BryndaHatch
Esri Contributor

I found this other thread that explains that turning the Allow Scrolling to No only turns it off for embedded apps like StoryMaps.  https://community.esri.com/t5/arcgis-hub-questions/no-allow-scrolling-for-application-card-not/m-p/1...

However, if you really want to turn it off, I found this other page that explains how: https://developers.arcgis.com/javascript/latest/sample-code/view-disable-zoom/