@kq_npm/client3d_webgl_vue 3.7.0-beta → 3.7.1-beta

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.
@@ -2390,13 +2390,13 @@ AspectAnalysis.install = (Vue, opts) => {
2390
2390
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2391
2391
  /* harmony export */ "Z": function() { return /* binding */ BaseterrainGalleryViewModel; }
2392
2392
  /* harmony export */ });
2393
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
2393
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
2394
2394
 
2395
2395
  //地形淹没分析逻辑类
2396
2396
  class BaseterrainGalleryViewModel {
2397
2397
  //基本地形对象
2398
2398
  constructor(viewer) {
2399
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_baseterrainGallery", {});
2399
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_baseterrainGallery", {});
2400
2400
 
2401
2401
  this._baseterrainGallery.viewer = viewer;
2402
2402
  this._baseterrainGallery.viewer.scene.globe.depthTestAgainstTerrain = false;
@@ -5975,16 +5975,16 @@ ClientPrint.install = (Vue, opts) => {
5975
5975
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5976
5976
  /* harmony export */ "Z": function() { return /* binding */ CompareMapViewModel; }
5977
5977
  /* harmony export */ });
5978
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
5978
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
5979
5979
 
5980
5980
  //多窗口逻辑类
5981
5981
  class CompareMapViewModel {
5982
5982
  // 三维视图对象
5983
5983
  //三维viewer对象
5984
5984
  constructor(scenceView) {
5985
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_scenceView", null);
5985
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_scenceView", null);
5986
5986
 
5987
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
5987
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
5988
5988
 
5989
5989
  this._scenceView = scenceView;
5990
5990
  this._viewer = scenceView._viewer;
@@ -6426,13 +6426,13 @@ CompareMap.install = (Vue, opts) => {
6426
6426
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6427
6427
  /* harmony export */ "Z": function() { return /* binding */ CompassViewModel; }
6428
6428
  /* harmony export */ });
6429
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
6429
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
6430
6430
 
6431
6431
  // 重置视图
6432
6432
  class CompassViewModel {
6433
6433
  //三维viewer对象
6434
6434
  constructor(viewer) {
6435
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
6435
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
6436
6436
 
6437
6437
  this._viewer = viewer;
6438
6438
  } //重置方向
@@ -7272,13 +7272,13 @@ ExcavateFillAnalysis.install = (Vue, opts) => {
7272
7272
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7273
7273
  /* harmony export */ "Z": function() { return /* binding */ FixedZoomin3dViewModel; }
7274
7274
  /* harmony export */ });
7275
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
7275
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
7276
7276
 
7277
7277
  // 三维固定缩放逻辑
7278
7278
  class FixedZoomin3dViewModel {
7279
7279
  //三维viewer对象
7280
7280
  constructor(viewer) {
7281
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
7281
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
7282
7282
 
7283
7283
  this._viewer = viewer;
7284
7284
  } //获取相机焦点
@@ -7477,13 +7477,13 @@ FixedZoomin.install = (Vue, opts) => {
7477
7477
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7478
7478
  /* harmony export */ "Z": function() { return /* binding */ FixedZoomout3dViewModel; }
7479
7479
  /* harmony export */ });
7480
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
7480
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
7481
7481
 
7482
7482
  // 三维固定缩放逻辑
7483
7483
  class FixedZoomout3dViewModel {
7484
7484
  //三维viewer对象
7485
7485
  constructor(viewer) {
7486
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
7486
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
7487
7487
 
7488
7488
  this._viewer = viewer;
7489
7489
  } //获取相机焦点
@@ -7682,16 +7682,16 @@ FixedZoomout.install = (Vue, opts) => {
7682
7682
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7683
7683
  /* harmony export */ "Z": function() { return /* binding */ FlightViewModel; }
7684
7684
  /* harmony export */ });
7685
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
7685
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
7686
7686
 
7687
7687
  //飞行操作类
7688
7688
  class FlightViewModel {
7689
7689
  //飞行三维对象
7690
7690
  //停止事件
7691
7691
  constructor(viewer) {
7692
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_animationPath", null);
7692
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_animationPath", null);
7693
7693
 
7694
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "stopEvent", null);
7694
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "stopEvent", null);
7695
7695
 
7696
7696
  this._animationPath = new Cesium.Kq3dAnimationPath(viewer);
7697
7697
  this.stopEvent = this._animationPath.stoped;
@@ -7964,6 +7964,7 @@ const __default__ = {
7964
7964
  dataList = JSON.parse(JSON.stringify(dataList));
7965
7965
  dataList.forEach(path => {
7966
7966
  path.isPlaying = false;
7967
+ path.isRepeat = false;
7967
7968
  pathList.push(path);
7968
7969
  });
7969
7970
  });
@@ -8049,7 +8050,9 @@ const __default__ = {
8049
8050
  }
8050
8051
 
8051
8052
  viewModel.play();
8052
- item.isPlaying = true;
8053
+ item.isPlaying = true; // 设置循环播放
8054
+
8055
+ viewModel.setAutoRepeat(item.isRepeat);
8053
8056
  } //路径播放暂停
