How disable arrow zoom after clicking on slider

767
1
10-16-2014 05:54 AM
StanLambert
New Contributor II

     I am displaying the "large" slider for the user to zoom in and out if they don't have a mouse wheel. After clicking on the slider the user can use the graphical control to zoom and can also use the up/down arrow keys. Well, it seems that after clicking on the zoom slider once, the  arrow keys zoom in and out forever more rather than panning the map up/down, left/right. What I would "like" to happen is that once the user clicks back on the map, the arrow keys revert to panning rather than zooming, which is the default behavior when the map is first displayed. I've tried calling enableKeyboardNavigation() in the click event of the map but this doesn't change anything. After the first time the user clicks on the slider, the arrow keys always zoom the map rather than pan. Is there any way to set the arrow keys back to the default pan behavior after the user clicks off of the slider? I would even be satisfied with the arrow keys always panning the map even after the user clicks on the slider. I'm using the JS API version 3.10. Thanks for your help.

0 Kudos
1 Reply
Vara_PrasadM_S
Occasional Contributor II

Hi Stan,

I have gone through few samples of JS API (for eg., Change slider size | ArcGIS API for JavaScript ), the defualt behavior of the arrows is not panning the map. They are simply working as zoomin and zoomout starting from first time.

Have you tried calling "showPanArrows" function on map. Please let me know if I am missing anything in uderstanding the issue.

Thanks & Regards,

Vara Prasad.

0 Kudos