zywlgis 0.5.35 → 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.
@@ -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, o) => {
133290
+ static setMapEnginePosition = (A, e, t, i, r, s) => {
133291
133291
  if (window.isOpenSyncZoomLensCamera)
133292
133292
  return;
133293
- let a = A.containerID, l = this.getMapEngineID(a), D = this.getMapEngineInstance(l.cesiumID), P = this.getMapEngineInstance(l.maptalksID), c = this.getMapEngineInstance(l.openlayersID), h = A?.center?.longitude ?? 117.21833231944812, g = A?.center?.latitude ?? 39.06565050593017;
133294
- if (D) {
133295
- let Q = D.scene.camera, w = D.clock, C = A?.camera?.heading ?? 0, E = A?.camera?.pitch ?? -89;
133296
- E === -90 && (E = -89), E === 90 && (E = 89);
133297
- const p = Cesium.Math.toRadians(C), m = Cesium.Math.toRadians(E);
133298
- let T = 0;
133299
- T = this.getMapHeightByZoom(a, e, {
133300
- longitude: h,
133301
- latitude: g
133302
- }), T = parseInt(T);
133303
- let z = Cesium.Cartesian3.fromDegrees(h, g), L = Cesium.Transforms.eastNorthUpToFixedFrame(z), b = parseInt(Cesium.Math.toDegrees(Q.pitch));
133304
- const U = 1, Y = () => {
133305
- if (b === E) {
133306
- Q.lookAtTransform(Cesium.Matrix4.IDENTITY), w.onTick.removeEventListener(Y), o && o();
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
- Q.rotateUp(Cesium.Math.toRadians(U)), b += U;
133310
- }, R = () => {
133311
- if (b === E) {
133312
- Q.lookAtTransform(Cesium.Matrix4.IDENTITY), w.onTick.removeEventListener(R), o && o();
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
- Q.rotateDown(Cesium.Math.toRadians(U)), b -= U;
133315
+ u.rotateDown(Cesium.Math.toRadians(b)), L -= b;
133316
133316
  };
133317
- let J;
133318
- if (Q.lookAtTransform(Cesium.Matrix4.IDENTITY), s)
133319
- r ? Q.lookAtTransform(L) : (i ? J = new Cesium.HeadingPitchRange(
133320
- p,
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
- T
133327
- ) : J = new Cesium.HeadingPitchRange(
133328
- p,
133326
+ m
133327
+ ) : R = new Cesium.HeadingPitchRange(
133328
+ E,
133329
133329
  Cesium.Math.toRadians(-89),
133330
- T
133331
- ), Q.lookAtTransform(L, J)), b < E ? w.onTick.addEventListener(Y) : b > E ? w.onTick.addEventListener(R) : (Q.lookAtTransform(Cesium.Matrix4.IDENTITY), o && o());
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 (r) {
133334
- Q.lookAtTransform(L);
133335
- let F = Math.abs(E) - Math.abs(b);
133336
- b < E ? Q.rotateDown(Cesium.Math.toRadians(F)) : b > E && (F = -F, Q.rotateUp(Cesium.Math.toRadians(F)));
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
- J = new Cesium.HeadingPitchRange(
133338
+ R = new Cesium.HeadingPitchRange(
133339
+ E,
133339
133340
  p,
133340
- m,
133341
- T
133342
- ), Q.lookAtTransform(L, J);
133341
+ m
133342
+ ), u.lookAtTransform(z, R);
133343
133343
  setTimeout(() => {
133344
- Q.lookAtTransform(Cesium.Matrix4.IDENTITY), o && o();
133344
+ u.lookAtTransform(Cesium.Matrix4.IDENTITY), s && s();
133345
133345
  }, 0);
133346
133346
  }
133347
- } else c ? (c.getView().setCenter(om([h, g])), c.getView().setZoom(e)) : P && P.setCenterAndZoom([h, g], e);
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 P, c = 0.7302107096371538;
133374
- return a instanceof Cesium.PerspectiveFrustum && (c = a.fovy), P = e * D * l / 2 / Math.tan(c / 2), P;
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 D = 0.7302107096371538;
133380
- return a instanceof Cesium.PerspectiveFrustum && (D = a.fovy), 2 * e * Math.tan(D / 2) / l / o.canvas.clientHeight;
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, e);
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,
@@ -193993,7 +193991,7 @@ const zte = (n, A) => {
193993
193991
  console.log(`资源已加载,跳过: ${i.url}`), r();
193994
193992
  return;
193995
193993
  }
193996
- if (console.log(`正在加载资源: ${i.url}`), i.type === "css") {
193994
+ if (i.type === "css") {
193997
193995
  const o = document.createElement("link");
193998
193996
  o.rel = "stylesheet", o.href = i.url, o.onload = () => {
193999
193997
  console.log(`CSS资源加载成功: ${i.url}`), r();
@@ -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), console.log(this.loadZoom()), window.isStartMapModeChange = !0, k.setMapEnginePosition(
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 (i)
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
- let r = k.computeMultipointCenter(
195473
+ if (!positions)
195474
+ return;
195475
+ let o = k.computeMultipointCenter(
195479
195476
  this.MapLocation_Temp.positions
195480
- ), s = this.MapLocation_Temp.positions.map(
195481
- (l) => Cesium.Cartesian3.distance(
195477
+ ), a = this.MapLocation_Temp.positions.map(
195478
+ (D) => Cesium.Cartesian3.distance(
195482
195479
  Cesium.Cartesian3.fromDegrees(
195483
- l.longitude,
195484
- l.latitude,
195485
- l.altitude
195480
+ D.longitude,
195481
+ D.latitude,
195482
+ D.altitude
195486
195483
  ),
195487
- r
195484
+ o
195488
195485
  )
195489
- ), o = Math.max(...s), a = new Cesium.BoundingSphere(r, o);
195490
- i.scene.camera.flyToBoundingSphere(a, {
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 r = this.MapLocation_Temp.ID, s;
195520
- if (r && (s = k.get3DTileset(r)), s) {
195521
- let o;
195522
- if (s.data_.type === 3 || s.data_.type === 5)
195523
- if (s.pcdCenter_ || s.plyCenter_)
195524
- s.pcdCenter_ && (o = new Cesium.BoundingSphere(
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
- )), s.plyCenter_ && (o = new Cesium.BoundingSphere(
195528
- s.plyCenter_,
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
- o = s.tilesetInstance_.boundingSphere;
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 r = this.MapLocation_Temp.ID, s;
195567
- if (r && (s = k.getModel(r)), s) {
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 r = this.MapLocation_Temp.ID, s;
195598
- if (r && (s = k.getVectorData(r)), s) {
195599
- let o = new Cesium.BoundingSphere(
195600
- k.transformCartesian3(s.center_),
195601
- s.radius_
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
- let r = this.MapLocation_Temp.ID, s;
195630
- if (r && (s = k.getAirRoute(r)), s) {
195631
- let o = s.geometryInstance_._boundingSpheres[0], l = s.geometryInstance_.geometryInstances.geometry._polygonHierarchy.positions.map((h) => k.transformCoordinate(h)), D = k.computeNormalVector(l);
195632
- D.y < 0 && Cesium.Cartesian3.negate(D, D);
195633
- let { heading: P, pitch: c } = k.computeHeadingAndPitch(
195634
- o.center,
195635
- D
195636
- );
195637
- i.scene.camera.flyToBoundingSphere(o, {
195638
- duration: e,
195639
- offset: new Cesium.HeadingPitchRange(
195640
- Cesium.Math.toRadians(P),
195641
- Cesium.Math.toRadians(c),
195642
- o.radius + A
195643
- ),
195644
- complete: () => {
195645
- this.refreshZoom(), this.MapLocation_Temp = void 0, this.loadZoom() > t && (this.syncZoom(t), this.MapEngine_Temp.center = k.transformCoordinate(
195646
- o.center
195647
- ), this.MapEngine_Temp.camera.heading = 0, k.setMapEnginePosition(
195648
- this.MapEngine_Temp,
195649
- this.loadZoom(),
195650
- this.MapConfiguration_Temp,
195651
- !1,
195652
- !1,
195653
- !1,
195654
- () => {
195655
- this.refreshZoom();
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
- break;
195576
+ ), this.MapLocation_Temp = void 0;
195663
195577
  }
195664
- else {
195665
- let r = k.getMapEngineInstance(this.maptalksID);
195666
- if (r)
195578
+ } else {
195579
+ let s = k.getMapEngineInstance(this.maptalksID);
195580
+ if (s)
195667
195581
  switch (n) {
195668
195582
  case 0:
195669
195583
  {
195670
- let s = this.MapLocation_Temp.positions.map(
195671
- (P) => [P.longitude, P.latitude]
195672
- ), o = wm(s), a = Pf(
195673
- EE(Vs(o)),
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
- ), l = Vs(a), D = new pn(
195679
- l[0],
195680
- l[1],
195681
- l[2],
195682
- l[3]
195592
+ ), D = Vs(l), P = new pn(
195593
+ D[0],
195594
+ D[1],
195595
+ D[2],
195596
+ D[3]
195683
195597
  );
195684
- r.fitExtent(
195685
- D,
195598
+ s.fitExtent(
195599
+ P,
195686
195600
  0,
195687
195601
  { duration: e },
195688
- (P) => {
195689
- P.playState === "finished" && (this.MapLocation_Temp = void 0, r.getZoom() > t && r.setZoom(t));
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 s = this.MapLocation_Temp.ID, o;
195697
- if (s && (o = k.getVectorData(s)), o && Array.isArray(o.primitives_)) {
195698
- let a = [];
195699
- for (const c of o.primitives_) {
195700
- let h = c.getExtent().toJSON(), g = [
195701
- h.xmin,
195702
- h.ymin,
195703
- h.xmax,
195704
- h.ymax
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
- a.push(EE(g));
195620
+ l.push(EE(u));
195707
195621
  }
195708
- let l = tl(a), D = Vs(l), P = new pn(
195709
- D[0],
195710
- D[1],
195711
- D[2],
195712
- D[3]
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
- r.fitExtent(
195715
- P,
195628
+ s.fitExtent(
195629
+ c,
195716
195630
  0,
195717
195631
  { duration: e },
195718
- (c) => {
195719
- c.playState === "finished" && (this.MapLocation_Temp = void 0, r.getZoom() > t && r.setZoom(t));
195632
+ (h) => {
195633
+ h.playState === "finished" && (this.MapLocation_Temp = void 0, s.getZoom() > t && s.setZoom(t));
195720
195634
  }
195721
195635
  );
195722
195636
  }