@kq_npm/client3d_webgl_vue 4.3.3-beta → 4.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/adddata/index.js +4 -35
  2. package/adddata/style/adddata.css +1 -110
  3. package/aspectanalysis/style/aspectanalysis.css +1 -101
  4. package/baseterraingallery/index.js +2 -2
  5. package/baseterraingallery/style/baseterraingallery.css +1 -88
  6. package/boxclip/index.js +0 -10
  7. package/boxclip/style/boxclip.css +1 -97
  8. package/clientPrint/index.js +15 -5
  9. package/clientPrint/style/clientPrint.css +1 -461
  10. package/comparemap/index.js +145 -136
  11. package/comparemap/style/comparemap.css +1 -35
  12. package/compass/index.js +2 -2
  13. package/excavatefillanalysis/index.js +2 -2
  14. package/excavatefillanalysis/style/excavatefillanalysis.css +1 -140
  15. package/fixedzoomin/index.js +2 -2
  16. package/fixedzoomout/index.js +2 -2
  17. package/flight/index.js +3 -13
  18. package/flight/style/flight.css +1 -150
  19. package/floodanalysis/style/floodanalysis.css +1 -95
  20. package/geologicalbodyanalysis/index.js +0 -10
  21. package/geologicalbodyanalysis/style/geologicalbodyanalysis.css +1 -64
  22. package/gpuspatialquery/index.js +0 -10
  23. package/gpuspatialquery/style/gpuspatialquery.css +1 -88
  24. package/hawkeye/index.js +2 -2
  25. package/index.js +1969 -535
  26. package/isolineanalysis/style/isolineanalysis.css +1 -113
  27. package/light/index.js +169 -170
  28. package/light/style/light.css +1 -104
  29. package/limitheightanalysis/index.js +125 -126
  30. package/limitheightanalysis/style/limitheightanalysis.css +1 -88
  31. package/measure/index.js +141 -24
  32. package/measure/style/measure.css +1 -84
  33. package/modelFlat/index.js +0 -10
  34. package/modelFlat/style/modelFlat.css +1 -66
  35. package/modelexcavate/index.js +98 -60
  36. package/modelexcavate/style/modelexcavate.css +1 -66
  37. package/modelfilter/index.js +0 -10
  38. package/modelfilter/style/modelfilter.css +1 -66
  39. package/modelprofileanalysis/index.js +164 -165
  40. package/modelprofileanalysis/style/modelprofileanalysis.css +1 -94
  41. package/modelselect/index.js +0 -10
  42. package/modelselect/style/modelselect.css +1 -28
  43. package/package.json +1 -1
  44. package/particleeffect/index.js +0 -10
  45. package/particleeffect/style/particleeffect.css +1 -94
  46. package/planeclip/index.js +0 -10
  47. package/planeclip/style/planeclip.css +1 -94
  48. package/resetview/index.js +2 -2
  49. package/roller/index.js +170 -171
  50. package/roller/style/roller.css +1 -59
  51. package/scaneffect/index.js +0 -10
  52. package/scaneffect/style/scaneffect.css +1 -101
  53. package/sceneset/index.js +1 -10
  54. package/sceneset/style/sceneset.css +1 -86
  55. package/sceneview/index.js +2029 -567
  56. package/sceneview/style/sceneview.css +1 -127
  57. package/screenshot/index.js +158 -159
  58. package/screenshot/style/screenshot.css +1 -53
  59. package/shadowanalysis/style/shadowanalysis.css +1 -141
  60. package/sightlineanalysis/index.js +5 -7
  61. package/sightlineanalysis/style/divpoint.css +1 -22
  62. package/sightlineanalysis/style/sightlineanalysis.css +1 -85
  63. package/skylineanalysis/style/skylineanalysis.css +1 -100
  64. package/slopeanalysis/index.js +16 -11
  65. package/slopeanalysis/style/slopeanalysis.css +1 -101
  66. package/slopeaspectanalysis/index.js +1512 -0
  67. package/slopeaspectanalysis/style/index.js +3 -0
  68. package/slopeaspectanalysis/style/slopeaspectanalysis.css +1 -0
  69. package/statusbar/index.js +3 -12
  70. package/style.css +1 -3817
  71. package/terrainoperation/index.js +0 -10
  72. package/terrainoperation/style/terrainoperation.css +1 -66
  73. package/terrainprofileanalysis/index.js +0 -10
  74. package/terrainprofileanalysis/style/terrainprofileanalysis.css +1 -83
  75. package/underground/index.js +3 -3
  76. package/underground/style/underground.css +1 -19
  77. package/videofusion/index.js +5 -35
  78. package/videofusion/style/videofusion.css +1 -104
  79. package/videoproject/index.js +5 -35
  80. package/videoproject/style/videoproject.css +1 -104
  81. package/viewshedanalysis/style/viewshedanalysis.css +1 -88
  82. package/weathereffect/style/weathereffect.css +1 -95
  83. package/wireframesketch/index.js +0 -10
  84. package/wireframesketch/style/wireframesketch.css +1 -12
