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...

asked Jun 10, 2014 at 16:58

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);
answered Jun 10, 2014 at 17:34
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.

answered Jun 10, 2014 at 17:29
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? Commented 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! Commented Jun 11, 2014 at 16:42

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.