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: DrawDescription
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、預設導航——工具條繪製幾何體——預設導航