@mapgis/webclient-vue-cesium 16.2.0 → 16.2.1

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 (27) hide show
  1. package/dist-libs/webclient-vue-cesium.common.js +173354 -0
  2. package/dist-libs/webclient-vue-cesium.css +1 -1
  3. package/dist-libs/webclient-vue-cesium.umd.js +173364 -0
  4. package/dist-libs/webclient-vue-cesium.umd.min.js +6 -6
  5. package/package.json +88 -88
  6. package/src/component.js +132 -131
  7. package/src/components/Analysis/Contour.vue +1 -1
  8. package/src/components/Analysis/Explosion.vue +352 -0
  9. package/src/components/Analysis/Flood.vue +47 -40
  10. package/src/components/Analysis/HeightLimited.vue +156 -124
  11. package/src/components/Analysis/ModelFlatten.vue +1 -1
  12. package/src/components/Analysis/Profile.vue +8 -7
  13. package/src/components/Analysis/SkyLine.vue +2 -5
  14. package/src/components/Layer/IGServer/IgsDynamicLayer.vue +1 -1
  15. package/src/components/Layer/M3D/3DTilesetOptions.js +5 -5
  16. package/src/components/Layer/M3D/M3d.vue +80 -46
  17. package/src/components/Layer/Marker/DynamicMarkerLayer.vue +22 -13
  18. package/src/components/Overlay/mapv/MapvBaseLayer.js +34 -33
  19. package/src/components/Overlay/mapv/MapvLayer.js +132 -123
  20. package/src/components/Overlay/particle/ParticleEffects.vue +1 -0
  21. package/src/components/Overlay/themeLayer/M3DSubSectionLayer.vue +4 -0
  22. package/src/components/SceneEffect/components/BasicSetting.vue +9 -1
  23. package/src/components/SceneEffect/components/LightSetting.vue +1 -1
  24. package/src/components/UI/Popup/components/PopupFeatureDetail.vue +1 -1
  25. package/src/components/WebGlobe/ViewpointManager.vue +10 -8
  26. package/src/components/WebGlobe/manager.js +6 -6
  27. package/src/components/simulation/PondingSimulation.vue +842 -845
@@ -1,4 +1,4 @@
1
- import {MapvBaseLayer} from "./MapvBaseLayer";
1
+ import { MapvBaseLayer } from "./MapvBaseLayer";
2
2
 
3
3
  let idIndex = 0;
4
4
 
@@ -89,7 +89,7 @@ export class MapvLayer {
89
89
  }
90
90
 
91
91
  initDevicePixelRatio() {
92
- this.devicePixelRatio = window.devicePixelRatio || 1;
92
+ this.devicePixelRatio = 1;
93
93
  }
94
94
 
