@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.
- package/dist-libs/webclient-vue-cesium.common.js +173354 -0
- package/dist-libs/webclient-vue-cesium.css +1 -1
- package/dist-libs/webclient-vue-cesium.umd.js +173364 -0
- package/dist-libs/webclient-vue-cesium.umd.min.js +6 -6
- package/package.json +88 -88
- package/src/component.js +132 -131
- package/src/components/Analysis/Contour.vue +1 -1
- package/src/components/Analysis/Explosion.vue +352 -0
- package/src/components/Analysis/Flood.vue +47 -40
- package/src/components/Analysis/HeightLimited.vue +156 -124
- package/src/components/Analysis/ModelFlatten.vue +1 -1
- package/src/components/Analysis/Profile.vue +8 -7
- package/src/components/Analysis/SkyLine.vue +2 -5
- package/src/components/Layer/IGServer/IgsDynamicLayer.vue +1 -1
- package/src/components/Layer/M3D/3DTilesetOptions.js +5 -5
- package/src/components/Layer/M3D/M3d.vue +80 -46
- package/src/components/Layer/Marker/DynamicMarkerLayer.vue +22 -13
- package/src/components/Overlay/mapv/MapvBaseLayer.js +34 -33
- package/src/components/Overlay/mapv/MapvLayer.js +132 -123
- package/src/components/Overlay/particle/ParticleEffects.vue +1 -0
- package/src/components/Overlay/themeLayer/M3DSubSectionLayer.vue +4 -0
- package/src/components/SceneEffect/components/BasicSetting.vue +9 -1
- package/src/components/SceneEffect/components/LightSetting.vue +1 -1
- package/src/components/UI/Popup/components/PopupFeatureDetail.vue +1 -1
- package/src/components/WebGlobe/ViewpointManager.vue +10 -8
- package/src/components/WebGlobe/manager.js +6 -6
- 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 =
|
|
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
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
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
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
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
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
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
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
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
|
|
|
@@ -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="
|
|
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>
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
}
|