Prevent navigation

1681
3
05-26-2016 09:35 AM
RobinChappatte
New Contributor III

(Please excuse my english)

I have to restrain my users to pan and zoom from the current view when they hit a button (they switch from navigation mode to edition mode).

I found that it was possible in the version 3.16 (Map navigation | Guide | ArcGIS API for JavaScript )

I look into the Functionality matrix | ArcGIS API for JavaScript 4.0 and saw that "Enable/disable navigation" were coming soon, but I need it to work for the next month (diploma work)...

A potential (and temporary) solution (waiting for the feature to release officially), would be to add an invisible layer over the map to get clicks and the drags and only follow the clicks to the map, but maybe there is a better solution ?

(And maybe my bad understanding of english made me miss or misunderstood something...)

Thank you in advance for your answers,

Robin Chappatte

3 Replies
SteveCole
Frequent Contributor

If you already have a solution based on 3.16, I would stay with this version. I see no good reason to jump up to 4.0 considering the sheer number of missing items and functionality. I can assure you that ESRI will not be pushing out this feature within the next month. The User Conference is in one month so the company's internal focus will be on that.

RobinChappatte
New Contributor III

Thank you for your answer !

Actually, my work consist in adapting an existing project made with OpenLayer to use ArcGIS instead.

To make the best documentation possible, I want to face a maximum of solutions for each difficultie I encounter to make it easily maintainable if an other student have to resume it

(and every option made me learn a little bit more about the web developpement )

0 Kudos
BrandonFlessner
Occasional Contributor

Looks like this is still 'coming soon' as of April 2017, but as a work around you can place a div over top of the mapView div to 'catch' mouse/touch events. This will only work if the map is completely for display and the user will not need to click for an popup, etc. Here's some help to implement:

 html - Displaying one div on top of another - Stack Overflow 

0 Kudos