Description
dojo.require("esri.toolbars.navigation");Toolbar that supports basic navigation such as pan and zoom.
Samples
Search for
samples that use this class.
Class hierarchy
esri.toolbars.Navigation
Constructor
Constants
| PAN |
Map is panned. |
| ZOOM_IN |
Map zooms in. |
| ZOOM_OUT |
Map zooms out. |
Methods
Events
Constructor Detail
esri.toolbars.Navigation(map)
Creates a new Navigation object. A Map is a required parameter.
Parameters:
|
<Map>
map |
Required |
Map the toolbar is associated with.
|
Code snippets:
navToolbar = new esri.toolbars.Navigation(map);
Methods Detail
Activates the toolbar for map navigation. Activating the toolbar overrides default map navigation.
Return value: none
Input Parameters:
|
<String> navType |
Required |
The navigation type. The Constants table lists valid navigation values. |
Deactivates the toolbar and reactivates map navigation.
Return value: none
When "true", map is at the first extent.
Return value: Boolean
Code snippets:
dijit.byId("zoomprev").disabled = navToolbar.isFirstExtent();
When "true", map is at the last extent.
Return value: Boolean
Code snippets:
dijit.byId("zoomnext").disabled = navToolbar.isLastExtent();
Set the SimpleFillSymbol used for the rubber band zoom.
Return value: none
Input Parameters:
|
<Symbol> symbol |
Required |
The SimpleFillSymbol used for the rubber band zoom. |
Code snippets:
navToolbar = new esri.toolbars.Navigation(map);
navToolbar.setZoomSymbol(zoomSymbol);
Zoom to full extent of base layer.
Return value: none
Zoom to next extent in extent history.
Return value: none
Zoom to previous extent in extent history.
Return value: none
Events Detail
Fires when the extent history changes.
Code snippets:
function init{
navToolbar = new esri.toolbars.Navigation(map);
dojo.connect(navToolbar, "onExtentHistoryChange", extentHistoryChangeHandler);
}
function extentHistoryChangeHandler() {
dijit.byId("zoomprev").disabled = navToolbar.isFirstExtent();
dijit.byId("zoomnext").disabled = navToolbar.isLastExtent();
}