8054
8057
 
8055
8058
 
@@ -8065,9 +8068,12 @@ const __default__ = {
8065
8068
  } //循环播放
8066
8069
 
8067
8070
 
8068
- function repeat() {
8069
- var isRepeat = viewModel.getAutoRepeat();
8070
- viewModel.setAutoRepeat(!isRepeat);
8071
+ function repeat(item) {
8072
+ item.isRepeat = !item.isRepeat;
8073
+
8074
+ if (item.isPlaying) {
8075
+ viewModel.setAutoRepeat(item.isRepeat);
8076
+ }
8071
8077
  } //显示更多功能菜单
8072
8078
 
8073
8079
 
@@ -8414,17 +8420,17 @@ const __default__ = {
8414
8420
  /* PROPS, DYNAMIC_SLOTS */
8415
8421
  , ["onClick", "title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
8416
8422
  size: 16,
8417
- class: "menuIcon",
8418
- onClick: repeat,
8423
+ class: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.normalizeClass)(item.isRepeat ? 'kq-icon-light' : ''),
8424
+ onClick: $event => repeat(item),
8419
8425
  title: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).repeat
8420
8426
  }, {
8421
8427
  default: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withCtx)(() => [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(client_icons_vue_.IconVideoRepeat))]),
8422
- _: 1
8423
- /* STABLE */
8428
+ _: 2
8429
+ /* DYNAMIC */
8424
8430
 
8425
- }, 8
8426
- /* PROPS */
8427
- , ["title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
8431
+ }, 1032
8432
+ /* PROPS, DYNAMIC_SLOTS */
8433
+ , ["class", "onClick", "title"]), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)(_component_kq_icon, {
8428
8434
  size: 16,
8429
8435
  class: "menuIcon",
8430
8436
  onClick: (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.withModifiers)($event => showDropDownMenu(item, index), ["prevent", "stop"]),
@@ -10721,13 +10727,13 @@ GPUSpatialQuery.install = (Vue, opts) => {
10721
10727
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10722
10728
  /* harmony export */ "Z": function() { return /* binding */ HawkeyeViewModel; }
10723
10729
  /* harmony export */ });
10724
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
10730
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
10725
10731
 
10726
10732
  //鹰眼逻辑类
10727
10733
  class HawkeyeViewModel {
10728
10734
  //鹰眼三维对象
10729
10735
  constructor(scenceView, options) {
10730
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_overviewMap", null);
10736
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_overviewMap", null);
10731
10737
 
10732
10738
  options.viewer = scenceView._viewer;
10733
10739
  options.centerRectColor = Cesium.Color.fromCssColorString(options.centerColor || "#0000ff").withAlpha(options.centerColorAlpha || 0.5);
@@ -13553,7 +13559,7 @@ IsolineAnalysis.install = (Vue, opts) => {
13553
13559
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13554
13560
  /* harmony export */ "Z": function() { return /* binding */ MeasureViewModel; }
13555
13561
  /* harmony export */ });
13556
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
13562
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
13557
13563
 
13558
13564
  //测量操作类
13559
13565
  class MeasureViewModel {
@@ -13561,13 +13567,13 @@ class MeasureViewModel {
13561
13567
  //测量事件
13562
13568
  //活动事件
13563
13569
  constructor(viewer) {
13564
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
13570
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
13565
13571
 
13566
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_measureHandler", null);
13572
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_measureHandler", null);
13567
13573
 
13568
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "measureEvent", null);
13574
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "measureEvent", null);
13569
13575
 
13570
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "activeEvent", null);
13576
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "activeEvent", null);
13571
13577
 
13572
13578
  //开启深度检测
13573
13579
  viewer.scene.globe.depthTestAgainstTerrain = true;
@@ -13964,7 +13970,7 @@ const __default__ = {
13964
13970
 
13965
13971
  if (res.measureResult && res.measureResult.labels && res.measureResult.labels.length > 0) {
13966
13972
  res.measureResult.labels._labels.forEach(label => {
13967
- label.text = label.text.replace('X', language.value.longitude).replace('Y', language.value.latitude).replace('Z', language.value.height);
13973
+ label.text = label.text.replace('X', language.value.longitude).replace('Y', language.value.latitude).replace('Z', language.value.elevation);
13968
13974
  });
13969
13975
  }
13970
13976
  }
@@ -14337,7 +14343,7 @@ const __default__ = {
14337
14343
  /* TEXT */
14338
14344
  ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_28, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(result).latitude), 1
14339
14345
  /* TEXT */
14340
- ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_29, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).height), 1
14346
+ ), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createElementVNode)("p", _hoisted_29, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.toDisplayString)((0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.unref)(language).elevation), 1
14341
14347
  /* TEXT */
