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,
Solved! Go to Solution.
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
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=....
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.
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
you're right. disablePan() works.
thanks,