1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
| /**
| * 地图浏览工具的基类
| * @author 温杨彪 2015-9-13
| **/
| define([
| "dojo",
| "dojo/_base/declare",
| "controls/toolbar/tools/BaseTool",
| "esri/toolbars/navigation"
| ], function(
| dojo,
| declare,
| BaseTool,
| Navigation
| ) {
| var RL = declare([BaseTool], {
| _navTool:null,
| _navType:"",
| constructor: function(args) {
| },
| activate:function(args)
| {
| if(this._activated || !this._enable)
| return;
| this.inherited(arguments);
| this._navTool.activate(this._navType);
| },
| postCreate:function()
| {
| this.inherited(arguments);
| this._navTool = new Navigation(this.map);
| },
| deactivate:function()
| {
| if(!this._enable || !this._activated)
| return;
| this.inherited(arguments);
| this._navTool.deactivate();
| }
|
|
| });
| return RL;
| });
|
|