14342
14348
  ), (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
14343
14349
  /* TEXT */
@@ -16744,7 +16750,7 @@ PlaneClip.install = (Vue, opts) => {
16744
16750
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
16745
16751
  /* harmony export */ "Z": function() { return /* binding */ ProfileAnalysisViewModel; }
16746
16752
  /* harmony export */ });
16747
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
16753
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
16748
16754
 
16749
16755
  //分析逻辑类
16750
16756
  let floatingPoint;
@@ -16757,15 +16763,15 @@ class ProfileAnalysisViewModel {
16757
16763
  //显示结果的DOM元素显隐
16758
16764
  //全局参数对象
16759
16765
  constructor(scenceView, viewModel, chart) {
16760
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_profileAnalysis", null);
16766
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_profileAnalysis", null);
16761
16767
 
16762
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_ProfileAnalysisChart", null);
16768
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_ProfileAnalysisChart", null);
16763
16769
 
16764
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_ProfileAnalysisChartVis", null);
16770
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_ProfileAnalysisChartVis", null);
16765
16771
 
16766
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_language", null);
16772
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_language", null);
16767
16773
 
16768
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_globaOptions", {
16774
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_globaOptions", {
16769
16775
  width: 360,
16770
16776
  height: 360
16771
16777
  });
@@ -17595,13 +17601,13 @@ ProfileAnalysis.install = (Vue, opts) => {
17595
17601
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17596
17602
  /* harmony export */ "Z": function() { return /* binding */ ResetViewViewModel; }
17597
17603
  /* harmony export */ });
17598
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
17604
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
17599
17605
 
17600
17606
  // 重置视图
17601
17607
  class ResetViewViewModel {
17602
17608
  //三维viewer对象
17603
17609
  constructor(viewer) {
17604
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
17610
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
17605
17611
 
17606
17612
  this._viewer = viewer;
17607
17613
  } //重置视角
@@ -17750,7 +17756,7 @@ ResetView.install = (Vue, opts) => {
17750
17756
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17751
17757
  /* harmony export */ "Z": function() { return /* binding */ RollerViewModel; }
17752
17758
  /* harmony export */ });
17753
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
17759
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
17754
17760
 
17755
17761
  //卷帘逻辑类
