Navigation Toolbar Activate Function

3681
3
04-11-2015 05:39 PM
AhmedElHussiny
New Contributor

Hey, everyone!

So I'm literally just starting out with the JavaScript API for ArcGIS. I figured I would build a nice Navigation toolbar, just to get started. Little did I know that 3 hours later I would be going crazy.

I was able to display the map and link all of the buttons to actions using JQuery. In fact, the navigation toolbar also works because the zoom to full extent, previous extent, and next extent buttons are working. It seems to me like anything that relies on the "activate" function is not working.

At first, I thought it was my code, so I started looking at the sample, that can be found here Navigation toolbar.​ The same thing happens! The Zoom In, Zoom Out, and Pan buttons aren't working (the ones in the Navigation toolbar). I figured it was my browser (Chrome on Mac), so I tried Safari, then I tried Firefox. No difference. Some threads that it was a device thing so I tried another computer (also Chrome on Mac) and no change. Finally, I tried it from my phone (Chrome on Android) aaaand the Zoom In and Zoom Out buttons in the Navigation Toolbar are still doing nothing.

I'm not crazy, right? Something IS wrong with it! After all, I AM using the official sample provided by Esri to test!!

Thanks for your help.

0 Kudos
3 Replies
TobiasFimpel1
Occasional Contributor III

I can click the pan button and pan the map by left-clicking, holding, and dragging the mouse. I can click the Zoom In and Zoom Out buttons and then draw a box on the map and the zoom happens as expected. Not sure why it is working for me, but I figure I'd let you know.

0 Kudos
williamcarr
Occasional Contributor II

I got everything working as well. 

0 Kudos
ChrisSergent
Regular Contributor III

In this video I demonstrate how to use the zoom in/zoom out buttons. It was tested on Windows, but it should work the same on the Mac by just using click and drag.

If it's still not working, you can try the screen recording tool that I use to demo what is happening when you attempt run the sample. The screen recorder is at: CamStudio - Free Screen Recording Software  and it's free.

0 Kudos