1

I am using the ArcGIS API for Javascript and am wondering if it comes with functionality for zooming out using a rectangle, similar to the behavior in ArcGIS Desktop? Specifically, the user draws a rectangle and it zooms out based on that rectangle.

I can create the functionality myself, but was wondering if it already existed in the API...

2 Answers 2

2

Yes, it is built into the API. You just need to set up a navigation controller first:

navController = new esri.toolbars.navigation(yourMap)
navController.activate(Navigation.ZOOM_OUT);
0
0

The API has a Navigation toolbar class that uses this functionality.

It comes with a zoom out tool that works by drawing a box.

There is a sample page here.

2
  • Cool, thanks. Do you know if I need to use their toolbar to get that functionality, or can I just use the functionality in my own UI?
    – lintmouse
    Jun 10, 2014 at 17:34
  • Thanks. I tinkered around and was able to use the navigation API without using any of the DOJO UI stuff. Did the trick!
    – lintmouse
    Jun 11, 2014 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.