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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
| const menuTool = {
| toolMenu: null,
| toolFlag: null,
| colorAll: {
| },
| topTools(res) {
| this.clearTopTools();
| if (res.id == this.toolFlag) {
| this.toolFlag = null;
| return
| }
| this.toolFlag = res.id;
| switch (res.id) {
| case 'a2'://点漫游
| this.pointRoam();
| break;
| case 'a3'://线漫游
| this.lineRoam();
| break;
| case 'b2'://表面距离
| this.surfaceDistance();
| break;
| case 'b3'://平面面积
| this.planeDistance();
| break;
| case 'b4'://高程测量
| this.heightMeasure();
| break;
| case 'b5'://垂直高度
| this.verticalHeight();
| break;
| case 'd4'://土方量计算
| this.Volumetric();
| break;
| case 'd5'://影像对比
| this.CurtainContrast();
| break;
| case 'g1'://坐标定位
| this.Coordposition();
| break;
| }
| },
| leftTools(res) {
| this.clearLeftTools()
| switch (res.id) {
| case 'l1':
| break;
| case 'l2':
| break;
| case 'l3'://在线制图
| this.setThematicMap();
| break;
| case 'l4':
| break;
| case 'l5':
| break;
| case 'l6':
| break;
| }
| },
|
| //在线制图
| setThematicMap() {
| // earthCtrl.coreMap.scene.mode = SmartEarth.Cesium.SceneMode.SCENE2D;
| // var handle = new SmartEarth.Cesium.ScreenSpaceEventHandler(earthCtrl.viewer.scene.canvas);
|
| },
|
| //坐标定位
| Coordposition() {
|
| },
| //影像对比
| CurtainContrast() {
| this.toolMenu = earthCtrl.analysis.createCurtainContrast({ leftIndex: 0, rightIndex: 1 })
| },
| //土方量计算
| Volumetric() {
| const Volumetric = earthCtrl.analysis.createVolumetricMeasure({});
| Volumetric.startDrawing();
| },
| //垂直高度
| verticalHeight() {
| earthCtrl.measure.measureHeight(function (e) {
| })
| },
| //高程测量
| heightMeasure() {
| },
| //平面面积
| planeDistance() {
| earthCtrl.analysis.getPlaneArea(function (e) {
| })
| },
| //表面距离
| surfaceDistance() {
| earthCtrl.measure.lineLength(function (e) {
| })
| },
| //点漫游
| pointRoam() {
|
| },
| //线漫游
| lineRoam() {
|
|
| },
|
| //清除方法
| clearTopTools() {
| if (this.toolFlag) {
| switch (this.toolFlag) {
| case 'a2':
|
| break;
| case 'a3':
|
| break;
| case 'b2':
| case 'b3':
| case 'b4':
| case 'b5':
|
| break;
| case 'd5':
| debugger
| this.toolMenu.removeFromMap()
| break;
| }
| // this.toolFlag = null;
| this.toolMenu = null;
| }
| },
| clearLeftTools() {
|
| },
|
| }
| export default menuTool;
|
|