95
95
  addInnerContainer() {
@@ -296,94 +296,100 @@ export class MapvLayer {
296
296
  return this;
297
297
  }
298
298
 
299
- _createCanvas() {
300
- var canvas = document.createElement("canvas");
301
- canvas.id = this.mapVOptions.layerid || "mapv" + idIndex++;
302
- canvas.style.position = "absolute";
303
- canvas.style.top = "0px";
304
- canvas.style.left = "0px";
305
-
306
- canvas.style.pointerEvents = "none";
307
- canvas.style.zIndex = this.mapVOptions.zIndex || 100;
308
-
309
- if (window.Cesium.VERSION > 1.59) {
310
- if (this.mapVOptions.draw === "cluster" || this.mapVOptions.draw === "heatmap") {
311
- canvas.width =
312
- parseInt(this.map.canvas.width) * this.devicePixelRatio ||
313
- parseInt(this.map.container.offsetWidth);
314
- canvas.height =
315
- parseInt(this.map.canvas.height) * this.devicePixelRatio ||
316
- parseInt(this.map.container.offsetHeight);
317
- } else {
318
- canvas.width =
319
- parseInt(this.map.canvas.width) ||
320
- parseInt(this.map.container.offsetWidth);
321
- canvas.height =
322
- parseInt(this.map.canvas.height) ||
323
- parseInt(this.map.container.offsetHeight);
324
- }
325
- } else {
326
- canvas.width =
327
- parseInt(this.map.canvas.width) ||
328
- parseInt(this.map.container.offsetWidth) * this.devicePixelRatio;
329
- canvas.height =
330
- parseInt(this.map.canvas.height) ||
331
- parseInt(this.map.container.offsetHeight) * this.devicePixelRatio;
332
- var devicePixelRatio = this.devicePixelRatio;
333
- if (this.mapVOptions.context == "2d") {
334
- canvas.getContext("2d").scale(devicePixelRatio, devicePixelRatio);
335
- }
336
- }
337
- return canvas;
299
+ _createCanvas() {
300
+ var canvas = document.createElement("canvas");
301
+ canvas.id = this.mapVOptions.layerid || "mapv" + idIndex++;
302
+ canvas.style.position = "absolute";
303
+ canvas.style.top = "0px";
304
+ canvas.style.left = "0px";
305
+
306
+ canvas.style.pointerEvents = "none";
307
+ canvas.style.zIndex = this.mapVOptions.zIndex || 100;
308
+
309
+ if (window.Cesium.VERSION > 1.59) {
310
+ if (
311
+ this.mapVOptions.draw === "cluster" ||
312
+ this.mapVOptions.draw === "heatmap"
313
+ ) {
314
+ canvas.width =
315
+ parseInt(this.map.canvas.width) * this.devicePixelRatio ||
316
+ parseInt(this.map.container.offsetWidth);
317
+ canvas.height =
318
+ parseInt(this.map.canvas.height) * this.devicePixelRatio ||
319
+ parseInt(this.map.container.offsetHeight);
320
+ } else {
321
+ canvas.width =
322
+ parseInt(this.map.canvas.width) ||
323
+ parseInt(this.map.container.offsetWidth);
324
+ canvas.height =
325
+ parseInt(this.map.canvas.height) ||
326
+ parseInt(this.map.container.offsetHeight);
327
+ }
328
+ } else {
329
+ canvas.width =
330
+ parseInt(this.map.canvas.width) ||
331
+ parseInt(this.map.container.offsetWidth) * this.devicePixelRatio;
332
+ canvas.height =
333
+ parseInt(this.map.canvas.height) ||
334
+ parseInt(this.map.container.offsetHeight) * this.devicePixelRatio;
335
+ var devicePixelRatio = this.devicePixelRatio;
336
+ if (this.mapVOptions.context == "2d") {
337
+ canvas.getContext("2d").scale(devicePixelRatio, devicePixelRatio);
338
+ }
338
339
  }
340
+ return canvas;
341
+ }
339
342
 
340
- _creteWidgetCanvas() {
341
- var canvas = document.createElement("canvas");
342
-
343
- canvas.id = this.mapVOptions.layerid || "mapv" + idIndex++;
344
- canvas.style.position = "absolute";
345
- canvas.style.top = "0px";
346
- canvas.style.left = "0px";
347
-
348
- canvas.style.pointerEvents = "none";
349
- canvas.style.zIndex = this.mapVOptions.zIndex || 100;
350
- if (window.Cesium.VERSION > 1.59) {
351
- if (this.mapVOptions.draw === "cluster" || this.mapVOptions.draw === "heatmap") {
352
- canvas.width =
353
- parseInt(this.map.canvas.width) * this.devicePixelRatio ||
354
- parseInt(this.map.container.offsetWidth);
355
- canvas.height =
356
- parseInt(this.map.canvas.height) * this.devicePixelRatio ||
357
- parseInt(this.map.container.offsetHeight);
358
- } else {
359
- canvas.width =
360
- parseInt(this.map.canvas.width) ||
361
- parseInt(this.map.container.offsetWidth);
362
- canvas.height =
363
- parseInt(this.map.canvas.height) ||
364
- parseInt(this.map.container.offsetHeight);
365
- }
366
- } else {
367
- canvas.width =
368
- parseInt(this.map.canvas.width) ||
369
- parseInt(this.map.container.offsetWidth) * this.devicePixelRatio;
370
- canvas.height =
371
- parseInt(this.map.canvas.height) ||
372
- parseInt(this.map.container.offsetHeight) * this.devicePixelRatio;
373
- var devicePixelRatio = this.devicePixelRatio;
374
- if (this.mapVOptions.context == "2d") {
375
- canvas.getContext("2d").scale(devicePixelRatio, devicePixelRatio);
376
- }
377
- }
378
- return canvas;
343
+ _creteWidgetCanvas() {
344
+ var canvas = document.createElement("canvas");
345
+
346
+ canvas.id = this.mapVOptions.layerid || "mapv" + idIndex++;
347
+ canvas.style.position = "absolute";
348
+ canvas.style.top = "0px";
349
+ canvas.style.left = "0px";
350
+
351
+ canvas.style.pointerEvents = "none";
352
+ canvas.style.zIndex = this.mapVOptions.zIndex || 100;
353
+ if (window.Cesium.VERSION > 1.59) {
354
+ if (
355
+ this.mapVOptions.draw === "cluster" ||
356
+ this.mapVOptions.draw === "heatmap"
357
+ ) {
358
+ canvas.width =
359
+ parseInt(this.map.canvas.width) * this.devicePixelRatio ||
360
+ parseInt(this.map.container.offsetWidth);
361
+ canvas.height =
362
+ parseInt(this.map.canvas.height) * this.devicePixelRatio ||
363
+ parseInt(this.map.container.offsetHeight);
364
+ } else {
365
+ canvas.width =
366
+ parseInt(this.map.canvas.width) ||
367
+ parseInt(this.map.container.offsetWidth);
368
+ canvas.height =
369
+ parseInt(this.map.canvas.height) ||
370
+ parseInt(this.map.container.offsetHeight);
371
+ }
372
+ } else {
373
+ canvas.width =
374
+ parseInt(this.map.canvas.width) ||
375
+ parseInt(this.map.container.offsetWidth) * this.devicePixelRatio;
376
+ canvas.height =
377
+ parseInt(this.map.canvas.height) ||
378
+ parseInt(this.map.container.offsetHeight) * this.devicePixelRatio;
379
+ var devicePixelRatio = this.devicePixelRatio;
380
+ if (this.mapVOptions.context == "2d") {
381
+ canvas.getContext("2d").scale(devicePixelRatio, devicePixelRatio);
382
+ }
379
383
  }
384
+ return canvas;
385
+ }
380
386
 
381
- _reset() {
382
- this.resizeCanvas();
383
- this.fixPosition();
384
- this.onResize();
385
- this.render();
386
- }
387
+ _reset() {
388
+ this.resizeCanvas();
389
+ this.fixPosition();
390
+ this.onResize();
391
+ this.render();
392
+ }
387
393
 
388
394
  /**
389
395
  * 强制重回图层
@@ -441,44 +447,47 @@ export class MapvLayer {
441
447
  this.updateData(opt.data, opt.options);
442
448
  }
443
449
 
444
- resizeCanvas() {
445
- //this.mapContainer.style.perspective = this.map.transform.cameraToCenterDistance + 'px';
446
- if (this.canvas == undefined || this.canvas == null) return;
447
- var canvas = this.canvas;
448
- canvas.style.position = "absolute";
449
- canvas.style.top = "0px";
450
- canvas.style.left = "0px";
451
- canvas.style.width = parseInt(this.map.container.offsetWidth) + "px";
452
- canvas.style.height = parseInt(this.map.container.offsetHeight) + "px";
453
- if (window.Cesium.VERSION > 1.59) {
454
- if (this.mapVOptions.draw === "cluster" || this.mapVOptions.draw === "heatmap") {
455
- canvas.width =
456
- parseInt(this.map.canvas.width) * this.devicePixelRatio ||
457
- parseInt(this.map.container.offsetWidth);
458
- canvas.height =
459
- parseInt(this.map.canvas.height) * this.devicePixelRatio ||
460
- parseInt(this.map.container.offsetHeight);
461
- } else {
462
- canvas.width =
463
- parseInt(this.map.canvas.width) ||
464
- parseInt(this.map.container.offsetWidth);
465
- canvas.height =
466
- parseInt(this.map.canvas.height) ||
467
- parseInt(this.map.container.offsetHeight);
468
- }
469
- } else {
470
- canvas.width =
471
- parseInt(this.map.canvas.width) ||
472
- parseInt(this.map.container.offsetWidth) * this.devicePixelRatio;
473
- canvas.height =
474
- parseInt(this.map.canvas.height) ||
475
- parseInt(this.map.container.offsetHeight) * this.devicePixelRatio;
476
- var devicePixelRatio = this.devicePixelRatio;
477
- if (this.mapVOptions.context == "2d") {
478
- canvas.getContext("2d").scale(devicePixelRatio, devicePixelRatio);
479
- }
480
- }
450
+ resizeCanvas() {
451
+ //this.mapContainer.style.perspective = this.map.transform.cameraToCenterDistance + 'px';
452
+ if (this.canvas == undefined || this.canvas == null) return;
453
+ var canvas = this.canvas;
454
+ canvas.style.position = "absolute";
455
+ canvas.style.top = "0px";
456
+ canvas.style.left = "0px";
457
+ canvas.style.width = parseInt(this.map.container.offsetWidth) + "px";
458
+ canvas.style.height = parseInt(this.map.container.offsetHeight) + "px";
459
+ if (window.Cesium.VERSION > 1.59) {
460
+ if (
461
+ this.mapVOptions.draw === "cluster" ||
462
+ this.mapVOptions.draw === "heatmap"
463
+ ) {
464
+ canvas.width =
465
+ parseInt(this.map.canvas.width) * this.devicePixelRatio ||
466
+ parseInt(this.map.container.offsetWidth);
467
+ canvas.height =
468
+ parseInt(this.map.canvas.height) * this.devicePixelRatio ||
469
+ parseInt(this.map.container.offsetHeight);
470
+ } else {
471
+ canvas.width =
472
+ parseInt(this.map.canvas.width) ||
473
+ parseInt(this.map.container.offsetWidth);
474
+ canvas.height =
475
+ parseInt(this.map.canvas.height) ||
476
+ parseInt(this.map.container.offsetHeight);
477
+ }
478
+ } else {
479
+ canvas.width =
480
+ parseInt(this.map.canvas.width) ||
481
+ parseInt(this.map.container.offsetWidth) * this.devicePixelRatio;
482
+ canvas.height =
483
+ parseInt(this.map.canvas.height) ||
484
+ parseInt(this.map.container.offsetHeight) * this.devicePixelRatio;
485
+ var devicePixelRatio = this.devicePixelRatio;
486
+ if (this.mapVOptions.context == "2d") {
487
+ canvas.getContext("2d").scale(devicePixelRatio, devicePixelRatio);
488
+ }
481
489
  }
490
+ }
482
491
 
483
492
  fixPosition() {}
484
493
 
@@ -149,6 +149,7 @@
149
149
  class="mapgis-ui-number-style"
150
150
  size="large"
151
151
  label="发射速率(个/秒)"
152
+ :range="[2, 60]"
152
153
  v-model="emissionRateCopy"
153
154
  @change="val => onChangeEffect(val, 'emissionRate')"
154
155
  />
@@ -1,3 +1,7 @@
1
+ <template>
2
+ <div></div>
3
+ </template>
4
+
1
5
  <script>
2
6
  import VueOptions from "../../Base/Vue/VueOptions";
3
7
  export default {
@@ -456,9 +456,17 @@ export default {
456
456
 
457
457
  handleChangeStatebar(next) {
458
458
  // console.log(next);
459
+ const { viewer } = this;
459
460
  this.basicSetting.statebar = next;
460
461
  const vm = this;
461
-
462
+ viewer.statebar = this.basicSetting.statebar;
463
+ let statebars = document.getElementsByClassName("mapgis-3d-statebar")
464
+ if(viewer.statebar){
465
+ statebars[0].style.display="block"
466
+ }else{
467
+ statebars[0].style.display="none"
468
+ }
469
+
462
470
  // 改变状态栏的上下位置
463
471
  if (vm.basicSetting.timeline) {
464
472
  vm.$nextTick(function() {
@@ -8,7 +8,7 @@
8
8
  >
9
9
  <mapgis-ui-form layout="vertical">
10
10
  <mapgis-ui-form-item label="光照类型">
11
- <mapgis-ui-select v-model="lightingMode">
11
+ <mapgis-ui-select v-model="lightingModes[0].key">
12
12
  <mapgis-ui-select-option :value="'DAYNIGHT_SHADING'">
13
13
  太阳光照
14
14
  </mapgis-ui-select-option>
@@ -264,7 +264,7 @@ export default {
264
264
  getFileTypeByName(name) {
265
265
  const typeArr = name.split(".");
266
266
  if (typeArr && typeArr.length > 1) {
267
- return typeArr[1];
267
+ return typeArr[typeArr.length-1];
268
268
  }
269
269
  return "";
270
270
  }
@@ -622,9 +622,9 @@ export default {
622
622
  ::v-deep .mapgis-ui-collapse-content-box {
623
623
  padding: 0;
624
624
  }
625
- ::v-deep .mapgis-ui-collapse .mapgis-ui-collapse-item {
626
- border-bottom: 0;
627
- }
625
+ // ::v-deep .mapgis-ui-collapse .mapgis-ui-collapse-item {
626
+ // border-bottom: 0;
627
+ // }
628
628
  ::v-deep
629
629
  .mapgis-ui-collapse
630
630
  > .mapgis-ui-collapse-item-active
@@ -676,14 +676,16 @@ export default {
676
676
  height: 25px;
677
677
  line-height: 25px;
678
678
  border: 1px solid var(--border-color-base);
679
- background-color: var(--border-color-base);
679
+ // background-color: var(--border-color-base);
680
680
  border-top: 0;
681
- color: #6296ff;
681
+ // color: #6296ff;
682
682
  cursor: pointer;
683
+ background-color: var(--primary-6);
684
+ color: var(--btn-primary-color);
683
685
  }
684
- span:hover {
685
- color: #3b7cff;
686
- }
686
+ // span:hover {
687
+ // color: #3b7cff;
688
+ // }
687
689
  }
688
690
  }
689
691
  ::v-deep .mapgis-ui-collapse-header {
@@ -145,7 +145,7 @@ export function initVueCesium() {
145
145
  window.vueCesium.CompareManager || new CompareManager();
146
146
 
147
147
  //在window.vueCesium下添加取得WebGlobe对象的方法
148
- window.vueCesium.getViewer = function(vueKey) {
148
+ window.vueCesium.getViewer = function (vueKey) {
149
149
  if (!vueKey) {
150
150
  vueKey = "default";
151
151
  }
@@ -160,13 +160,13 @@ export function initVueCesium() {
160
160
  * @param callback 回调函数
161
161
  * @param vueKey vueKey,唯一标识webscene组件
162
162
  * */
163
- window.vueCesium.getViewerByInterval = function(callback, vueKey) {
163
+ window.vueCesium.getViewerByInterval = function (callback, vueKey) {
164
164
  if (!vueKey) {
165
165
  vueKey = "default";
166
166
  }
167
167
  let ViewerManager = window.vueCesium.ViewerManager,
168
168
  viewer;
169
- let interval = setInterval(function() {
169
+ let interval = setInterval(function () {
170
170
  if (
171
171
  ViewerManager.hasOwnProperty(vueKey) &&
172
172
  ViewerManager[vueKey].length > 0
@@ -196,7 +196,7 @@ export class BaseManager {
196
196
  parent: vueKey,
197
197
  key: vueIndex,
198
198
  source: source,
199
- options: options
199
+ options: options,
200
200
  });
201
201
  }
202
202
 
@@ -283,7 +283,7 @@ export class BaseManager {
283
283
  if (find) {
284
284
  findSource = {
285
285
  ...find,
286
- index: index
286
+ index: index,
287
287
  };
288
288
  }
289
289
  return findSource;
@@ -296,7 +296,7 @@ export class BaseManager {
296
296
 
297
297
  flatAllSource() {
298
298
  let flat = [];
299
- Object.keys(this).forEach(k => {
299
+ Object.keys(this).forEach((k) => {
300
300
  if (k !== "vueKey") {
301
301
  flat = flat.concat(this[k]);
302
302
  }