turn view click on and off

3108
11
Jump to solution
05-08-2020 01:07 PM
jaykapalczynski
Frequent Contributor

I have a map that I want the user to interface with.  

Right now the below code works great but the map is ALWAYS active.

I need to be able to activate the clicks after a button is clicked.

Until the user clicks a button the viewright.on("click"......  is not enabled.

On page reload the button should have to be clicked again to register the clicks in the map

Any thoughts?

viewright.on("click", function (evt) {
    viewright.hitTest(evt.screenPoint).then(function (response) {
  
         // Do a bunch of stuff
   
    });

}‍‍‍‍‍);
0 Kudos
11 Replies
jaykapalczynski
Frequent Contributor

Oh wait I am never setting the mouseEvtHandler to anything to test against......ahhahahahah....one seond

0 Kudos
jaykapalczynski
Frequent Contributor

duh.....yep that was it...my error....THANKS AGAIN