zywlgis 0.5.36 → 0.5.37
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/ZYWLGIS.es.js +164 -250
- package/dist/ZYWLGIS.umd.js +2 -2
- package/package.json +6 -2
package/dist/ZYWLGIS.es.js
CHANGED
|
@@ -133287,64 +133287,64 @@ class k {
|
|
|
133287
133287
|
e && e.has(A) && e.delete(A);
|
|
133288
133288
|
};
|
|
133289
133289
|
// 设置地图引擎位置
|
|
133290
|
-
static setMapEnginePosition = (A, e, t, i, r, s
|
|
133290
|
+
static setMapEnginePosition = (A, e, t, i, r, s) => {
|
|
133291
133291
|
if (window.isOpenSyncZoomLensCamera)
|
|
133292
133292
|
return;
|
|
133293
|
-
let
|
|
133294
|
-
if (
|
|
133295
|
-
let
|
|
133296
|
-
|
|
133297
|
-
const
|
|
133298
|
-
let
|
|
133299
|
-
|
|
133300
|
-
longitude:
|
|
133301
|
-
latitude:
|
|
133302
|
-
}),
|
|
133303
|
-
let
|
|
133304
|
-
const
|
|
133305
|
-
if (
|
|
133306
|
-
|
|
133293
|
+
let o = A.containerID, a = this.getMapEngineID(o), l = this.getMapEngineInstance(a.cesiumID), D = this.getMapEngineInstance(a.maptalksID), P = this.getMapEngineInstance(a.openlayersID), c = A?.center?.longitude ?? 117.21833231944812, h = A?.center?.latitude ?? 39.06565050593017;
|
|
133294
|
+
if (l) {
|
|
133295
|
+
let u = l.scene.camera, Q = l.clock, w = A?.camera?.heading ?? 0, C = A?.camera?.pitch ?? -89;
|
|
133296
|
+
C === -90 && (C = -89), C === 90 && (C = 89);
|
|
133297
|
+
const E = Cesium.Math.toRadians(w), p = Cesium.Math.toRadians(C);
|
|
133298
|
+
let m = 0;
|
|
133299
|
+
m = this.getMapHeightByZoom(o, e, {
|
|
133300
|
+
longitude: c,
|
|
133301
|
+
latitude: h
|
|
133302
|
+
}), m = parseInt(m);
|
|
133303
|
+
let T = Cesium.Cartesian3.fromDegrees(c, h), z = Cesium.Transforms.eastNorthUpToFixedFrame(T), L = parseInt(Cesium.Math.toDegrees(u.pitch));
|
|
133304
|
+
const b = 1, U = () => {
|
|
133305
|
+
if (L === C) {
|
|
133306
|
+
u.lookAtTransform(Cesium.Matrix4.IDENTITY), Q.onTick.removeEventListener(U), s && s();
|
|
133307
133307
|
return;
|
|
133308
133308
|
}
|
|
133309
|
-
|
|
133310
|
-
},
|
|
133311
|
-
if (
|
|
133312
|
-
|
|
133309
|
+
u.rotateUp(Cesium.Math.toRadians(b)), L += b;
|
|
133310
|
+
}, Y = () => {
|
|
133311
|
+
if (L === C) {
|
|
133312
|
+
u.lookAtTransform(Cesium.Matrix4.IDENTITY), Q.onTick.removeEventListener(Y), s && s();
|
|
133313
133313
|
return;
|
|
133314
133314
|
}
|
|
133315
|
-
|
|
133315
|
+
u.rotateDown(Cesium.Math.toRadians(b)), L -= b;
|
|
133316
133316
|
};
|
|
133317
|
-
let
|
|
133318
|
-
if (
|
|
133319
|
-
|
|
133320
|
-
|
|
133321
|
-
m,
|
|
133322
|
-
T
|
|
133323
|
-
) : E === -89 ? J = new Cesium.HeadingPitchRange(
|
|
133317
|
+
let R;
|
|
133318
|
+
if (u.lookAtTransform(Cesium.Matrix4.IDENTITY), r)
|
|
133319
|
+
i ? u.lookAtTransform(z) : (t ? R = new Cesium.HeadingPitchRange(
|
|
133320
|
+
E,
|
|
133324
133321
|
p,
|
|
133322
|
+
m
|
|
133323
|
+
) : C === -89 ? R = new Cesium.HeadingPitchRange(
|
|
133324
|
+
E,
|
|
133325
133325
|
Cesium.Math.toRadians(-45),
|
|
133326
|
-
|
|
133327
|
-
) :
|
|
133328
|
-
|
|
133326
|
+
m
|
|
133327
|
+
) : R = new Cesium.HeadingPitchRange(
|
|
133328
|
+
E,
|
|
133329
133329
|
Cesium.Math.toRadians(-89),
|
|
133330
|
-
|
|
133331
|
-
),
|
|
133330
|
+
m
|
|
133331
|
+
), u.lookAtTransform(z, R)), L < C ? Q.onTick.addEventListener(U) : L > C ? Q.onTick.addEventListener(Y) : (u.lookAtTransform(Cesium.Matrix4.IDENTITY), s && s());
|
|
133332
133332
|
else {
|
|
133333
|
-
if (
|
|
133334
|
-
|
|
133335
|
-
let
|
|
133336
|
-
|
|
133333
|
+
if (i) {
|
|
133334
|
+
u.lookAtTransform(z);
|
|
133335
|
+
let J = Math.abs(C) - Math.abs(L);
|
|
133336
|
+
L < C ? u.rotateDown(Cesium.Math.toRadians(J)) : L > C && (J = -J, u.rotateUp(Cesium.Math.toRadians(J)));
|
|
133337
133337
|
} else
|
|
133338
|
-
|
|
133338
|
+
R = new Cesium.HeadingPitchRange(
|
|
133339
|
+
E,
|
|
133339
133340
|
p,
|
|
133340
|
-
m
|
|
133341
|
-
|
|
133342
|
-
), Q.lookAtTransform(L, J);
|
|
133341
|
+
m
|
|
133342
|
+
), u.lookAtTransform(z, R);
|
|
133343
133343
|
setTimeout(() => {
|
|
133344
|
-
|
|
133344
|
+
u.lookAtTransform(Cesium.Matrix4.IDENTITY), s && s();
|
|
133345
133345
|
}, 0);
|
|
133346
133346
|
}
|
|
133347
|
-
} else
|
|
133347
|
+
} else P ? (P.getView().setCenter(om([c, h])), P.getView().setZoom(e)) : D && D.setCenterAndZoom([c, h], e);
|
|
133348
133348
|
};
|
|
133349
133349
|
static getOLExtent = (A, e, t) => {
|
|
133350
133350
|
const i = A.getSize(), r = i[0], s = i[1], o = om(e), a = A.getView().getResolutionForZoom(t), l = r / 2 * a, D = s / 2 * a, P = [
|
|
@@ -133369,15 +133369,15 @@ class k {
|
|
|
133369
133369
|
};
|
|
133370
133370
|
static calcDistanceForResolution = (A, e, t) => {
|
|
133371
133371
|
let i = this.getMapEngineID(A), r = this.getMapEngineInstance(i.openlayersID);
|
|
133372
|
-
const o = this.getMapEngineInstance(i.cesiumID).scene, a = o.camera.frustum, l = o.canvas.clientHeight, D = r.getView().getProjection().getMetersPerUnit();
|
|
133373
|
-
let
|
|
133374
|
-
return a instanceof Cesium.PerspectiveFrustum && (
|
|
133372
|
+
const o = this.getMapEngineInstance(i.cesiumID).scene, a = o.camera.frustum, l = o.canvas.clientHeight, D = r.getView().getProjection().getMetersPerUnit(), P = Math.cos(Math.abs(t));
|
|
133373
|
+
let c, h = 0.7302107096371538;
|
|
133374
|
+
return a instanceof Cesium.PerspectiveFrustum && (h = a.fovy), c = e * D * P * l / 2 / Math.tan(h / 2), c;
|
|
133375
133375
|
};
|
|
133376
133376
|
static calcResolutionForDistance = (A, e, t) => {
|
|
133377
133377
|
let i = this.getMapEngineID(A), r = this.getMapEngineInstance(i.openlayersID);
|
|
133378
|
-
const o = this.getMapEngineInstance(i.cesiumID).scene, a = o.camera.frustum, l = r.getView().getProjection().getMetersPerUnit();
|
|
133379
|
-
let
|
|
133380
|
-
return a instanceof Cesium.PerspectiveFrustum && (
|
|
133378
|
+
const o = this.getMapEngineInstance(i.cesiumID).scene, a = o.camera.frustum, l = r.getView().getProjection().getMetersPerUnit(), D = Math.cos(Math.abs(t));
|
|
133379
|
+
let P = 0.7302107096371538;
|
|
133380
|
+
return a instanceof Cesium.PerspectiveFrustum && (P = a.fovy), 2 * e * Math.tan(P / 2) / l / D / o.canvas.clientHeight;
|
|
133381
133381
|
};
|
|
133382
133382
|
static calculateZoom = (A, e) => {
|
|
133383
133383
|
let t = e.getView().getZoomForResolution(A);
|
|
@@ -133423,7 +133423,7 @@ class k {
|
|
|
133423
133423
|
if (window.defaultViewPosition) {
|
|
133424
133424
|
const t = window.defaultViewPosition?.zoom?.current ?? 15, i = window.defaultViewPosition?.center?.longitude ?? 117.21833231944812, r = window.defaultViewPosition?.center?.latitude ?? 39.06565050593017, s = this.getMapEngineID(A);
|
|
133425
133425
|
if (this.getMapEngineInstance(s.cesiumID))
|
|
133426
|
-
this.setMapEnginePosition(window.defaultViewPosition, t
|
|
133426
|
+
this.setMapEnginePosition(window.defaultViewPosition, t);
|
|
133427
133427
|
else {
|
|
133428
133428
|
let a = this.getMapEngineInstance(s.maptalksID);
|
|
133429
133429
|
a && a.setCenterAndZoom([i, r], t);
|
|
@@ -139693,7 +139693,6 @@ class k {
|
|
|
139693
139693
|
window.isStartMapModeChange = !0, this.setMapEnginePosition(
|
|
139694
139694
|
A,
|
|
139695
139695
|
e,
|
|
139696
|
-
t,
|
|
139697
139696
|
!0,
|
|
139698
139697
|
!1,
|
|
139699
139698
|
t.isCameraMoveAnimation ?? !1,
|
|
@@ -193797,7 +193796,6 @@ const zte = (n, A) => {
|
|
|
193797
193796
|
window.DefaultMapEngine = cA.cloneDeep(n), (!cA.isEqual(n.camera, this.MapEngine_Temp.camera) || !cA.isEqual(n.zoom, this.MapEngine_Temp.zoom) || !cA.isEqual(n.center, this.MapEngine_Temp.center)) && (this.MapEngine_Temp.camera = cA.cloneDeep(n.camera), this.MapEngine_Temp.zoom = cA.cloneDeep(n.zoom), this.MapEngine_Temp.center = cA.cloneDeep(n.center), this.syncZoom(cA.cloneDeep(n.zoom)), window.isStartMapModeChange = !0, k.setMapEnginePosition(
|
|
193798
193797
|
this.MapEngine_Temp,
|
|
193799
193798
|
this.loadZoom(),
|
|
193800
|
-
this.MapConfiguration_Temp,
|
|
193801
193799
|
!1,
|
|
193802
193800
|
!1,
|
|
193803
193801
|
this.MapConfiguration_Temp.isCameraMoveAnimation ?? !1,
|
|
@@ -194275,7 +194273,6 @@ const zte = (n, A) => {
|
|
|
194275
194273
|
), k.setMapEnginePosition(
|
|
194276
194274
|
this.MapEngine_Temp,
|
|
194277
194275
|
this.loadZoom(),
|
|
194278
|
-
this.MapConfiguration_Temp,
|
|
194279
194276
|
!0,
|
|
194280
194277
|
!1,
|
|
194281
194278
|
this.MapConfiguration_Temp.isCameraMoveAnimation ?? !1,
|
|
@@ -194673,7 +194670,6 @@ const zte = (n, A) => {
|
|
|
194673
194670
|
p > m && (p--, this.syncZoom(p), window.isStartMapModeChange = !0, k.setMapEnginePosition(
|
|
194674
194671
|
this.MapEngine_Temp,
|
|
194675
194672
|
this.loadZoom(),
|
|
194676
|
-
this.MapConfiguration_Temp,
|
|
194677
194673
|
!0,
|
|
194678
194674
|
!1,
|
|
194679
194675
|
this.MapConfiguration_Temp.isCameraMoveAnimation ?? !1,
|
|
@@ -194692,10 +194688,9 @@ const zte = (n, A) => {
|
|
|
194692
194688
|
w || (w = document.createElement("img"), w.id = `${this.containerID}-MapEngineZoomIn`, n.appendChild(w), w.addEventListener("click", () => {
|
|
194693
194689
|
this.setMapEngineRangingTool(!1);
|
|
194694
194690
|
let m = this.loadZoom(), T = this.MapEngine_Temp?.zoom?.max ?? 21;
|
|
194695
|
-
T > 21 && (T = 21), m < T && (m++, this.syncZoom(m),
|
|
194691
|
+
T > 21 && (T = 21), m < T && (m++, this.syncZoom(m), window.isStartMapModeChange = !0, k.setMapEnginePosition(
|
|
194696
194692
|
this.MapEngine_Temp,
|
|
194697
194693
|
this.loadZoom(),
|
|
194698
|
-
this.MapConfiguration_Temp,
|
|
194699
194694
|
!0,
|
|
194700
194695
|
!1,
|
|
194701
194696
|
this.MapConfiguration_Temp.isCameraMoveAnimation ?? !1,
|
|
@@ -194720,7 +194715,6 @@ const zte = (n, A) => {
|
|
|
194720
194715
|
window.allowClickMapMode && (window.allowClickMapMode = !1, window.isStartMapModeChange = !0, this.setMapEngineRangingTool(!1), C.src = k.getMapModeIcon(this.currentMapState2D), this.currentMapState2D ? this.MapEngine_Temp.camera.pitch = -30 : this.MapEngine_Temp.camera.pitch = -90, this.currentMapState2D = !this.currentMapState2D, k.setMapEnginePosition(
|
|
194721
194716
|
this.MapEngine_Temp,
|
|
194722
194717
|
this.loadZoom(),
|
|
194723
|
-
this.MapConfiguration_Temp,
|
|
194724
194718
|
!1,
|
|
194725
194719
|
!0,
|
|
194726
194720
|
this.MapConfiguration_Temp.isCameraMoveAnimation ?? !1,
|
|
@@ -195470,253 +195464,173 @@ const zte = (n, A) => {
|
|
|
195470
195464
|
// 地图定位方法:根据配置将地图视角移动到指定位置或区域
|
|
195471
195465
|
setMapLocation() {
|
|
195472
195466
|
const n = this.MapLocation_Temp?.type ?? 0, A = this.MapLocation_Temp?.radius ?? 100, e = this.MapLocation_Temp?.duration ?? 0, t = this.MapLocation_Temp?.maxZoom ?? 16;
|
|
195473
|
-
let i = k.getMapEngineInstance(this.cesiumID);
|
|
195474
|
-
if (
|
|
195467
|
+
let i = k.getMapEngineInstance(this.openlayersID), r = k.getMapEngineInstance(this.cesiumID);
|
|
195468
|
+
if (r) {
|
|
195469
|
+
let s;
|
|
195475
195470
|
switch (n) {
|
|
195476
195471
|
case 0:
|
|
195477
195472
|
{
|
|
195478
|
-
|
|
195473
|
+
if (!positions)
|
|
195474
|
+
return;
|
|
195475
|
+
let o = k.computeMultipointCenter(
|
|
195479
195476
|
this.MapLocation_Temp.positions
|
|
195480
|
-
),
|
|
195481
|
-
(
|
|
195477
|
+
), a = this.MapLocation_Temp.positions.map(
|
|
195478
|
+
(D) => Cesium.Cartesian3.distance(
|
|
195482
195479
|
Cesium.Cartesian3.fromDegrees(
|
|
195483
|
-
|
|
195484
|
-
|
|
195485
|
-
|
|
195480
|
+
D.longitude,
|
|
195481
|
+
D.latitude,
|
|
195482
|
+
D.altitude
|
|
195486
195483
|
),
|
|
195487
|
-
|
|
195484
|
+
o
|
|
195488
195485
|
)
|
|
195489
|
-
),
|
|
195490
|
-
|
|
195491
|
-
duration: e,
|
|
195492
|
-
// 动画时长
|
|
195493
|
-
offset: new Cesium.HeadingPitchRange(
|
|
195494
|
-
0,
|
|
195495
|
-
Cesium.Math.toRadians(-90),
|
|
195496
|
-
a.radius + A
|
|
195497
|
-
),
|
|
195498
|
-
// 视角偏移参数
|
|
195499
|
-
complete: () => {
|
|
195500
|
-
this.refreshZoom(), this.MapLocation_Temp = void 0, this.loadZoom() > t && (this.syncZoom(t), this.MapEngine_Temp.center = k.transformCoordinate(
|
|
195501
|
-
a.center
|
|
195502
|
-
), k.setMapEnginePosition(
|
|
195503
|
-
this.MapEngine_Temp,
|
|
195504
|
-
this.loadZoom(),
|
|
195505
|
-
this.MapConfiguration_Temp,
|
|
195506
|
-
!1,
|
|
195507
|
-
!1,
|
|
195508
|
-
!1,
|
|
195509
|
-
() => {
|
|
195510
|
-
this.refreshZoom();
|
|
195511
|
-
}
|
|
195512
|
-
));
|
|
195513
|
-
}
|
|
195514
|
-
});
|
|
195486
|
+
), l = Math.max(...a);
|
|
195487
|
+
s = new Cesium.BoundingSphere(o, l);
|
|
195515
195488
|
}
|
|
195516
195489
|
break;
|
|
195517
195490
|
case 1:
|
|
195518
195491
|
{
|
|
195519
|
-
let
|
|
195520
|
-
if (
|
|
195521
|
-
|
|
195522
|
-
|
|
195523
|
-
|
|
195524
|
-
|
|
195525
|
-
s.pcdCenter_,
|
|
195492
|
+
let o = this.MapLocation_Temp.ID, a;
|
|
195493
|
+
if (o && (a = k.get3DTileset(o)), a)
|
|
195494
|
+
if (a.data_.type === 3 || a.data_.type === 5)
|
|
195495
|
+
if (a.pcdCenter_ || a.plyCenter_)
|
|
195496
|
+
a.pcdCenter_ && (s = new Cesium.BoundingSphere(
|
|
195497
|
+
a.pcdCenter_,
|
|
195526
195498
|
1e3
|
|
195527
|
-
)),
|
|
195528
|
-
|
|
195499
|
+
)), a.plyCenter_ && (s = new Cesium.BoundingSphere(
|
|
195500
|
+
a.plyCenter_,
|
|
195529
195501
|
1e3
|
|
195530
195502
|
));
|
|
195531
195503
|
else
|
|
195532
195504
|
return;
|
|
195533
195505
|
else
|
|
195534
|
-
|
|
195535
|
-
console.log(o), o && i.scene.camera.flyToBoundingSphere(
|
|
195536
|
-
o,
|
|
195537
|
-
{
|
|
195538
|
-
duration: e,
|
|
195539
|
-
offset: new Cesium.HeadingPitchRange(
|
|
195540
|
-
0,
|
|
195541
|
-
Cesium.Math.toRadians(-90),
|
|
195542
|
-
o.radius + A
|
|
195543
|
-
),
|
|
195544
|
-
complete: () => {
|
|
195545
|
-
this.refreshZoom(), this.MapLocation_Temp = void 0, this.loadZoom() > t && (this.syncZoom(t), this.MapEngine_Temp.center = k.transformCoordinate(
|
|
195546
|
-
o.center
|
|
195547
|
-
), this.MapEngine_Temp.camera.heading = 0, k.setMapEnginePosition(
|
|
195548
|
-
this.MapEngine_Temp,
|
|
195549
|
-
this.loadZoom(),
|
|
195550
|
-
this.MapConfiguration_Temp,
|
|
195551
|
-
!1,
|
|
195552
|
-
!1,
|
|
195553
|
-
!1,
|
|
195554
|
-
() => {
|
|
195555
|
-
this.refreshZoom();
|
|
195556
|
-
}
|
|
195557
|
-
));
|
|
195558
|
-
}
|
|
195559
|
-
}
|
|
195560
|
-
);
|
|
195561
|
-
}
|
|
195506
|
+
s = a.tilesetInstance_.boundingSphere;
|
|
195562
195507
|
}
|
|
195563
195508
|
break;
|
|
195564
195509
|
case 2:
|
|
195565
195510
|
{
|
|
195566
|
-
let
|
|
195567
|
-
|
|
195568
|
-
let o = s.modelInstance_.boundingSphere;
|
|
195569
|
-
i.scene.camera.flyToBoundingSphere(o, {
|
|
195570
|
-
duration: e,
|
|
195571
|
-
offset: new Cesium.HeadingPitchRange(
|
|
195572
|
-
0,
|
|
195573
|
-
Cesium.Math.toRadians(-90),
|
|
195574
|
-
o.radius + A
|
|
195575
|
-
),
|
|
195576
|
-
complete: (a) => {
|
|
195577
|
-
this.refreshZoom(), this.MapLocation_Temp = void 0, this.loadZoom() > t && (this.syncZoom(t), this.MapEngine_Temp.center = k.transformCoordinate(
|
|
195578
|
-
o.center
|
|
195579
|
-
), this.MapEngine_Temp.camera.heading = 0, k.setMapEnginePosition(
|
|
195580
|
-
this.MapEngine_Temp,
|
|
195581
|
-
this.loadZoom(),
|
|
195582
|
-
this.MapConfiguration_Temp,
|
|
195583
|
-
!1,
|
|
195584
|
-
!1,
|
|
195585
|
-
!1,
|
|
195586
|
-
() => {
|
|
195587
|
-
this.refreshZoom();
|
|
195588
|
-
}
|
|
195589
|
-
));
|
|
195590
|
-
}
|
|
195591
|
-
});
|
|
195592
|
-
}
|
|
195511
|
+
let o = this.MapLocation_Temp.ID, a;
|
|
195512
|
+
o && (a = k.getModel(o)), a && (s = a.modelInstance_.boundingSphere);
|
|
195593
195513
|
}
|
|
195594
195514
|
break;
|
|
195595
195515
|
case 3:
|
|
195596
195516
|
{
|
|
195597
|
-
let
|
|
195598
|
-
|
|
195599
|
-
|
|
195600
|
-
|
|
195601
|
-
|
|
195602
|
-
);
|
|
195603
|
-
i.scene.camera.flyToBoundingSphere(o, {
|
|
195604
|
-
duration: e,
|
|
195605
|
-
offset: new Cesium.HeadingPitchRange(
|
|
195606
|
-
0,
|
|
195607
|
-
Cesium.Math.toRadians(-90),
|
|
195608
|
-
o.radius + A
|
|
195609
|
-
),
|
|
195610
|
-
complete: () => {
|
|
195611
|
-
this.refreshZoom(), this.MapLocation_Temp = void 0, this.loadZoom() > t && (this.syncZoom(t), this.MapEngine_Temp.center = s.center_, this.MapEngine_Temp.camera.heading = 0, k.setMapEnginePosition(
|
|
195612
|
-
this.MapEngine_Temp,
|
|
195613
|
-
this.loadZoom(),
|
|
195614
|
-
this.MapConfiguration_Temp,
|
|
195615
|
-
!1,
|
|
195616
|
-
!1,
|
|
195617
|
-
!1,
|
|
195618
|
-
() => {
|
|
195619
|
-
this.refreshZoom();
|
|
195620
|
-
}
|
|
195621
|
-
));
|
|
195622
|
-
}
|
|
195623
|
-
});
|
|
195624
|
-
}
|
|
195517
|
+
let o = this.MapLocation_Temp.ID, a;
|
|
195518
|
+
o && (a = k.getVectorData(o)), a && (s = new Cesium.BoundingSphere(
|
|
195519
|
+
k.transformCartesian3(a.center_),
|
|
195520
|
+
a.radius_
|
|
195521
|
+
));
|
|
195625
195522
|
}
|
|
195626
195523
|
break;
|
|
195627
195524
|
case 4:
|
|
195525
|
+
return;
|
|
195526
|
+
}
|
|
195527
|
+
if (s && (n === 0 || n === 1 || n === 2 || n === 3)) {
|
|
195528
|
+
let o = s.radius + A;
|
|
195529
|
+
this.MapEngine_Temp.camera = {
|
|
195530
|
+
heading: 0,
|
|
195531
|
+
pitch: -90
|
|
195532
|
+
}, this.MapEngine_Temp.center = k.transformCoordinate(s.center);
|
|
195533
|
+
let a = k.calculateZoom(
|
|
195534
|
+
k.calcResolutionForDistance(
|
|
195535
|
+
this.containerID,
|
|
195536
|
+
o,
|
|
195537
|
+
this.MapEngine_Temp.center?.latitude ?? 0
|
|
195538
|
+
),
|
|
195539
|
+
i
|
|
195540
|
+
);
|
|
195541
|
+
this.syncZoom(a), r.scene.camera.frustum instanceof Cesium.OrthographicFrustum ? (a > t && (a = t, this.syncZoom(a)), k.setMapEnginePosition(
|
|
195628
195542
|
{
|
|
195629
|
-
|
|
195630
|
-
|
|
195631
|
-
|
|
195632
|
-
|
|
195633
|
-
|
|
195634
|
-
|
|
195635
|
-
|
|
195636
|
-
|
|
195637
|
-
|
|
195638
|
-
|
|
195639
|
-
|
|
195640
|
-
|
|
195641
|
-
|
|
195642
|
-
|
|
195643
|
-
|
|
195644
|
-
|
|
195645
|
-
|
|
195646
|
-
|
|
195647
|
-
|
|
195648
|
-
|
|
195649
|
-
|
|
195650
|
-
|
|
195651
|
-
|
|
195652
|
-
|
|
195653
|
-
|
|
195654
|
-
|
|
195655
|
-
|
|
195656
|
-
|
|
195657
|
-
|
|
195658
|
-
|
|
195659
|
-
|
|
195543
|
+
containerID: this.containerID,
|
|
195544
|
+
center: this.MapEngine_Temp.center,
|
|
195545
|
+
camera: this.MapEngine_Temp.camera
|
|
195546
|
+
},
|
|
195547
|
+
a,
|
|
195548
|
+
!1,
|
|
195549
|
+
!1,
|
|
195550
|
+
!1,
|
|
195551
|
+
() => {
|
|
195552
|
+
this.refreshZoom();
|
|
195553
|
+
}
|
|
195554
|
+
)) : a > t ? (a = t, this.syncZoom(a), k.setMapEnginePosition(
|
|
195555
|
+
this.MapEngine_Temp,
|
|
195556
|
+
a,
|
|
195557
|
+
!1,
|
|
195558
|
+
!1,
|
|
195559
|
+
!1,
|
|
195560
|
+
() => {
|
|
195561
|
+
this.refreshZoom();
|
|
195562
|
+
}
|
|
195563
|
+
)) : r.scene.camera.flyToBoundingSphere(
|
|
195564
|
+
s,
|
|
195565
|
+
{
|
|
195566
|
+
duration: e,
|
|
195567
|
+
offset: new Cesium.HeadingPitchRange(
|
|
195568
|
+
Cesium.Math.toRadians(this.MapEngine_Temp?.camera?.heading ?? 0),
|
|
195569
|
+
Cesium.Math.toRadians(this.MapEngine_Temp?.camera?.pitch ?? -90),
|
|
195570
|
+
o
|
|
195571
|
+
),
|
|
195572
|
+
complete: () => {
|
|
195573
|
+
this.refreshZoom();
|
|
195660
195574
|
}
|
|
195661
195575
|
}
|
|
195662
|
-
|
|
195576
|
+
), this.MapLocation_Temp = void 0;
|
|
195663
195577
|
}
|
|
195664
|
-
else {
|
|
195665
|
-
let
|
|
195666
|
-
if (
|
|
195578
|
+
} else {
|
|
195579
|
+
let s = k.getMapEngineInstance(this.maptalksID);
|
|
195580
|
+
if (s)
|
|
195667
195581
|
switch (n) {
|
|
195668
195582
|
case 0:
|
|
195669
195583
|
{
|
|
195670
|
-
let
|
|
195671
|
-
(
|
|
195672
|
-
),
|
|
195673
|
-
EE(Vs(
|
|
195584
|
+
let o = this.MapLocation_Temp.positions.map(
|
|
195585
|
+
(c) => [c.longitude, c.latitude]
|
|
195586
|
+
), a = wm(o), l = Pf(
|
|
195587
|
+
EE(Vs(a)),
|
|
195674
195588
|
A,
|
|
195675
195589
|
{
|
|
195676
195590
|
units: "meters"
|
|
195677
195591
|
}
|
|
195678
|
-
),
|
|
195679
|
-
|
|
195680
|
-
|
|
195681
|
-
|
|
195682
|
-
|
|
195592
|
+
), D = Vs(l), P = new pn(
|
|
195593
|
+
D[0],
|
|
195594
|
+
D[1],
|
|
195595
|
+
D[2],
|
|
195596
|
+
D[3]
|
|
195683
195597
|
);
|
|
195684
|
-
|
|
195685
|
-
|
|
195598
|
+
s.fitExtent(
|
|
195599
|
+
P,
|
|
195686
195600
|
0,
|
|
195687
195601
|
{ duration: e },
|
|
195688
|
-
(
|
|
195689
|
-
|
|
195602
|
+
(c) => {
|
|
195603
|
+
c.playState === "finished" && (this.MapLocation_Temp = void 0, s.getZoom() > t && s.setZoom(t));
|
|
195690
195604
|
}
|
|
195691
195605
|
);
|
|
195692
195606
|
}
|
|
195693
195607
|
break;
|
|
195694
195608
|
case 3:
|
|
195695
195609
|
{
|
|
195696
|
-
let
|
|
195697
|
-
if (
|
|
195698
|
-
let
|
|
195699
|
-
for (const
|
|
195700
|
-
let
|
|
195701
|
-
|
|
195702
|
-
|
|
195703
|
-
|
|
195704
|
-
|
|
195610
|
+
let o = this.MapLocation_Temp.ID, a;
|
|
195611
|
+
if (o && (a = k.getVectorData(o)), a && Array.isArray(a.primitives_)) {
|
|
195612
|
+
let l = [];
|
|
195613
|
+
for (const h of a.primitives_) {
|
|
195614
|
+
let g = h.getExtent().toJSON(), u = [
|
|
195615
|
+
g.xmin,
|
|
195616
|
+
g.ymin,
|
|
195617
|
+
g.xmax,
|
|
195618
|
+
g.ymax
|
|
195705
195619
|
];
|
|
195706
|
-
|
|
195620
|
+
l.push(EE(u));
|
|
195707
195621
|
}
|
|
195708
|
-
let
|
|
195709
|
-
|
|
195710
|
-
|
|
195711
|
-
|
|
195712
|
-
|
|
195622
|
+
let D = tl(l), P = Vs(D), c = new pn(
|
|
195623
|
+
P[0],
|
|
195624
|
+
P[1],
|
|
195625
|
+
P[2],
|
|
195626
|
+
P[3]
|
|
195713
195627
|
);
|
|
195714
|
-
|
|
195715
|
-
|
|
195628
|
+
s.fitExtent(
|
|
195629
|
+
c,
|
|
195716
195630
|
0,
|
|
195717
195631
|
{ duration: e },
|
|
195718
|
-
(
|
|
195719
|
-
|
|
195632
|
+
(h) => {
|
|
195633
|
+
h.playState === "finished" && (this.MapLocation_Temp = void 0, s.getZoom() > t && s.setZoom(t));
|
|
195720
195634
|
}
|
|
195721
195635
|
);
|
|
195722
195636
|
}
|