17756
17762
  class RollerViewModel {
@@ -17764,23 +17770,23 @@ class RollerViewModel {
17764
17770
  //左右卷帘活动状态
17765
17771
  //上下卷帘活动状态
17766
17772
  constructor(scenceView, options) {
17767
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
17773
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
17768
17774
 
17769
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_layerManager", null);
17775
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_layerManager", null);
17770
17776
 
17771
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_layers", []);
17777
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_layers", []);
17772
17778
 
17773
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_lrSlider", null);
17779
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_lrSlider", null);
17774
17780
 
17775
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_tbSlider", null);
17781
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_tbSlider", null);
17776
17782
 
17777
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_lrSliderHandler", null);
17783
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_lrSliderHandler", null);
17778
17784
 
17779
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_tbSliderHandler", null);
17785
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_tbSliderHandler", null);
17780
17786
 
17781
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_lrSliderActive", false);
17787
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_lrSliderActive", false);
17782
17788
 
17783
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_tbSliderActive", false);
17789
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_tbSliderActive", false);
17784
17790
 
17785
17791
  this._viewer = scenceView._viewer;
17786
17792
  this._layerManager = scenceView._layerManager;
@@ -18352,7 +18358,7 @@ Roller.install = (Vue, opts) => {
18352
18358
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
18353
18359
  /* harmony export */ "Z": function() { return /* binding */ ScreenshotViewModel; }
18354
18360
  /* harmony export */ });
18355
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
18361
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
18356
18362
 
18357
18363
  //截图逻辑类
18358
18364
  class ScreenshotViewModel {
@@ -18360,11 +18366,11 @@ class ScreenshotViewModel {
18360
18366
  //截图存储参数对象
18361
18367
  //截图三维对象
18362
18368
  constructor(viewer, options) {
18363
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
18369
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
18364
18370
 
18365
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_options", null);
18371
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_options", null);
18366
18372
 
18367
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_cameraToImage", null);
18373
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_cameraToImage", null);
18368
18374
 
18369
18375
  this._options = {
18370
18376
  width: options.imgWidth,
@@ -23487,15 +23493,15 @@ TerrainOperation.install = (Vue, opts) => {
23487
23493
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23488
23494
  /* harmony export */ "Z": function() { return /* binding */ UndergroundViewModel; }
23489
23495
  /* harmony export */ });
23490
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
23496
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
23491
23497
 
23492
23498
  class UndergroundViewModel {
23493
23499
  // 三维viewer对象
23494
23500
  // 地下模式三维管理对象
23495
23501
  constructor(viewer) {
23496
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
23502
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
23497
23503
 
23498
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_undergroundManager", null);
23504
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_undergroundManager", null);
23499
23505
 
23500
23506
  this._viewer = viewer;
23501
23507
  this._undergroundManager = new Cesium.Kq3dUndergroundManager(this._viewer.scene);
@@ -23699,7 +23705,7 @@ Underground.install = (Vue, opts) => {
23699
23705
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
23700
23706
  /* harmony export */ "Z": function() { return /* binding */ ViewshedAnalysisViewModel; }
23701
23707
  /* harmony export */ });
23702
- /* harmony import */ var D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
23708
+ /* harmony import */ var _Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8270);
23703
23709
 
23704
23710
  //可视域分析逻辑类
23705
23711
  class ViewshedAnalysisViewModel {
@@ -23707,11 +23713,11 @@ class ViewshedAnalysisViewModel {
23707
23713
  //三维场景对象
23708
23714
  //可视域分析存储参数对象
23709
23715
  constructor(scenceView, options) {
23710
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewshedAnalysis", null);
23716
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewshedAnalysis", null);
23711
23717
 
23712
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_scene", null);
23718
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_scene", null);
23713
23719
 
23714
- (0,D_kqgis_client_vue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_options", null);
23720
+ (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_options", null);
23715
23721
 
23716
23722
  this._scene = scenceView._viewer.scene;
23717
23723
  this._scene.globe.depthTestAgainstTerrain = true;
@@ -25948,13 +25954,12 @@ class DrawManager {
25948
25954
  text: {
25949
25955
  text: "文字标注",
25950
25956
  //文字内容
25951
- fontSize: 30,
25957
+ fontSize: 25,
25952
25958
  //文字大小
25953
- color: "#ff0000",
25954
- //文字颜色
25955
- opacity: 0.5,
25956
- //文字颜色透明度
25957
- clampToGround: false //是否贴地
25959
+ fontFamily: 'Microsoft YaHei',
25960
+ color: "#ff0000" //文字颜色
25961
+ // opacity: 0.5, //文字颜色透明度
25962
+ // clampToGround: false //是否贴地
25958
25963
 
25959
25964
  },
25960
25965
  //点-图标样式
@@ -25965,8 +25970,9 @@ class DrawManager {
25965
25970
  //图标宽度
25966
25971
  height: 32,
25967
25972
  //图标高度
25968
- clampToGround: true //是否贴地
25969
-
25973
+ clampToGround: true,
25974
+ //是否贴地
25975
+ disableDepthTestDistance: Number.POSITIVE_INFINITY
25970
25976
  },
25971
25977
  //折线样式
25972
25978
  polyline: {
@@ -26107,22 +26113,65 @@ class DrawManager {
26107
26113
  transparent: true
26108
26114
  });
26109
26115
  return material;
26116
+ }
26117
+
26118
+ getImageWithColor(imgUrl, color, width = 32, height = 32) {
26119
+ if (color) {
26120
+ var svgStr = window.atob(imgUrl.split(',')[1]);
26121
+ var regex = /#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/g; // 修改svg颜色
26122
+
26123
+ svgStr = svgStr.replace(regex, color); // 修改svg大小
26124
+
26125
+ svgStr = svgStr.replace('width="16"', 'width="' + width + '"').replace('height="16"', 'height="' + height + '"');
26126
+ imgUrl = "data:image/svg+xml;base64," + window.btoa(svgStr);
26127
+ }
26128
+
26129
+ return imgUrl;
26110
26130
  } //开始绘制
26111
26131
 
26112
26132
 
26113
26133
  startDraw(type, options, callback, groupName) {
26114
- this._viewer.scene.globe.depthTestAgainstTerrain = true;
26134
+ if (!options) options = {};
26115
26135
 
26116
26136
  if (type === "point") {
26117
26137
  type = "marker";
26118
- options.disableDepthTestDistance = Number.POSITIVE_INFINITY;
26119
26138
  }
26120
26139
 
26121
- if (!options) options = {};
26122
- var unionOptions = JSON.parse(JSON.stringify(this._drawStyle[type]));
26140
+ if (type === "coloricon") {
26141
+ type = "marker";
26142
+ options.iconSize = [32, 32];
26143
+ options.iconUrl = const_image_.LABEL_SVG_ICONS[0];
26144
+ options.image = this.getImageWithColor(const_image_.LABEL_SVG_ICONS[0], options.color);
26145
+ }
26146
+
26147
+ if (type === "text") {
26148
+ this._viewer.scene.globe.depthTestAgainstTerrain = false;
26149
+ } else {
26150
+ this._viewer.scene.globe.depthTestAgainstTerrain = true;
26151
+ }
26152
+
26153
+ var unionOptions = { ...this._drawStyle[type],
26154
+ ...options
26155
+ };
26156
+
26157
+ if (type === "polyline") {
26158
+ //标记组件使用
26159
+ options.opacity = 1;
26160
+ }
26161
+
26162
+ if (type === "text") {
26163
+ //标记组件使用
26164
+ options.fontSize = this._drawStyle.text.fontSize;
26165
+ options.fontFamily = this._drawStyle.text.fontFamily;
26166
+ options.content = this._drawStyle.text.text;
26167
+ options.is3D = true;
26168
+ }
26123
26169
 
26124
- for (var key in options) {
26125
- unionOptions[key] = options[key];
26170
+ if (type === "polyline" || type === "polygon") {
26171
+ //标记组件使用
26172
+ if (unionOptions.hasOwnProperty("weight")) {
26173
+ unionOptions.width = unionOptions.weight;
26174
+ }
26126
26175
  }
26127
26176
 
26128
26177
  if (unionOptions.hasOwnProperty("color")) {
@@ -26135,24 +26184,31 @@ class DrawManager {
26135
26184
 
26136
26185
  this._drawHandler.startDraw(type, type, unionOptions);
26137
26186
 
26138
- if (callback) {
26139
- var that = this;
26140
- var removeEventListener = this.drawFinishedEvent.addEventListener(shape => {
26141
- if (groupName) shape.groupName = groupName;
26142
- that._viewer.scene.globe.depthTestAgainstTerrain = false;
26187
+ var that = this;
26188
+ var removeEventListener = this.drawFinishedEvent.addEventListener(shape => {
26189
+ if (groupName) shape.groupName = groupName;
26190
+
26191
+ if (shape.type === "text") {
26192
+ setTimeout(() => {
26193
+ shape._label.disableDepthTestDistance = Number.POSITIVE_INFINITY;
26194
+ }, 200);
26195
+ }
26196
+
26197
+ shape.options = options;
26198
+
26199
+ if (callback) {
26143
26200
  var feature = that.shapeToGeoFeature(shape);
26144
26201
  callback(feature.geometry, {
26145
26202
  layer: shape.guid
26146
26203
  });
26147
- removeEventListener();
26148
- });
26149
- }
26204
+ }
26205
+
26206
+ removeEventListener();
26207
+ });
26150
26208
  }
26151
26209
 
26152
26210
  stopDraw() {
26153
26211
  this._drawHandler.stopDraw();
26154
-
26155
- this._viewer.scene.globe.depthTestAgainstTerrain = false;
26156
26212
  } //是否启用连续绘制
26157
26213
 
26158
26214
 
@@ -26217,7 +26273,9 @@ class DrawManager {
26217
26273
  var that = this;
26218
26274
 
26219
26275
  if (shape) {
26220
- if (shape.type === that._drawHandler.ShapeTypes.MARKER.type) {
26276
+ if (shape.controlPoints && shape.controlPoints.length === 0) return shape;
26277
+
26278
+ if (shape.type === that._drawHandler.ShapeTypes.MARKER.type || shape.type === that._drawHandler.ShapeTypes.TEXT.type) {
26221
26279
  let position = that.transformPosition(shape._position);
26222
26280
  geoFeature = window.turf.point(position);
26223
26281
  } else if (shape.type === that._drawHandler.ShapeTypes.CIRCLE.type) {
@@ -26235,12 +26293,14 @@ class DrawManager {
26235
26293
  });
26236
26294
  geoFeature = window.turf.lineStrings(position).features[0];
26237
26295
  } else if (shape.type === that._drawHandler.ShapeTypes.RECTANGLE.type) {
26238
- let minX = shape.rectangle.west / Math.PI * 180;
26239
- let maxX = shape.rectangle.east / Math.PI * 180;
26240
- let minY = shape.rectangle.south / Math.PI * 180;
26241
- let maxY = shape.rectangle.north / Math.PI * 180;
26242
- let positions1 = [[[minX, minY], [minX, maxY], [maxX, maxY], [maxX, minY], [minX, minY]]];
26243
- geoFeature = window.turf.polygon(positions1);
26296
+ if (shape.rectangle) {
26297
+ let minX = shape.rectangle.west / Math.PI * 180;
26298
+ let maxX = shape.rectangle.east / Math.PI * 180;
26299
+ let minY = shape.rectangle.south / Math.PI * 180;
26300
+ let maxY = shape.rectangle.north / Math.PI * 180;
26301
+ let positions1 = [[[minX, minY], [minX, maxY], [maxX, maxY], [maxX, minY], [minX, minY]]];
26302
+ geoFeature = window.turf.polygon(positions1);
26303
+ }
26244
26304
  } else if (shape.type === that._drawHandler.ShapeTypes.POLYGON.type) {
26245
26305
  let positions = [[]];
26246
26306
  let posi;
@@ -26489,23 +26549,221 @@ class DrawManager {
26489
26549
  let primitive = this._drawLayer.getById(id);
26490
26550
 
26491
26551
  if (!primitive) return;
26492
- let type = primitive.geoType;
26493
-
26494
- if (type === 'point') {// 绘制点暂时不需要修改样式
26552
+ let type = primitive._geoType;
26553
+
26554
+ if (primitive.type === 'text') {
26555
+ primitive.fontSize = style.fontSize;
26556
+ primitive.fontFamily = style.fontFamily;
26557
+ primitive.text = style.content;
26558
+ primitive.fillColor = Cesium.Color.fromCssColorString(style.color);
26559
+ } else if (type === 'point') {
26560
+ primitive.image = this.getImageWithColor(style.iconUrl, style.color, style.iconSize[0], style.iconSize[1]);
26561
+ primitive.width = style.iconSize[0];
26562
+ primitive.height = style.iconSize[1];
26495
26563
  } else if (type === 'polyline' || type === 'polygon') {
26496
26564
  if (style.weight) primitive.width = style.weight;
26497
26565
  if (style.color) primitive.color = Cesium.Color.fromCssColorString(style.color);
26498
26566
  if (style.dashArray) primitive.dashArray = style.dashArray;
26567
+ if (style.opacity) primitive.color = primitive.color.withAlpha(style.opacity);
26499
26568
  }
26500
26569
 
26501
26570
  if (type === 'polygon') {
26502
- primitive.fill = style.fill;
26571
+ primitive.fill = style.fill === undefined ? true : style.fill;
26503
26572
 
26504
- if (style.fill) {
26573
+ if (primitive.fill) {
26505
26574
  let opacity = style.fillOpacity || this._drawStyle.polygon.fillOpacity;
26506
26575
  if (style.fillColor) primitive.fillColor = Cesium.Color.fromCssColorString(style.fillColor).withAlpha(opacity);
26507
26576
  }
26577
+ } // 存储绘图样式, 标记组件使用
26578
+
26579
+
26580
+ primitive.options = style;
26581
+ }
26582
+
26583
+ getShapeTypeById(id) {
26584
+ let type = '';
26585
+
26586
+ let primitive = this._drawLayer.getById(id);
26587
+
26588
+ if (primitive) {
26589
+ type = primitive.type;
26590
+ if (type == 'marker') type = 'Marker';
26591
+ if (type == 'polyline') type = 'Line';
26592
+ if (type == 'polygon') type = 'Polygon';
26593
+ if (type == 'rectangle') type = 'Rectangle';
26594
+ if (type == 'circle') type = 'Circle';
26595
+ if (type == 'text') type = 'Text';
26508
26596
  }
26597
+
26598
+ return type;
26599
+ }
26600
+
26601
+ getShapeStyle(id) {
26602
+ let primitive = this._drawLayer.getById(id);
26603
+
26604
+ if (primitive) {
26605
+ return primitive.options;
26606
+ }
26607
+ }
26608
+
26609
+ getShapeInfo(id) {
26610
+ let primitive = this._drawLayer.getById(id);
26611
+
26612
+ if (!primitive) return;
26613
+ let type = this.getShapeTypeById(id);
26614
+ let info = null;
26615
+ let options = primitive.options;
26616
+
26617
+ if (type == "Marker") {
26618
+ info = {
26619
+ coordinate: primitive.position,
26620
+ style: {
26621
+ iconSize: options.iconSize,
26622
+ iconUrl: options.iconUrl,
26623
+ color: options.color
26624
+ }
26625
+ };
26626
+ } else if (type == "Line") {
26627
+ info = {
26628
+ coordinate: primitive.controlPoints,
26629
+ style: {
26630
+ opacity: options.opacity,
26631
+ color: options.color,
26632
+ weight: options.weight,
26633
+ dashArray: options.dashArray
26634
+ }
26635
+ };
26636
+ } else if (type == "Polygon" || type == "Rectangle" || type == "Circle") {
26637
+ info = {
26638
+ coordinate: primitive.controlPoints,
26639
+ style: {
26640
+ fillColor: options.fillColor,
26641
+ fillOpacity: options.fillOpacity,
26642
+ color: options.color,
26643
+ weight: options.weight
26644
+ }
26645
+ };
26646
+ } else if (type == "Text") {
26647
+ info = {
26648
+ coordinate: primitive.position,
26649
+ style: {
26650
+ fontSize: options.fontSize,
26651
+ fontFamily: options.fontFamily,
26652
+ color: options.color,
26653
+ content: options.content,
26654
+ is3D: true
26655
+ }
26656
+ };
26657
+ }
26658
+
26659
+ return info;
26660
+ }
26661
+
26662
+ getJsonByLayerList(layerList) {
26663
+ let items = [];
26664
+
26665
+ for (let i = 0; i < layerList.length; i++) {
26666
+ const layer = layerList[i];
26667
+ const name = layer.name || "";
26668
+ const info = this.getShapeInfo(layer.layer);
26669
+ items.push({
26670
+ name: name,
26671
+ info: info,
26672
+ shape: layer.shape
26673
+ });
26674
+ }
26675
+
26676
+ return JSON.stringify(items);
26677
+ }
26678
+
26679
+ createShapeByInfo(info, type) {
26680
+ let shape = null;
26681
+
26682
+ if (type == "Marker") {
26683
+ shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.MARKER.type, '', {
26684
+ position: info.coordinate,
26685
+ disableDepthTestDistance: Number.POSITIVE_INFINITY,
26686
+ width: info.style.iconSize[0],
26687
+ height: info.style.iconSize[1],
26688
+ image: this.getImageWithColor(info.style.iconUrl, info.style.color, info.style.iconSize[0], info.style.iconSize[1])
26689
+ });
26690
+ } else if (type == "Line") {
26691
+ shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.POLYLINE.type, '', {
26692
+ controlPoints: info.coordinate,
26693
+ color: Cesium.Color.fromCssColorString(info.style.color).withAlpha(info.style.opacity),
26694
+ width: info.style.weight,
26695
+ dashArray: info.style.dashArray,
26696
+ clampToGround: true
26697
+ });
26698
+ } else if (type == "Polygon") {
26699
+ shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.POLYGON.type, '', {
26700
+ controlPoints: info.coordinate,
26701
+ color: Cesium.Color.fromCssColorString(info.style.color),
26702
+ width: info.style.weight,
26703
+ fillColor: Cesium.Color.fromCssColorString(info.style.fillColor).withAlpha(info.style.fillOpacity),
26704
+ fill: true,
26705
+ clampToGround: true
26706
+ });
26707
+ } else if (type == "Rectangle") {
26708
+ shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.RECTANGLE.type, '', {
26709
+ controlPoints: info.coordinate,
26710
+ color: Cesium.Color.fromCssColorString(info.style.color),
26711
+ width: info.style.weight,
26712
+ fillColor: Cesium.Color.fromCssColorString(info.style.fillColor).withAlpha(info.style.fillOpacity),
26713
+ fill: true,
26714
+ clampToGround: true
26715
+ });
26716
+ } else if (type == "Circle") {
26717
+ shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.CIRCLE.type, '', {
26718
+ controlPoints: info.coordinate,
26719
+ color: Cesium.Color.fromCssColorString(info.style.color),
26720
+ width: info.style.weight,
26721
+ fillColor: Cesium.Color.fromCssColorString(info.style.fillColor).withAlpha(info.style.fillOpacity),
26722
+ fill: true,
26723
+ clampToGround: true
26724
+ });
26725
+ } else if (type == "Text") {
26726
+ shape = this._drawHandler.createShape(this._drawHandler.ShapeTypes.TEXT.type, '', {
26727
+ latlng: info.coordinate,
26728
+ text: info.style.content,
26729
+ fontSize: info.style.fontSize,
26730
+ fontFamily: info.style.fontFamily,
26731
+ color: Cesium.Color.fromCssColorString(info.style.color)
26732
+ });
26733
+ setTimeout(() => {
26734
+ shape._label.disableDepthTestDistance = Number.POSITIVE_INFINITY;
26735
+ }, 200);
26736
+ }
26737
+
26738
+ return shape;
26739
+ }
26740
+
26741
+ createLayerListByJson(items) {
26742
+ let layerList = [];
26743
+
26744
+ for (let i = 0; i < items.length; i++) {
26745
+ const item = items[i];
26746
+ const type = item.shape;
26747
+ let shape = this.createShapeByInfo(item.info, type);
26748
+
26749
+ if (shape) {
26750
+ shape.options = item.info.style;
26751
+
26752
+ this._drawLayer.add(shape);
26753
+
26754
+ layerList.push({
26755
+ name: item.name,
26756
+ shape: type,
26757
+ layer: shape.id
26758
+ });
26759
+ }
26760
+ }
26761
+
26762
+ return layerList;
26763
+ }
26764
+
26765
+ removeGeometryById(id) {
26766
+ this._drawLayer.removeById(id);
26509
26767
  }
26510
26768
  /********** 地理编码通用组件使用 start ************/
26511
26769
  // 绘制点图标自带点击弹出气泡, 地理编码通用组件使用