@@ -12,17 +12,133 @@ return /******/ (function() { // webpackBootstrap
12
12
  /******/ "use strict";
13
13
  /******/ var __webpack_modules__ = ({
14
14
 
15
- /***/ 348:
16
- /***/ (function(module) {
15
+ /***/ 1769:
16
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
17
17
 
18
- module.exports = require("@kq_npm/client_icons_vue");
18
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19
+ /* harmony export */ "Z": function() { return /* binding */ LimitHeightAnalysisViewModel; }
20
+ /* harmony export */ });
21
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
22
+
23
+ //限高分析逻辑类
24
+ class LimitHeightAnalysisViewModel {
25
+ //三维viewer对象
26
+ //限高分析存储参数对象
27
+ constructor(scenceView, options) {
28
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
29
+
30
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_options", {});
31
+
32
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_drawManager", null);
33
+
34
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_drawFinishedEventListener", null);
35
+
36
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_limitHeightAnalysis", null);
37
+
38
+ this._viewer = scenceView._viewer;
39
+ this._options = options;
40
+ this._drawManager = scenceView._drawManager;
41
+ this._viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
42
+
43
+ this._viewer.scene.postProcessStages._fxaa.enabled = true;
44
+ var that = this;
45
+ this._drawFinishedEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
46
+ if (shape) {
47
+ that._options.positions = shape._controlPoints;
48
+ that.drawPolygon();
49
+
50
+ that._drawManager.clear();
51
+ }
52
+ });
53
+ } // 绘制限高分析,显示分析体
54
+
55
+
56
+ drawPolygon() {
57
+ if (!this._options.positions) return;
58
+ var newPositions = [];
59
+
60
+ this._options.positions.forEach(item => {
61
+ var newPos = window.Cesium.Cartographic.fromCartesian(item);
62
+ newPositions.push(newPos.longitude);
63
+ newPositions.push(newPos.latitude);
64
+ newPositions.push(newPos.height);
65
+ });
66
+
67
+ var options = {
68
+ viewer: this._viewer,
69
+ baseHeight: Number(this._options.baseHeight),
70
+ limitHeight: Number(this._options.limitHeight),
71
+ limitColor: window.Cesium.Color.fromCssColorString(this._options.limitHeightColor).withAlpha(this._options.limitColorAlpha),
72
+ overColor: window.Cesium.Color.fromCssColorString(this._options.overHeightColor).withAlpha(this._options.overHeightColorAlpha),
73
+ positions: newPositions,
74
+ perPositionHeight: false,
75
+ classificationType: window.Cesium.ClassificationType.CESIUM_3D_TILE
76
+ };
77
+ this._limitHeightAnalysis = new window.Cesium.Kq3dLimitHeightAnalysis(options);
78
+
79
+ this._limitHeightAnalysis.add();
80
+ } // 开始分析
81
+
82
+
83
+ start() {
84
+ this.clear();
85
+
86
+ if (this._drawManager) {
87
+ this._drawManager.startDraw("polygon", {
88
+ clampToGround: true
89
+ });
90
+ }
91
+ } // 修改基底高度
92
+
93
+
94
+ changeBaseHeight(val) {
95
+ this._options.baseHeight = val;
96
+ this.clear();
97
+ this.drawPolygon();
98
+ } // 修改限制高度
99
+
100
+
101
+ changeLimitHeight(val) {
102
+ this._options.limitHeight = val;
103
+ this.clear();
104
+ this.drawPolygon();
105
+ } // 修改限制高度颜色
106
+
107
+
108
+ changeLimitHeightColor(val) {
109
+ this._options.limitHeightColor = val;
110
+ this.clear();
111
+ this.drawPolygon();
112
+ } // 修改超出高度颜色
113
+
114
+
115
+ changeOverHeightColor(val) {
116
+ this._options.overHeightColor = val;
117
+ this.clear();
118
+ this.drawPolygon();
119
+ } // 清除全部
120
+
121
+
122
+ clear() {
123
+ this._limitHeightAnalysis && this._limitHeightAnalysis.remove();
124
+ this._drawManager && this._drawManager.stopDraw();
125
+ } // 销毁
126
+
127
+
128
+ destroy() {
129
+ this.clear();
130
+ this._drawFinishedEventListener && this._drawFinishedEventListener();
131
+ this._drawFinishedEventListener = null;
132
+ }
133
+
134
+ }
19
135
 
20
136
  /***/ }),
