Class: Navigation
Description
dojo.require("esri.toolbars.navigation");
Constants
| Constant | Description |
|---|---|
| PAN | Map is panned. |
| ZOOM_IN | Map zooms in. |
| ZOOM_OUT | Map zooms out. |
Methods
| Method | Return Value | Description |
|---|---|---|
| activate(navType) | none |
Activates the toolbar for map navigation. Activating the toolbar overrides default map navigation. (激活地图导航工具条,重写默认的地图导航) |
| deactivate() | none |
Deactivates the toolbar and reactivates map navigation. (不激活导航工具条并且回复默认地图导航,默认地图导航是鼠标拖动是平移,滚轮是放大或缩小) |
| isFirstExtent() | Boolean | When "true", map is at the first extent. |
| isLastExtent() | Boolean | When "true", map is at the last extent. |
| setZoomSymbol(symbol) | none | Set the SimpleFillSymbol used for the rubber band zoom. |
| zoomToFullExtent() | none | Zoom to full extent of base layer. |
| zoomToNextExtent() | none | Zoom to next extent in extent history. |
| zoomToPrevExtent() | none | Zoom to previous extent in extent history |
————————————————————————————————————————————————————————————————————————————
Class: Draw
Description
dojo.require("esri.toolbars.draw");
Methods
| Method | Return Value | Description |
|---|---|---|
| activate(geometryType, options?) | none | Activates the toolbar for drawing geometries. Activating the toolbar disables map navigation. (激活绘制几何体的工具条,并且不激活地图导航,绘图和导航具有排他性) |
| deactivate() | none | Deactivates the toolbar and reactivates map navigation. (不激活绘制几何体的工具条,并且回复默认地图导航) |
| finishDrawing() | none | Finishes drawing the geometry and fires the onDrawEnd event. Use this method to finish drawing a polyline, polygon or multipoint when working with the compact build on a touch supported device like the iPhone. |
| setFillSymbol(fillSymbol) | none | Sets the fill symbol. |
| setLineSymbol(lineSymbol) | none | Sets the line symbol. |
| setMarkerSymbol(markerSymbol) | none | Sets the marker symbol. |
| setRespectDrawingVertexOrder(set) | none | Sets whether the polygon geometry should be modified to be topologically correct. |
1、默认导航——工具条导航——默认导航
2、默认导航——工具条绘制几何体——默认导航