Packagecom.esri.ags.tools
Classpublic class NavigationTool
InheritanceNavigationTool Inheritance com.esri.ags.tools.BaseTool

Tool that supports basic navigation, such as pan and zoom.

See also

Live Sample - using NavigationTool.


Public Properties
 PropertyDefined By
  isFirstExtent : Boolean
[read-only] When "true", map is at the first extent.
NavigationTool
  isLastExtent : Boolean
[read-only] When "true", map is at the last extent.
NavigationTool
  map : Map
[override] The Map that the NavigationTool is associated with.
NavigationTool
Public Methods
 MethodDefined By
  
NavigationTool(map:Map = null)
Creates a new NavigationTool object.
NavigationTool
  
activate(navType:String, enableGraphicsLayerMouseEvents:Boolean = false):void
Activates a specific navigation type (pan, zoom in or zoom out).
NavigationTool
  
deactivate():void
Deactivates the tool and reactivates default map navigation behavior.
NavigationTool
  
Deprecated Since ArcGIS API for Flex 2.3: Please Use Map.zoomToInitialExtent()
Zoom to full extent of base layer.
NavigationTool
  
Zoom to next extent in extent history.
NavigationTool
  
Zoom to previous extent in extent history.
NavigationTool
Events
 Event Summary Defined By
  Fires when the extent of the map has changed.NavigationTool
Public Constants
 ConstantDefined By
  PAN : String = pan
[static] Map is panned.
NavigationTool
  ZOOM_IN : String = zoomin
[static] Map zooms in.
NavigationTool
  ZOOM_OUT : String = zoomout
[static] Map zooms out.
NavigationTool
Property Detail
isFirstExtentproperty
isFirstExtent:Boolean  [read-only]

When "true", map is at the first extent.

This property can be used as the source for data binding.


Implementation
    public function get isFirstExtent():Boolean
isLastExtentproperty 
isLastExtent:Boolean  [read-only]

When "true", map is at the last extent.

This property can be used as the source for data binding.


Implementation
    public function get isLastExtent():Boolean
mapproperty 
map:Map[override]

The Map that the NavigationTool is associated with.


Implementation
    public function get map():Map
    public function set map(value:Map):void
Constructor Detail
NavigationTool()Constructor
public function NavigationTool(map:Map = null)

Creates a new NavigationTool object.

Parameters
map:Map (default = null) — The Map that the tool should be associated with.
Method Detail
activate()method
public function activate(navType:String, enableGraphicsLayerMouseEvents:Boolean = false):void

Activates a specific navigation type (pan, zoom in or zoom out). Activating the tool overrides default map navigation.

Parameters

navType:String — The navigation type - either PAN, ZOOM_IN, or ZOOM_OUT.
 
enableGraphicsLayerMouseEvents:Boolean (default = false) — If true, allows GraphicsLayer to listen for MouseEvents while tool is active.

deactivate()method 
public function deactivate():void

Deactivates the tool and reactivates default map navigation behavior.

zoomToFullExtent()method 
public function zoomToFullExtent():void
Deprecated Since ArcGIS API for Flex 2.3: Please Use Map.zoomToInitialExtent()

Zoom to full extent of base layer.

zoomToNextExtent()method 
public function zoomToNextExtent():void

Zoom to next extent in extent history.

zoomToPrevExtent()method 
public function zoomToPrevExtent():void

Zoom to previous extent in extent history.

Event Detail
extentChange Event
Event Object Type: com.esri.ags.events.ExtentEvent
ExtentEvent.type property = com.esri.ags.events.ExtentEvent.EXTENT_CHANGE

Fires when the extent of the map has changed.

Defines the value of the type property of an extentChange event object.
Constant Detail
PANConstant
public static const PAN:String = pan

Map is panned.

ZOOM_INConstant 
public static const ZOOM_IN:String = zoomin

Map zooms in.

ZOOM_OUTConstant 
public static const ZOOM_OUT:String = zoomout

Map zooms out.