@kq_npm/client3d_webgl_vue 4.2.8-beta → 4.3.0

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.
@@ -24,13 +24,21 @@ return /******/ (function() { // webpackBootstrap
24
24
  class CompareMapViewModel {
25
25
  // 三维视图对象
26
26
  //三维viewer对象
27
- constructor(scenceView) {
27
+ constructor(scenceView, options = {}) {
28
28
  (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_scenceView", null);
29
29
 
30
30
  (0,_Users_zpc_Documents_KQGEOSpace_KQGISClientForVue_node_modules_babel_runtime_helpers_esm_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(this, "_viewer", null);
31
31
 
32
32
  this._scenceView = scenceView;
33
33
  this._viewer = scenceView._viewer;
34
+
35
+ if (options.splitLineColor) {
36
+ this._viewer.scene.splitLineColor = Cesium.Color.fromCssColorString(options.splitLineColor);
37
+ }
38
+
39
+ if (options.splitLineWidth) {
40
+ this._viewer.scene.splitLineWidth = options.splitLineWidth;
41
+ }
34
42
  } //切换窗口模式
35
43
 
36
44
 
@@ -452,6 +460,13 @@ const CompareMapvue_type_script_setup_true_lang_js_default_ = {
452
460
  defaultSelectAll: {
453
461
  type: Boolean,
454
462
  default: true
463
+ },
464
+ splitLineColor: {
465
+ type: String
466
+ },
467
+ splitLineWidth: {
468
+ type: Number,
469
+ default: 2
455
470
  }
456
471
  },
457
472
  emits: ["back"],
@@ -490,7 +505,11 @@ const CompareMapvue_type_script_setup_true_lang_js_default_ = {
490
505
  offsetTop.value = props.offsetTop;
491
506
  gis_utils_.utils.getWebMap(null, scenceView => {
492
507
  if (scenceView) {
493
- viewModel = new CompareMapViewModel/* default */.Z(scenceView);
508
+ let options = {
509
+ splitLineColor: props.splitLineColor,
510
+ splitLineWidth: props.splitLineWidth
511
+ };
512
+ viewModel = new CompareMapViewModel/* default */.Z(scenceView, options);
494
513
  }
495
514
  });
496
515
  }); //切换窗口模式
package/hawkeye/index.js CHANGED
@@ -32,17 +32,16 @@ class HawkeyeViewModel {
32
32
  }
33
33
 
34
34
  init(options) {
35
- if (!options.layers) {
36
- // let layers = [];
37
- // options.viewer.imageryLayers._layers.forEach(function (layer) {
38
- // layers.push(layer._imageryProvider);
39
- // });
40
- // options.layers = layers;
41
- options.layers = new Cesium.Kq3dArcGISMapServerImageryProvider({
42
- url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
43
- });
44
- }
45
-
35
+ // if(!options.layers) {
36
+ // let layers = [];
37
+ // options.viewer.imageryLayers._layers.forEach(function (layer) {
38
+ // layers.push(layer);
39
+ // });
40
+ // options.layers = layers;
41
+ // options.layers = new Cesium.Kq3dArcGISMapServerImageryProvider({
42
+ // url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
43
+ // });
44
+ // }
46
45
  this._overviewMap = new Cesium.Kq3dOverviewMap(options);
47
46
  } //显示
48
47
 
@@ -54,6 +53,17 @@ class HawkeyeViewModel {
54
53
 
55
54
  hide() {
56
55
  this._overviewMap.show = false;
56
+ } // 设置图层
57
+
58
+
59
+ setLayers(layers) {
60
+ if (Array.isArray(layers)) {
61
+ this._overviewMap._viewer.imageryLayers.removeAll();
62
+
63
+ layers.forEach(layer => {
64
+ this._overviewMap._viewer.imageryLayers.add(layer);
65
+ });
66
+ }
57
67
  } //销毁
58
68
 
59
69
 
@@ -273,6 +283,10 @@ const __default__ = {
273
283
 
274
284
  function hide() {
275
285
  viewModel && viewModel.hide();
286
+ }
287
+
288
+ function setLayers(layers) {
289
+ viewModel && viewModel.setLayers(layers);
276
290
  } // 销毁
277
291
 
278
292
 
@@ -281,7 +295,8 @@ const __default__ = {
281
295
  });
282
296
  expose({
283
297
  show,
284
- hide
298
+ hide,
299
+ setLayers
285
300
  });
286
301
  return (_ctx, _cache) => {
287
302
  return null;