Stop slip map Touchscreen Device

167
4
Jump to solution
06-02-2019 07:19 PM
TateM
by
New Contributor III

Hello All,

Is there a equivalent of map.disableScrollWheel() when it comes to touchscreen devices, i.e. smartphones?  When it comes to a web page with lots of scrolling down and up, and if the map div is in the middle of the page. Users might place  their fingers on the map, drag it to try to go up or down the page but it will just pan the map instead of actually going up or down the page to other sections 

I'm looking at JS API 3.xx and don't see anything that could prevent that.  Maybe in JS API 4.xx? 

Thanks, 

0 Kudos
1 Solution

Accepted Solutions
AndyGup
Esri Regular Contributor

Oh, sorry, 3.x definitely has a variety of map navigation overrides, for example https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#disablemapnavigation

View solution in original post

0 Kudos
4 Replies
AndyGup
Esri Regular Contributor

Hi Tate, you can disable map navigation in the 4.x API, here are a few sample apps: https://developers.arcgis.com/javascript/latest/sample-code/view-disable-rotation/index.html?search=...

0 Kudos
TateM
by
New Contributor III

Thanks Andy, 

Thats what I was afraid of, nothing in 3.x but something in 4.x.  Now I'm starting to wonder if I can mix match(using both) API versions in my application, especially that drag feature in 4.x. 

0 Kudos
AndyGup
Esri Regular Contributor

Oh, sorry, 3.x definitely has a variety of map navigation overrides, for example https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#disablemapnavigation

View solution in original post

0 Kudos
TateM
by
New Contributor III

you're right.  disablePan() works. 

thanks,

0 Kudos