21
137
 
22
- /***/ 2118:
138
+ /***/ 348:
23
139
  /***/ (function(module) {
24
140
 
25
- module.exports = require("core-js/modules/es.array.push.js");
141
+ module.exports = require("@kq_npm/client_icons_vue");
26
142
 
27
143
  /***/ }),
28
144
 
@@ -160,7 +276,7 @@ __webpack_require__.r(__webpack_exports__);
160
276
 
161
277
  // EXPORTS
162
278
  __webpack_require__.d(__webpack_exports__, {
163
- "LimitHeightAnalysisViewModel": function() { return /* reexport */ LimitHeightAnalysisViewModel; },
279
+ "LimitHeightAnalysisViewModel": function() { return /* reexport */ LimitHeightAnalysisViewModel/* default */.Z; },
164
280
  "default": function() { return /* reexport */ LimitHeightAnalysis; }
165
281
  });
166
282
 
@@ -170,125 +286,8 @@ var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(
170
286
  var gis_utils_ = __webpack_require__(7135);
171
287
  // EXTERNAL MODULE: external "@kq_npm/client_icons_vue"
172
288
  var client_icons_vue_ = __webpack_require__(348);
173
- // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
174
- var defineProperty = __webpack_require__(8270);
175
- // EXTERNAL MODULE: external "core-js/modules/es.array.push.js"
176
- var es_array_push_js_ = __webpack_require__(2118);
177
- ;// CONCATENATED MODULE: ./src/webgl/limitheightanalysis/LimitHeightAnalysisViewModel.js
178
-
179
-
180
- //限高分析逻辑类
181
- class LimitHeightAnalysisViewModel {
182
- //三维viewer对象
183
- //限高分析存储参数对象
184
- constructor(scenceView, options) {
185
- (0,defineProperty/* default */.Z)(this, "_viewer", null);
186
-
187
- (0,defineProperty/* default */.Z)(this, "_options", {});
188
-
189
- (0,defineProperty/* default */.Z)(this, "_drawManager", null);
190
-
191
- (0,defineProperty/* default */.Z)(this, "_drawFinishedEventListener", null);
192
-
193
- (0,defineProperty/* default */.Z)(this, "_limitHeightAnalysis", null);
194
-
195
- this._viewer = scenceView._viewer;
196
- this._options = options;
197
- this._drawManager = scenceView._drawManager;
198
- this._viewer.scene.globe.depthTestAgainstTerrain = true; //开启深度检测
199
-
200
- this._viewer.scene.postProcessStages._fxaa.enabled = true;
201
- var that = this;
202
- this._drawFinishedEventListener = this._drawManager.drawFinishedEvent.addEventListener(shape => {
203
- if (shape) {
204
- that._options.positions = shape._controlPoints;
205
- that.drawPolygon();
206
-
207
- that._drawManager.clear();
208
- }
209
- });
210
- } // 绘制限高分析,显示分析体
211
-
212
-
213
- drawPolygon() {
214
- if (!this._options.positions) return;
215
- var newPositions = [];
216
-
217
- this._options.positions.forEach(item => {
218
- var newPos = window.Cesium.Cartographic.fromCartesian(item);
219
- newPositions.push(newPos.longitude);
220
- newPositions.push(newPos.latitude);
221
- newPositions.push(newPos.height);
222
- });
223
-
224
- var options = {
225
- viewer: this._viewer,
226
- baseHeight: Number(this._options.baseHeight),
227
- limitHeight: Number(this._options.limitHeight),
228
- limitColor: window.Cesium.Color.fromCssColorString(this._options.limitHeightColor).withAlpha(this._options.limitColorAlpha),
229
- overColor: window.Cesium.Color.fromCssColorString(this._options.overHeightColor).withAlpha(this._options.overHeightColorAlpha),
230
- positions: newPositions,
231
- perPositionHeight: false,
232
- classificationType: window.Cesium.ClassificationType.CESIUM_3D_TILE
233
- };
234
- this._limitHeightAnalysis = new window.Cesium.Kq3dLimitHeightAnalysis(options);
235
-
236
- this._limitHeightAnalysis.add();
237
- } // 开始分析
238
-
239
-
240
- start() {
241
- this.clear();
242
-
243
- if (this._drawManager) {
244
- this._drawManager.startDraw("polygon", {
245
- clampToGround: true
246
- });
247
- }
248
- } // 修改基底高度
249
-
250
-
251
- changeBaseHeight(val) {
252
- this._options.baseHeight = val;
253
- this.clear();
254
- this.drawPolygon();
255
- } // 修改限制高度
256
-
257
-
258
- changeLimitHeight(val) {
259
- this._options.limitHeight = val;
260
- this.clear();
261
- this.drawPolygon();
262
- } // 修改限制高度颜色
263
-
264
-
265
- changeLimitHeightColor(val) {
266
- this._options.limitHeightColor = val;
267
- this.clear();
268
- this.drawPolygon();
269
- } // 修改超出高度颜色
270
-
271
-
272
- changeOverHeightColor(val) {
273
- this._options.overHeightColor = val;
274
- this.clear();
275
- this.drawPolygon();
276
- } // 清除全部
277
-
278
-
279
- clear() {
280
- this._limitHeightAnalysis && this._limitHeightAnalysis.remove();
281
- this._drawManager && this._drawManager.stopDraw();
282
- } // 销毁
283
-
284
-
285
- destroy() {
286
- this.clear();
287
- this._drawFinishedEventListener && this._drawFinishedEventListener();
288
- this._drawFinishedEventListener = null;
289
- }
290
-
291
- }
289
+ // EXTERNAL MODULE: ./src/webgl/limitheightanalysis/LimitHeightAnalysisViewModel.js
290
+ var LimitHeightAnalysisViewModel = __webpack_require__(1769);
292
291
  // EXTERNAL MODULE: external "@kq_npm/client_common_vue/_utils/util"
293
292
  var util_ = __webpack_require__(3458);
294
293
  // EXTERNAL MODULE: external "vue-i18n/dist/vue-i18n.cjs.js"
@@ -414,7 +413,7 @@ const __default__ = {
414
413
 
415
414
  gis_utils_.utils.getWebMap(null, scenceView => {
416
415
  if (scenceView) {
417
- viewModel = new LimitHeightAnalysisViewModel(scenceView, {
416
+ viewModel = new LimitHeightAnalysisViewModel/* default */.Z(scenceView, {
418
417
  baseHeight: formItem.baseHeight,
419
418
  limitHeight: formItem.limitHeight,
420
419
  limitHeightColor: formItem.limitHeightColor,
@@ -1,88 +1 @@
1
- .kq3d-limitheight-analysis {
2
- z-index: 999;
3
- border-radius: var(--kq-border-radius-base);
4
- padding: 16px;
5
- pointer-events: auto;
6
- cursor: default;
7
- background-color: var(--kq-bg-color);
8
- }
9
- .kq3d-limitheight-analysis .kq3d-limitheight-analysis-box {
10
- width: 372px;
11
- }
12
- .kq3d-limitheight-analysis .kq3d-limitheight-analysis-tip {
13
- color: var(--kq-text-color-regular);
14
- font-size: var(--kq-font-size-base);
15
- }
16
- .kq3d-limitheight-analysis .kq3d-limitheight-analysis-tip p {
17
- margin-top: 0px;
18
- margin-bottom: 16px;
19
- }
20
- .kq3d-limitheight-analysis .kq-collapse {
21
- border: unset;
22
- }
23
- .kq3d-limitheight-analysis .kq-collapse .kq-collapse-item__header {
24
- border: unset;
25
- height: 38px;
26
- background-color: var(--kq-fill-color-light);
27
- font-weight: bold;
28
- padding: 0px 16px;
29
- font-size: 16px;
30
- }
31
- .kq3d-limitheight-analysis .kq-collapse .kq-collapse-item__arrow {
32
- margin: 0 0px 0 auto;
33
- }
34
- .kq3d-limitheight-analysis .kq-collapse .kq-collapse-item__wrap .kq-collapse-item__content {
35
- padding-bottom: unset;
36
- border: unset;
37
- padding-top: 10px;
38
- }
39
- .kq3d-limitheight-analysis .kq-form-item {
40
- margin-bottom: 8px;
41
- }
42
- .kq3d-limitheight-analysis .kq-form-item__content {
43
- text-align: end;
44
- display: block;
45
- }
46
- .kq3d-limitheight-analysis .kq-row {
47
- display: block;
48
- }
49
- .kq3d-limitheight-analysis .kq-slider {
50
- width: 95%;
51
- padding-left: 7px;
52
- }
53
- .kq3d-limitheight-analysis .kq-slider .kq-slider__button {
54
- width: 14px;
55
- height: 14px;
56
- }
57
- .kq3d-limitheight-analysis .kq-input-number {
58
- width: 65px;
59
- }
60
- .kq3d-limitheight-analysis .kq-input-number .kq-input-number__increase,
61
- .kq3d-limitheight-analysis .kq-input-number .kq-input-number__decrease {
62
- width: 20px;
63
- }
64
- .kq3d-limitheight-analysis .kq-input-number .kq-input__wrapper {
65
- padding-left: 0px;
66
- padding-right: 20px;
67
- }
68
- .kq3d-limitheight-analysis .kq-col-8 .kq-input-number .kq-input__wrapper {
69
- padding-left: 0px;
70
- padding-right: 20px;
71
- }
72
- .kq3d-limitheight-analysis .kq-color-picker {
73
- width: 100%;
74
- }
75
- .kq3d-limitheight-analysis .kq-color-picker .kq-color-picker__mask {
76
- width: 100%;
77
- }
78
- .kq3d-limitheight-analysis .kq-color-picker .kq-color-picker__trigger {
79
- width: 100%;
80
- }
81
- .kq3d-limitheight-analysis .kq3d-limitheight-analysis-footer {
82
- text-align: right;
83
- padding: 16px 0px 0px;
84
- }
85
-
86
- .cesium-viewer-cesiumWidgetContainer .twipsy {
87
- display: none !important;
88
- }
1
+ .kq3d-limitheight-analysis{z-index:999;border-radius:var(--kq-border-radius-base);padding:16px;pointer-events:auto;cursor:default;background-color:var(--kq-bg-color)}.kq3d-limitheight-analysis .kq3d-limitheight-analysis-box{width:372px}.kq3d-limitheight-analysis .kq3d-limitheight-analysis-tip{color:var(--kq-text-color-regular);font-size:var(--kq-font-size-base)}.kq3d-limitheight-analysis .kq3d-limitheight-analysis-tip p{margin-top:0;margin-bottom:16px}.kq3d-limitheight-analysis .kq-collapse{border:unset}.kq3d-limitheight-analysis .kq-collapse .kq-collapse-item__header{border:unset;height:38px;background-color:var(--kq-fill-color-light);font-weight:700;padding:0 16px;font-size:16px}.kq3d-limitheight-analysis .kq-collapse .kq-collapse-item__arrow{margin:0 0 0 auto}.kq3d-limitheight-analysis .kq-collapse .kq-collapse-item__wrap .kq-collapse-item__content{padding-bottom:unset;border:unset;padding-top:10px}.kq3d-limitheight-analysis .kq-form-item{margin-bottom:8px}.kq3d-limitheight-analysis .kq-form-item__content{text-align:end;display:block}.kq3d-limitheight-analysis .kq-row{display:block}.kq3d-limitheight-analysis .kq-slider{width:95%;padding-left:7px}.kq3d-limitheight-analysis .kq-slider .kq-slider__button{width:14px;height:14px}.kq3d-limitheight-analysis .kq-input-number{width:65px}.kq3d-limitheight-analysis .kq-input-number .kq-input-number__decrease,.kq3d-limitheight-analysis .kq-input-number .kq-input-number__increase{width:20px}.kq3d-limitheight-analysis .kq-col-8 .kq-input-number .kq-input__wrapper,.kq3d-limitheight-analysis .kq-input-number .kq-input__wrapper{padding-left:0;padding-right:20px}.kq3d-limitheight-analysis .kq-color-picker,.kq3d-limitheight-analysis .kq-color-picker .kq-color-picker__mask,.kq3d-limitheight-analysis .kq-color-picker .kq-color-picker__trigger{width:100%}.kq3d-limitheight-analysis .kq3d-limitheight-analysis-footer{text-align:right;padding:16px 0 0}.cesium-viewer-cesiumWidgetContainer .twipsy{display:none!important}
package/measure/index.js CHANGED
@@ -45,7 +45,7 @@ index_full_js_namespaceObject.ElMessage.install = (Vue, opts) => {
45
45
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
46
46
  /* harmony export */ "Z": function() { return /* binding */ MeasureViewModel; }
47
47
  /* harmony export */ });
48
- /* harmony import */ var G_0929_zl_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
48
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
49
49
 
50
50
  //测量操作类
51
51
  class MeasureViewModel {
@@ -53,13 +53,15 @@ class MeasureViewModel {
53
53
  //测量事件
54
54
  //活动事件
55
55
  constructor(viewer) {
56
- (0,G_0929_zl_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
56
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
57
57
 
58
- (0,G_0929_zl_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_measureHandler", null);
58
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_measureHandler", null);
59
59
 
60
- (0,G_0929_zl_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "measureEvent", null);
60
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "measureEvent", null);
61
61
 
62
- (0,G_0929_zl_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "activeEvent", null);
62
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "activeEvent", null);
63
+
64
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "nauticalMileUnit", "nmi");
63
65
 
64
66
  this._measureHandler = new Cesium.Kq3dMeasureHandler(viewer);
65
67
  this._viewer = viewer;
@@ -169,8 +171,8 @@ class MeasureViewModel {
169
171
  newValue = (value / 1000).toFixed(2) + " km";
170
172
  break;
171
173
 
172
- case "nmi":
173
- newValue = (value / 1852).toFixed(2) + " nmi";
174
+ case this.nauticalMileUnit:
175
+ newValue = (value / 1852).toFixed(2) + " " + this.nauticalMileUnit;
174
176
  break;
175
177
 
176
178
  case "m²":
@@ -509,6 +511,22 @@ const _hoisted_32 = {
509
511
  const _hoisted_33 = {
510
512
  class: "res"
511
513
  };
514
+ const _hoisted_34 = {
515
+ class: "tit"
516
+ };
517
+ const _hoisted_35 = {
518
+ class: "res"
519
+ };
520
+ const _hoisted_36 = {
521
+ key: 3,
522
+ class: "result"
523
+ };
524
+ const _hoisted_37 = {
525
+ class: "tit"
526
+ };
527
+ const _hoisted_38 = {
528
+ class: "res"
529
+ };
512
530
 
513
531
 
514
532
 
@@ -572,11 +590,15 @@ const __default__ = {
572
590
 
573
591
  let isActive = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(null);
574
592
  let isResult = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
575
- let distanceValue = null;
576
- let distanceUnit = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(props.settingParams && props.settingParams.distanceUnit || ""); // 单位
593
+ let isTips = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(false);
594
+ let distanceValue = null; // 默认显示距离的单位
595
+
596
+ let distanceUnit = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(props.settingParams && props.settingParams.distanceUnit || ""); // 海里单位选择
597
+
598
+ let nauticalMileUnit = props.settingParams && props.settingParams.nauticalMileUnit || "nmi"; // 面积单位
577
599
 
578
600
  let areaUnit = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(props.settingParams && props.settingParams.areaUnit || "");
579
- let result = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("0");
601
+ let result = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)(0);
580
602
  let language = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)({});
581
603
  let mode = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)("space");
582
604
  let modeList = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.ref)([]);
@@ -606,7 +628,7 @@ const __default__ = {
606
628
  value: "m"
607
629
  }, {
608
630
  label: language.value.nauticalMile,
609
- value: "nmi"
631
+ value: nauticalMileUnit
610
632
  }];
611
633
  };
612
634
 
@@ -647,7 +669,8 @@ const __default__ = {
647
669
  });
648
670
  gis_utils_.utils.getWebMap(props.target, scenceView => {
649
671
  if (scenceView) {
650
- viewModel = new MeasureViewModel/* default */.Z(scenceView._viewer); //注册测量事件,以获取测量结果
672
+ viewModel = new MeasureViewModel/* default */.Z(scenceView._viewer);
673
+ viewModel.nauticalMileUnit = nauticalMileUnit; //注册测量事件,以获取测量结果
651
674
 
652
675
  viewModel.measureEvent.addEventListener(function (res) {
653
676
  if (measureType.value === "distance") {
@@ -681,7 +704,10 @@ const __default__ = {
681
704
  }
682
705
  } else if (measureType.value === "azimuth" && res) {
683
706
  if (res.positions && res.positions.length > 0) {
684
- result.value = res.azimuth.toFixed(4) + " °";
707
+ result.value = {
708
+ azimuth: res.azimuth.toFixed(4),
709
+ distance: res.distance.toFixed(2)
710
+ };
685
711
  } else result.value = 0;
686
712
  } else if (measureType.value === "slope" && res) {
687
713
  if (res.positions && res.positions.length > 0) {
@@ -706,8 +732,6 @@ const __default__ = {
706
732
  };
707
733
  }
708
734
 
709
- viewModel.stopMeasure();
710
-
711
735
  if (res.measureResult && res.measureResult.labels && res.measureResult.labels.length > 0) {
712
736
  res.measureResult.labels._labels.forEach(label => {
713
737
  label.text = label.text.replace('X', language.value.longitude).replace('Y', language.value.latitude).replace('Z', language.value.elevation).replace(/\n/g, '°\n');
@@ -722,12 +746,52 @@ const __default__ = {
722
746
  });
723
747
  viewModel.activeEvent.addEventListener(function (active) {
724
748
  if (!active) {
725
- isActive.value = null;
749
+ // isActive.value = null;
750
+ isTips.value = false;
751
+ if (result.value === 0) return;
726
752
  if (measureType.value === "height" && result.value.angle === 0) return;
727
753
  if (measureType.value === "azimuth" && result.value === 0) return;
728
754
  isResult.value = true;
729
755
  }
730
756
  });
757
+ let handler = new Cesium.ScreenSpaceEventHandler(scenceView._viewer.scene.canvas);
758
+ handler.setInputAction(function () {
759
+ if (!viewModel._measureHandler.active) return;
760
+ let isDrawing = viewModel._measureHandler.isDrawing;
761
+
762
+ if (!isDrawing) {
763
+ let measureResults = viewModel._measureHandler.measureResults;
764
+
765
+ if (measureResults && measureResults.length > 0) {
766
+ measureResults[0].destroy();
767
+ }
768
+
769
+ if (measureType.value === "coordinate") {
770
+ isTips.value = false;
771
+ isResult.value = true;
772
+ } else {
773
+ isTips.value = true;
774
+ isResult.value = false;
775
+ }
776
+ }
777
+
778
+ if (isDrawing) {
779
+ if (measureType.value !== 'distance' && measureType.value !== 'area') {
780
+ continueMeasure();
781
+ }
782
+ }
783
+ }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
784
+ handler.setInputAction(function () {
785
+ let isDrawing = viewModel._measureHandler.isDrawing;
786
+
787
+ if (!isDrawing) {
788
+ isActive.value = null;
789
+ viewModel.stopMeasure();
790
+ } else {
791
+ continueMeasure();
792
+ }
793
+ }, Cesium.ScreenSpaceEventType.RIGHT_CLICK);
794
+ window.measureClickHandler = handler;
731
795
  }
732
796
  });
733
797
  }); // 经纬度转度分秒
@@ -824,8 +888,8 @@ const __default__ = {
824
888
  newValue = (value / 1000).toFixed(2) + " km";
825
889
  break;
826
890
 
827
- case "nmi":
828
- newValue = (value / 1852).toFixed(2) + " nmi";
891
+ case nauticalMileUnit:
892
+ newValue = (value / 1852).toFixed(2) + " " + nauticalMileUnit;
829
893
  break;
830
894
 
831
895
  case "m²":
@@ -854,6 +918,11 @@ const __default__ = {
854
918
 
855
919
  (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.onBeforeUnmount)(() => {
856
920
  clearMeasure();
921
+
922
+ if (window.measureClickHandler) {
923
+ window.measureClickHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
924
+ window.measureClickHandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK);
925
+ }
857
926
  }); //开始测量
858
927
 
859
928
  function startMeasure(type) {
@@ -878,6 +947,8 @@ const __default__ = {
878
947
  }
879
948
 
880
949
  viewModel.clear();
950
+ result.value = 0;
951
+ isTips.value = true;
881
952
  isResult.value = false;
882
953
  measureType.value = type;
883
954
  isActive.value = type;
@@ -916,6 +987,44 @@ const __default__ = {
916
987
  break;
917
988
  }
918
989
  }
990
+
991
+ function continueMeasure() {
992
+ setTimeout(() => {
993
+ switch (measureType.value) {
994
+ case "distance":
995
+ viewModel.distanceMeasure(mode.value);
996
+ break;
997
+
998
+ case "area":
999
+ viewModel.areaMeasure(mode.value);
1000
+ break;
1001
+
1002
+ case "height":
1003
+ viewModel.heightMeasure();
1004
+ break;
1005
+
1006
+ case "coordinate":
1007
+ viewModel.coordinateMeasure();
1008
+ break;
1009
+
1010
+ case "azimuth":
1011
+ viewModel.azimuthMeasure();
1012
+ break;
1013
+
1014
+ case "slope":
1015
+ if (mode.value === "ground") {
1016
+ viewModel.terrainSlopeMeasure();
1017
+ } else if (mode.value === "model") {
1018
+ viewModel.sceneSlopeMeasure();
1019
+ }
1020
+
1021
+ break;
1022
+
1023
+ default:
1024
+ break;
1025
+ }
1026
+ }, 300);
1027
+ }
919
1028
  /**
920
1029
  * 清除测量
921
1030
  */
@@ -925,6 +1034,7 @@ const __default__ = {
925
1034
  viewModel && viewModel.clear();
926
1035
  measureType.value = null;
927
1036
  isActive.value = null;
1037
+ isTips.value = false;
928
1038
  isResult.value = false;
929
1039
  }
930
1040
 
@@ -962,8 +1072,7 @@ const __default__ = {
962
1072
  /* TEXT */
963
1073
  ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_select, {
964
1074
  modelValue: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(mode),
965
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(mode) ? mode.value = $event : mode = $event),
966
- disabled: !!(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive)
1075
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.isRef)(mode) ? mode.value = $event : mode = $event)
967
1076
  }, {
968
1077
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(true), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)(external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.Fragment, null, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderList)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(modeList), item => {
969
1078
  return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)(_component_kq_option, {
@@ -981,7 +1090,7 @@ const __default__ = {
981
1090
 
982
1091
  }, 8
983
1092
  /* PROPS */
984
- , ["modelValue", "disabled"])])]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_5, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
1093
+ , ["modelValue"])])]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("div", _hoisted_5, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_button, {
985
1094
  onClick: _cache[1] || (_cache[1] = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => startMeasure('distance'), ["stop"])),
986
1095
  class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive) == 'distance' ? 'is-active' : null),
987
1096
  title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).distance
@@ -1109,7 +1218,7 @@ const __default__ = {
1109
1218
 
1110
1219
  }, 8
1111
1220
  /* PROPS */
1112
- , ["onClick", "title"])]), !!(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isActive) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_6, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_divider), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType) === 'height' || (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType) === 'azimuth' ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("p", _hoisted_7, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).measureTips1), 1
1221
+ , ["onClick", "title"])]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(isTips) ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_6, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_divider), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType) === 'height' || (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType) === 'azimuth' ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("p", _hoisted_7, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).measureTips1), 1
1113
1222
  /* TEXT */
1114
1223
  )) : ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("p", _hoisted_8, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).measureTips), 1
1115
1224
  /* TEXT */
@@ -1189,9 +1298,17 @@ const __default__ = {
1189
1298
  /* TEXT */
1190
1299
  ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_30, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result).height) + " m", 1
1191
1300
  /* TEXT */
1192
- )])) : ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_31, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_32, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language)[(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType)]), 1
1301
+ )])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType) === 'azimuth' ? ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_31, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_32, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).azimuth), 1
1302
+ /* TEXT */
1303
+ ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_33, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result).azimuth) + " °", 1
1304
+ /* TEXT */
1305
+ ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_34, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).distance), 1
1306
+ /* TEXT */
1307
+ ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_35, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result).distance) + " m", 1
1308
+ /* TEXT */
1309
+ )])) : ((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementBlock)("div", _hoisted_36, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_37, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language)[(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(measureType)]), 1
1193
1310
  /* TEXT */
1194
- ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_33, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result)), 1
1311
+ ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_38, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result)), 1
1195
1312
  /* TEXT */
1196
1313
  )]))])])])) : (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createCommentVNode)("v-if", true)])], 2
1197
1314
  /* CLASS */