zywlgis 0.5.36 → 0.5.38

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.
@@ -10921,7 +10921,7 @@ class Gi {
10921
10921
  }
10922
10922
  // 数据处理入口
10923
10923
  DataProcessing = (A) => {
10924
- this.data_ = A, this.presentationMode_ = this.data_?.customHTML?.presentationMode ?? 0, this.reDraw();
10924
+ this.data_ = A, this.presentationMode_ = this.data_?.customHTML?.presentationMode ?? 0, this.presentationMode_ === 0 ? this.clear() : this.reDraw();
10925
10925
  };
10926
10926
  // 核心重绘方法
10927
10927
  reDraw = () => {
@@ -10934,7 +10934,7 @@ class Gi {
10934
10934
  const t = k.getMapEngineInstance(this.containerID_), i = t.cesiumWidget.container;
10935
10935
  this.destination_ = k.transformCartesian3(e);
10936
10936
  const r = this.data_?.customHTML?.pointerEvents ?? "none", s = this.data_.ID + "-ZYWLCustomHTML";
10937
- if (this.HTMLInstance_ || (this.HTMLInstance_ = document.createElement("div"), this.HTMLInstance_.id = s, this.HTMLInstance_.style.position = "absolute", this.HTMLInstance_.style.pointerEvents = r, i.appendChild(this.HTMLInstance_)), this.HTMLInstance_)
10937
+ if (this.HTMLInstance_ || (this.HTMLInstance_ = document.createElement("div"), this.HTMLInstance_.id = s, this.HTMLInstance_.style.position = "absolute", this.HTMLInstance_.style.pointerEvents = r, i.appendChild(this.HTMLInstance_)), this.HTMLInstance_) {
10938
10938
  if (this.HTMLInstance_.innerHTML = A, this.presentationMode_ === 0 || this.presentationMode_ === 2 ? this.HTMLInstance_.style.display = "none" : this.presentationMode_ === 1 && (this.HTMLInstance_.style.display = "block"), window.CustomHTMLInstances_ || (window.CustomHTMLInstances_ = /* @__PURE__ */ new Map()), window.CustomHTMLInstances_.has(s)) {
10939
10939
  let o = window.CustomHTMLInstances_.get(s);
10940
10940
  o.HTMLInstance = this.HTMLInstance_, o.destination = this.destination_, o.presentationMode = this.presentationMode_, o.customHTML = this.data_?.customHTML;
@@ -10946,52 +10946,57 @@ class Gi {
10946
10946
  isHighlight: this.isHighlight,
10947
10947
  customHTML: this.data_?.customHTML
10948
10948
  });
10949
- window.CustomHTMLRender || (window.CustomHTMLRender = t.scene.postRender.addEventListener(
10950
- this.postRenderCustomHTML
10951
- ));
10949
+ this.calculatePosition(t.scene, this.HTMLInstance_, this.presentationMode_, this.destination_, this.data_?.customHTML, this.isHighlight);
10950
+ }
10951
+ window.CustomHTMLRender || (window.CustomHTMLRender = t.scene.camera.changed.addEventListener(this.postRenderCustomHTML));
10952
10952
  };
10953
10953
  // 渲染回调方法(帧更新)
10954
10954
  postRenderCustomHTML = () => {
10955
10955
  if (window.CustomHTMLInstances_) {
10956
10956
  let A = k.getMapEngineInstance(this.containerID_);
10957
- [...window.CustomHTMLInstances_].forEach((e) => {
10957
+ for (const e of [...window.CustomHTMLInstances_]) {
10958
10958
  let t = e[1].HTMLInstance;
10959
- if (!t)
10960
- return;
10961
- const i = e[1].destination, r = e[1].presentationMode, s = e[1].isHighlight, o = e[1].customHTML, a = A.scene, l = a.cartesianToCanvasCoordinates(
10962
- i,
10963
- new Cesium.Cartesian2()
10964
- );
10965
- if (l) {
10966
- let D = o?.dx ?? 0, P = o?.dy ?? 0;
10967
- D = D * window.devicePixelRatio, P = P * window.devicePixelRatio;
10968
- const c = t.offsetHeight * window.devicePixelRatio, h = t.offsetWidth * window.devicePixelRatio;
10969
- t.style.top = `${l.y * window.devicePixelRatio + P - c / 2}px`, t.style.left = `${l.x * window.devicePixelRatio + D - h / 2}px`;
10970
- let g = a.camera, u = g.position, Q = g.positionCartographic, w = Q.height + a.globe.ellipsoid.maximumRadius, C;
10971
- if (a.mode === Cesium.SceneMode.SCENE2D ? C = Q.height : C = Cesium.Cartesian3.distance(u, i), r === 0)
10972
- t.style.display = "none";
10973
- else {
10974
- const E = this.containerID_.split("-cesium")[0], p = k.transformCoordinate(i), m = k.getMapHeightByZoom(E, 6, p);
10975
- C <= w && Q.height < m ? r === 2 ? s ? t.style.display = "block" : t.style.display = "none" : t.style.display = "block" : t.style.display = "none";
10976
- }
10977
- }
10978
- });
10959
+ const i = e[1].presentationMode;
10960
+ if (i === 0 || !t || t && t.style.display !== "block")
10961
+ continue;
10962
+ const r = e[1].destination, s = e[1].isHighlight, o = e[1].customHTML, a = A.scene;
10963
+ this.calculatePosition(a, t, i, r, o, s);
10964
+ }
10965
+ }
10966
+ };
10967
+ calculatePosition = (A, e, t, i, r, s) => {
10968
+ const o = A.cartesianToCanvasCoordinates(
10969
+ i,
10970
+ new Cesium.Cartesian2()
10971
+ );
10972
+ if (o) {
10973
+ let a = r?.dx ?? 0, l = r?.dy ?? 0;
10974
+ a = a * window.devicePixelRatio, l = l * window.devicePixelRatio;
10975
+ const D = e.offsetHeight * window.devicePixelRatio, P = e.offsetWidth * window.devicePixelRatio;
10976
+ e.style.top = `${o.y * window.devicePixelRatio + l - D / 2}px`, e.style.left = `${o.x * window.devicePixelRatio + a - P / 2}px`;
10977
+ let c = A.camera, h = c.position, g = c.positionCartographic, u = g.height + A.globe.ellipsoid.maximumRadius, Q;
10978
+ if (A.mode === Cesium.SceneMode.SCENE2D ? Q = g.height : Q = Cesium.Cartesian3.distance(h, i), t === 0)
10979
+ e.style.display = "none";
10980
+ else {
10981
+ const w = this.containerID_.split("-cesium")[0], C = k.transformCoordinate(i), E = k.getMapHeightByZoom(w, 6, C);
10982
+ Q <= u && g.height < E ? t === 2 ? s ? e.style.display = "block" : e.style.display = "none" : e.style.display = "block" : e.style.display = "none";
10983
+ }
10979
10984
  }
10980
10985
  };
10981
10986
  // 显示方法
10982
10987
  show = () => {
10983
- let A = this.data_.ID + "-ZYWLCustomHTML";
10984
- if (window.CustomHTMLInstances_ && window.CustomHTMLInstances_.has(A)) {
10985
- let e = window.CustomHTMLInstances_.get(A);
10986
- e.presentationMode === 2 && (e.HTMLInstance.style.display = "block"), e.isHighlight = !0;
10988
+ let A = k.getMapEngineInstance(this.containerID_), e = this.data_.ID + "-ZYWLCustomHTML";
10989
+ if (window.CustomHTMLInstances_ && window.CustomHTMLInstances_.has(e)) {
10990
+ let t = window.CustomHTMLInstances_.get(e);
10991
+ t.presentationMode === 2 && (t.HTMLInstance.style.display = "block"), t.isHighlight = !0, this.calculatePosition(A.scene, t.HTMLInstance, t.presentationMode, t.destination, t.customHTML, t.isHighlight);
10987
10992
  }
10988
10993
  };
10989
10994
  // 隐藏方法
10990
10995
  hide = () => {
10991
- let A = this.data_.ID + "-ZYWLCustomHTML";
10992
- if (window.CustomHTMLInstances_ && window.CustomHTMLInstances_.has(A)) {
10993
- let e = window.CustomHTMLInstances_.get(A);
10994
- e.presentationMode === 2 && (e.HTMLInstance.style.display = "none"), e.isHighlight = !1;
10996
+ let A = k.getMapEngineInstance(this.containerID_), e = this.data_.ID + "-ZYWLCustomHTML";
10997
+ if (window.CustomHTMLInstances_ && window.CustomHTMLInstances_.has(e)) {
10998
+ let t = window.CustomHTMLInstances_.get(e);
10999
+ t.presentationMode === 2 && (t.HTMLInstance.style.display = "none"), t.isHighlight = !1, this.calculatePosition(A.scene, t.HTMLInstance, t.presentationMode, t.destination, t.customHTML, t.isHighlight);
10995
11000
  }
10996
11001
  };
10997
11002
  // 销毁方法
@@ -11065,7 +11070,7 @@ class ra {
11065
11070
  e = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABHNCSVQICAgIfAhkiAAAF9RJREFUeF7tnQuwXVV5x7k8BARMguVZMCGAYHwkVuRRCybSArEooXYaqNgkfUFqp8GpDGkdSjKVllBmBLUVnI4ko05CWwXESrBKEkYLlLaYisTwSEixQBAlEVBQMP1/h3Xiyb33nLPfe+39/dbMN+cmZ++11vdb+/uftddee62R3UiNJrBjx4595cDxsjfIjpEdINtP9upxbPT/vyY4/yN9/rjHnh/w72f13cOyDSMjI/c1Gh6V320EBs0goECfoJpOC2bB3rXJ+nv3mrz4ucrdZGLQYw/o740Sh+011YliUxBAAFLAqupQBfsUlTVTdkJPwB9aVfkF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XQHK6LRAAiaH4JwoGqht0udHsIx0ZQrTKqsKEn4Ncq4H9YRiHkmZwAApCcVWVHShCOCIIwQ5+vl9kkpKaJwkOqs03GeVBmXfuve3/zrrILKEVBCEAKWHUeGl5UsleXTQy6ZqJgf0+V2ThDlcnuzzeFILdA77X/5YWbKpsie1kIQHZ2UZ0pgZisCpnZ7cSEHps44O+DgxNP6dN2udkebNDfz+iYLQrwLVEBoDKZCPw/CeDD+UBRG00AAAAASUVORK5CYII=";
11066
11071
  break;
11067
11072
  }
11068
- return console.log("图片base64字节数>>>>>>", new Blob([e]).size), e;
11073
+ return e;
11069
11074
  };
11070
11075
  }
11071
11076
  var Cp = { exports: {} };
@@ -133287,64 +133292,64 @@ class k {
133287
133292
  e && e.has(A) && e.delete(A);
133288
133293
  };
133289
133294
  // 设置地图引擎位置
133290
- static setMapEnginePosition = (A, e, t, i, r, s, o) => {
133295
+ static setMapEnginePosition = (A, e, t, i, r, s) => {
133291
133296
  if (window.isOpenSyncZoomLensCamera)
133292
133297
  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();
133298
+ 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;
133299
+ if (l) {
133300
+ let u = l.scene.camera, Q = l.clock, w = A?.camera?.heading ?? 0, C = A?.camera?.pitch ?? -89;
133301
+ C === -90 && (C = -89), C === 90 && (C = 89);
133302
+ const E = Cesium.Math.toRadians(w), p = Cesium.Math.toRadians(C);
133303
+ let m = 0;
133304
+ m = this.getMapHeightByZoom(o, e, {
133305
+ longitude: c,
133306
+ latitude: h
133307
+ }), m = parseInt(m);
133308
+ let T = Cesium.Cartesian3.fromDegrees(c, h), z = Cesium.Transforms.eastNorthUpToFixedFrame(T), L = parseInt(Cesium.Math.toDegrees(u.pitch));
133309
+ const b = 1, U = () => {
133310
+ if (L === C) {
133311
+ u.lookAtTransform(Cesium.Matrix4.IDENTITY), Q.onTick.removeEventListener(U), s && s();
133307
133312
  return;
133308
133313
  }
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();
133314
+ u.rotateUp(Cesium.Math.toRadians(b)), L += b;
133315
+ }, Y = () => {
133316
+ if (L === C) {
133317
+ u.lookAtTransform(Cesium.Matrix4.IDENTITY), Q.onTick.removeEventListener(Y), s && s();
133313
133318
  return;
133314
133319
  }
133315
- Q.rotateDown(Cesium.Math.toRadians(U)), b -= U;
133320
+ u.rotateDown(Cesium.Math.toRadians(b)), L -= b;
133316
133321
  };
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(
133322
+ let R;
133323
+ if (u.lookAtTransform(Cesium.Matrix4.IDENTITY), r)
133324
+ i ? u.lookAtTransform(z) : (t ? R = new Cesium.HeadingPitchRange(
133325
+ E,
133324
133326
  p,
133327
+ m
133328
+ ) : C === -89 ? R = new Cesium.HeadingPitchRange(
133329
+ E,
133325
133330
  Cesium.Math.toRadians(-45),
133326
- T
133327
- ) : J = new Cesium.HeadingPitchRange(
133328
- p,
133331
+ m
133332
+ ) : R = new Cesium.HeadingPitchRange(
133333
+ E,
133329
133334
  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());
133335
+ m
133336
+ ), u.lookAtTransform(z, R)), L < C ? Q.onTick.addEventListener(U) : L > C ? Q.onTick.addEventListener(Y) : (u.lookAtTransform(Cesium.Matrix4.IDENTITY), s && s());
133332
133337
  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)));
133338
+ if (i) {
133339
+ u.lookAtTransform(z);
133340
+ let J = Math.abs(C) - Math.abs(L);
133341
+ L < C ? u.rotateDown(Cesium.Math.toRadians(J)) : L > C && (J = -J, u.rotateUp(Cesium.Math.toRadians(J)));
133337
133342
  } else
133338
- J = new Cesium.HeadingPitchRange(
133343
+ R = new Cesium.HeadingPitchRange(
133344
+ E,
133339
133345
  p,
133340
- m,
133341
- T
133342
- ), Q.lookAtTransform(L, J);
133346
+ m
133347
+ ), u.lookAtTransform(z, R);
133343
133348
  setTimeout(() => {
133344
- Q.lookAtTransform(Cesium.Matrix4.IDENTITY), o && o();
133349
+ u.lookAtTransform(Cesium.Matrix4.IDENTITY), s && s();
133345
133350
  }, 0);
133346
133351
  }
133347
- } else c ? (c.getView().setCenter(om([h, g])), c.getView().setZoom(e)) : P && P.setCenterAndZoom([h, g], e);
133352
+ } else P ? (P.getView().setCenter(om([c, h])), P.getView().setZoom(e)) : D && D.setCenterAndZoom([c, h], e);
133348
133353
  };
133349
133354
  static getOLExtent = (A, e, t) => {
133350
133355
  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 +133374,15 @@ class k {
133369
133374
  };
133370
133375
  static calcDistanceForResolution = (A, e, t) => {
133371
133376
  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;
133377
+ 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));
133378
+ let c, h = 0.7302107096371538;
133379
+ return a instanceof Cesium.PerspectiveFrustum && (h = a.fovy), c = e * D * P * l / 2 / Math.tan(h / 2), c;
133375
133380
  };
133376
133381
  static calcResolutionForDistance = (A, e, t) => {
133377
133382
  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;
133383
+ const o = this.getMapEngineInstance(i.cesiumID).scene, a = o.camera.frustum, l = r.getView().getProjection().getMetersPerUnit(), D = Math.cos(Math.abs(t));
133384
+ let P = 0.7302107096371538;
133385
+ return a instanceof Cesium.PerspectiveFrustum && (P = a.fovy), 2 * e * Math.tan(P / 2) / l / D / o.canvas.clientHeight;
133381
133386
  };
133382
133387
  static calculateZoom = (A, e) => {
133383
133388
  let t = e.getView().getZoomForResolution(A);
@@ -133423,7 +133428,7 @@ class k {
133423
133428
  if (window.defaultViewPosition) {
133424
133429
  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
133430
  if (this.getMapEngineInstance(s.cesiumID))
133426
- this.setMapEnginePosition(window.defaultViewPosition, t, e);
133431
+ this.setMapEnginePosition(window.defaultViewPosition, t);
133427
133432
  else {
133428
133433
  let a = this.getMapEngineInstance(s.maptalksID);
133429
133434
  a && a.setCenterAndZoom([i, r], t);
@@ -133450,15 +133455,12 @@ class k {
133450
133455
  let a = Cesium.Cartesian3.distance(
133451
133456
  t.scene.camera.position,
133452
133457
  i
133453
- ), l = () => {
133454
- let D = new Cesium.HeadingPitchRange(
133455
- Cesium.Math.toRadians(r),
133456
- s,
133457
- a
133458
- );
133459
- t.scene.camera.lookAt(i, D), t.scene.camera.lookAtTransform(Cesium.Matrix4.IDENTITY), r > 0 && r <= 180 ? r-- : r > 180 && r < 360 ? r++ : t.clock.onTick.removeEventListener(l);
133460
- };
133461
- t.clock.onTick.addEventListener(l);
133458
+ ), l = new Cesium.HeadingPitchRange(
133459
+ 0,
133460
+ s,
133461
+ a
133462
+ );
133463
+ t.scene.camera.lookAt(i, l), t.scene.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
133462
133464
  } else
133463
133465
  t.scene.camera.setView({
133464
133466
  orientation: new Cesium.HeadingPitchRoll(0, s, o)
@@ -138065,42 +138067,47 @@ class k {
138065
138067
  "5",
138066
138068
  "6",
138067
138069
  "7"
138068
- ], l = A?.max ?? 18, D = A?.min ?? 1, P = A.urlTemplate, c;
138070
+ ], l = A?.tokens ?? [], D = A?.max ?? 18, P = A?.min ?? 1, c = A.urlTemplate, h;
138069
138071
  switch (o) {
138070
138072
  case 0:
138071
- c = new Mr(t, {
138073
+ h = new Mr(t, {
138072
138074
  crossOrigin: "anonymous",
138073
- urlTemplate: P,
138075
+ urlTemplate: c,
138074
138076
  subdomains: a,
138075
138077
  attribution: "",
138076
138078
  hitDetect: !1,
138077
- minZoom: D,
138079
+ minZoom: P,
138078
138080
  // maxZoom: maximumLevel,
138079
- maxAvailableZoom: l,
138081
+ maxAvailableZoom: D,
138080
138082
  visible: i,
138081
138083
  zIndex: r,
138082
138084
  opacity: s,
138083
- renderer: window.mapRenderer
138085
+ renderer: window.mapRenderer,
138086
+ customTags: {
138087
+ tk: function() {
138088
+ return l[Math.floor(Math.random() * l.length)];
138089
+ }
138090
+ }
138084
138091
  });
138085
138092
  break;
138086
138093
  case 1:
138087
138094
  {
138088
- let h = A?.layers ?? "", g = A?.styles ?? "";
138089
- c = new OI(t, {
138095
+ let g = A?.layers ?? "", u = A?.styles ?? "";
138096
+ h = new OI(t, {
138090
138097
  crossOrigin: "anonymous",
138091
- urlTemplate: P,
138098
+ urlTemplate: c,
138092
138099
  subdomains: a,
138093
138100
  attribution: "",
138094
138101
  hitDetect: !1,
138095
- minZoom: D,
138102
+ minZoom: P,
138096
138103
  // maxZoom: maximumLevel,
138097
- maxAvailableZoom: l,
138104
+ maxAvailableZoom: D,
138098
138105
  visible: i,
138099
138106
  zIndex: r,
138100
138107
  opacity: s,
138101
138108
  renderer: window.mapRenderer,
138102
- layers: h,
138103
- styles: g,
138109
+ layers: g,
138110
+ styles: u,
138104
138111
  version: "1.1.1",
138105
138112
  format: "image/png",
138106
138113
  transparent: !0,
@@ -138109,7 +138116,7 @@ class k {
138109
138116
  }
138110
138117
  break;
138111
138118
  }
138112
- return c;
138119
+ return h;
138113
138120
  };
138114
138121
  /**
138115
138122
  * 获取OpenLayers的瓦片图层(支持XYZ和WMS)
@@ -138248,30 +138255,33 @@ class k {
138248
138255
  "5",
138249
138256
  "6",
138250
138257
  "7"
138251
- ], a = A?.zIndex ?? 0, l = {
138258
+ ], a = A?.tokens ?? [], l = A?.zIndex ?? 0, D = {
138252
138259
  layerID: r,
138253
- zIndex: a
138254
- }, D = A?.max ?? 18;
138260
+ zIndex: l,
138261
+ tk: function() {
138262
+ return a[Math.floor(Math.random() * a.length)];
138263
+ }
138264
+ }, P = A?.max ?? 18;
138255
138265
  A?.min;
138256
- let P = A.urlTemplate;
138266
+ let c = A.urlTemplate;
138257
138267
  A.hasOwnProperty("appID") && A.appID && A.appID.length && (e = A.appID), A.hasOwnProperty("appSign") && A.appSign && A.appSign.length && (t = A.appSign);
138258
- let c;
138268
+ let h;
138259
138269
  switch (s) {
138260
138270
  case 0:
138261
138271
  {
138262
- let h;
138263
- e && t ? h = new Cesium.Resource({
138264
- url: P,
138272
+ let g;
138273
+ e && t ? g = new Cesium.Resource({
138274
+ url: c,
138265
138275
  headers: {
138266
138276
  appid: e,
138267
138277
  sign: t
138268
138278
  }
138269
- }) : h = P, c = new Cesium.UrlTemplateImageryProvider({
138270
- url: h,
138279
+ }) : g = c, h = new Cesium.UrlTemplateImageryProvider({
138280
+ url: g,
138271
138281
  subdomains: o,
138272
- customTags: l,
138273
- maximumLevel: D,
138274
- credit: JSON.stringify(l),
138282
+ customTags: D,
138283
+ maximumLevel: P,
138284
+ credit: JSON.stringify(D),
138275
138285
  // 用于后续识别
138276
138286
  tilingScheme: new Cesium.WebMercatorTilingScheme({
138277
138287
  numberOfLevelZeroTilesX: 1,
@@ -138283,61 +138293,61 @@ class k {
138283
138293
  break;
138284
138294
  case 1:
138285
138295
  {
138286
- let h = A?.layers ?? "", g = A?.styles ?? "", u = "EPSG:3857", Q = {};
138287
- e && t && (Q = {
138296
+ let g = A?.layers ?? "", u = A?.styles ?? "", Q = "EPSG:3857", w = {};
138297
+ e && t && (w = {
138288
138298
  appid: e,
138289
138299
  sign: t
138290
138300
  });
138291
- let w = new Cesium.Resource({
138292
- url: P,
138293
- headers: Q,
138301
+ let C = new Cesium.Resource({
138302
+ url: c,
138303
+ headers: w,
138294
138304
  queryParameters: {
138295
138305
  SERVICE: "WMS",
138296
138306
  VERSION: "1.1.1",
138297
138307
  REQUEST: "GetMap",
138298
138308
  FORMAT: "image/png",
138299
138309
  TRANSPARENT: !0,
138300
- LAYERS: h,
138301
- STYLES: g,
138310
+ LAYERS: g,
138311
+ STYLES: u,
138302
138312
  WIDTH: 256,
138303
138313
  HEIGHT: 256,
138304
- SRS: u
138314
+ SRS: Q
138305
138315
  }
138306
138316
  });
138307
- c = new Cesium.WebMapServiceImageryProvider({
138308
- url: w,
138317
+ h = new Cesium.WebMapServiceImageryProvider({
138318
+ url: C,
138309
138319
  subdomains: o,
138310
- customTags: l,
138311
- maximumLevel: D,
138312
- layers: h,
138320
+ customTags: D,
138321
+ maximumLevel: P,
138322
+ layers: g,
138313
138323
  enablePickFeatures: !0,
138314
138324
  parameters: {
138315
138325
  FORMAT: "image/png"
138316
138326
  },
138317
138327
  tilingScheme: new Cesium.WebMercatorTilingScheme(),
138318
- srs: u,
138319
- credit: JSON.stringify(l)
138328
+ srs: Q,
138329
+ credit: JSON.stringify(D)
138320
138330
  });
138321
138331
  }
138322
138332
  break;
138323
138333
  case 2:
138324
138334
  {
138325
- let h = A?.layers ?? "img", g = A?.styles ?? "default", u = A?.format ?? "image/png", Q = A?.matrixSet ?? "w";
138326
- c = new Cesium.WebMapTileServiceImageryProvider({
138327
- url: P,
138335
+ let g = A?.layers ?? "img", u = A?.styles ?? "default", Q = A?.format ?? "image/png", w = A?.matrixSet ?? "w";
138336
+ h = new Cesium.WebMapTileServiceImageryProvider({
138337
+ url: c,
138328
138338
  subdomains: o,
138329
- customTags: l,
138330
- maximumLevel: D,
138331
- layer: h,
138332
- style: g,
138333
- format: u,
138334
- tileMatrixSetID: Q,
138335
- credit: JSON.stringify(l)
138339
+ customTags: D,
138340
+ maximumLevel: P,
138341
+ layer: g,
138342
+ style: u,
138343
+ format: Q,
138344
+ tileMatrixSetID: w,
138345
+ credit: JSON.stringify(D)
138336
138346
  });
138337
138347
  }
138338
138348
  break;
138339
138349
  }
138340
- return c;
138350
+ return h;
138341
138351
  };
138342
138352
  /**
138343
138353
  * 对Cesium三维地图中的图层进行排序,使其显示顺序与传入的layers数组一致。
@@ -139693,7 +139703,6 @@ class k {
139693
139703
  window.isStartMapModeChange = !0, this.setMapEnginePosition(
139694
139704
  A,
139695
139705
  e,
139696
- t,
139697
139706
  !0,
139698
139707
  !1,
139699
139708
  t.isCameraMoveAnimation ?? !1,
@@ -139918,7 +139927,10 @@ class k {
139918
139927
  static reDrawLabel = (A, e, t, i) => {
139919
139928
  let r, s = t?.customLabel;
139920
139929
  if (s && i) {
139921
- let o = s?.show ?? !0, a = {
139930
+ let o = s?.show ?? !1;
139931
+ if (!o)
139932
+ return r;
139933
+ let a = {
139922
139934
  textDx: s?.dx ?? 0,
139923
139935
  // 文本水平偏移
139924
139936
  textDy: s?.dy ?? 0,
@@ -139966,34 +139978,37 @@ class k {
139966
139978
  static reDrawHTML = (A, e, t, i) => {
139967
139979
  let r = t?.customHTML;
139968
139980
  if (r && i) {
139969
- let s = new en(i, {
139970
- id: e,
139971
- symbol: {},
139972
- // 标记无默认样式
139973
- editable: !1,
139974
- dragShadow: !1,
139975
- interactive: !1
139976
- }), o;
139977
- window.isGPUSupport ? o = k.getPointLayer(A) : o = k.getVectorLayer(A);
139978
- let a = o.getGeometries();
139979
- return a.push(s), console.log("监测<<<<<", o, a), o.addGeometry(a), console.log("监测>>>>>", o, a), {
139980
- presentationMode: r?.presentationMode ?? 0,
139981
- infoWindow: new H$.InfoWindow({
139982
- content: r?.content ?? "",
139983
- // 信息窗内容(默认空字符串)
139984
- dx: r?.dx ?? 0,
139985
- // 水平偏移
139986
- dy: r?.dy ?? 0,
139987
- // 垂直偏移
139988
- single: !1,
139989
- // 是否单例模式(默认false)
139990
- custom: !0,
139991
- // 自定义内容(默认true
139992
- autoPan: !1
139993
- // 自动平移地图(默认false
139994
- }).addTo(s),
139995
- marker: s
139996
- };
139981
+ let s = r?.presentationMode ?? 0;
139982
+ if (s !== 0) {
139983
+ let o = new en(i, {
139984
+ id: e,
139985
+ symbol: {},
139986
+ // 标记无默认样式
139987
+ editable: !1,
139988
+ dragShadow: !1,
139989
+ interactive: !1
139990
+ }), a;
139991
+ window.isGPUSupport ? a = k.getPointLayer(A) : a = k.getVectorLayer(A);
139992
+ let l = a.getGeometries();
139993
+ return l.push(o), console.log("监测<<<<<", a, l), a.addGeometry(l), console.log("监测>>>>>", a, l), {
139994
+ presentationMode: s,
139995
+ infoWindow: new H$.InfoWindow({
139996
+ content: r?.content ?? "",
139997
+ // 信息窗内容(默认空字符串)
139998
+ dx: r?.dx ?? 0,
139999
+ // 水平偏移
140000
+ dy: r?.dy ?? 0,
140001
+ // 垂直偏移
140002
+ single: !1,
140003
+ // 是否单例模式(默认false
140004
+ custom: !0,
140005
+ // 自定义内容(默认true
140006
+ autoPan: !1
140007
+ // 自动平移地图(默认false)
140008
+ }).addTo(o),
140009
+ marker: o
140010
+ };
140011
+ }
139997
140012
  }
139998
140013
  };
139999
140014
  /// 根据屏幕坐标获取笛卡尔
@@ -163640,7 +163655,7 @@ class zoA {
163640
163655
  scene: A.scene
163641
163656
  };
163642
163657
  r !== void 0 && (l.minimumPixelSize = r), s !== void 0 && (l.maximumScale = s), Cesium.Model.fromGltfAsync(l).then((D) => {
163643
- console.log(D), this.modelInstance_ && A.scene.primitives.remove(this.modelInstance_), this.modelInstance_ = D, A.scene.primitives.add(this.modelInstance_);
163658
+ this.modelInstance_ && A.scene.primitives.remove(this.modelInstance_), this.modelInstance_ = D, A.scene.primitives.add(this.modelInstance_);
163644
163659
  });
163645
163660
  }
163646
163661
  this.frustumInstance_ || (this.frustumInstance_ = new aWA(this.containerID_, "Models")), this.frustumInstance_.DataProcessing(this.data_, e);
@@ -164148,7 +164163,7 @@ class DWA {
164148
164163
  reDrawCustomLabel = () => {
164149
164164
  if (this.visible_ && Array.isArray(this.data_?.coordinates) && this.data_?.coordinates.length) {
164150
164165
  const A = this.data_.coordinates[0];
164151
- if (this.customLabelInstances_) {
164166
+ if (this.customLabelInstances_?.length) {
164152
164167
  let e = this.customLabelInstances_[0];
164153
164168
  e.setCoordinates([A.longitude, A.latitude]), e.setContent(A?.customLabel?.content ?? "");
164154
164169
  } else {
@@ -164698,7 +164713,7 @@ class cWA {
164698
164713
  reDrawCustomLabel = () => {
164699
164714
  if (this.visible_ && Array.isArray(this.data_?.coordinates) && this.data_?.coordinates.length) {
164700
164715
  const A = this.data_.coordinates[0];
164701
- if (this.customLabelInstances_) {
164716
+ if (this.customLabelInstances_?.length) {
164702
164717
  let e = this.customLabelInstances_[0];
164703
164718
  e.setCoordinates([A.longitude, A.latitude]), e.setContent(A?.customLabel?.content ?? "");
164704
164719
  } else {
@@ -164940,7 +164955,7 @@ class hWA {
164940
164955
  reDrawCustomLabel = () => {
164941
164956
  if (this.visible_ && Array.isArray(this.data_?.coordinates) && this.data_?.coordinates.length) {
164942
164957
  const A = this.data_.coordinates[0];
164943
- if (this.customLabelInstances_) {
164958
+ if (this.customLabelInstances_?.length) {
164944
164959
  let e = this.customLabelInstances_[0];
164945
164960
  e.setCoordinates([A.longitude, A.latitude]), e.setContent(A?.customLabel?.content ?? "");
164946
164961
  } else {
@@ -168172,7 +168187,7 @@ class Xq {
168172
168187
  reDrawCustomLabel = () => {
168173
168188
  if (this.visible_ && Array.isArray(this.data_?.coordinates) && this.data_?.coordinates.length) {
168174
168189
  const A = this.data_.coordinates[0];
168175
- if (this.customLabelInstances_) {
168190
+ if (this.customLabelInstances_?.length) {
168176
168191
  let e = this.customLabelInstances_[0];
168177
168192
  e.setCoordinates([A.longitude, A.latitude]), e.setContent(A?.customLabel?.content ?? "");
168178
168193
  } else {
@@ -168518,7 +168533,7 @@ class vWA {
168518
168533
  this.data_.ID + "-&-ZYWL-&-CenterHTML-0",
168519
168534
  this.data_,
168520
168535
  this.center_
168521
- ), this.centerHTMLInstance_ && (this.centerHTMLInstance_.presentationMode === 0 || this.centerHTMLInstance_.presentationMode === 2 ? this.centerHTMLInstance_.infoWindow.hide() : this.centerHTMLInstance_.infoWindow.show());
168536
+ ), console.log(this.centerHTMLInstance_), this.centerHTMLInstance_ && (this.centerHTMLInstance_.presentationMode === 0 || this.centerHTMLInstance_.presentationMode === 2 ? this.centerHTMLInstance_.infoWindow.hide() : this.centerHTMLInstance_.infoWindow.show());
168522
168537
  else {
168523
168538
  let e = A?.presentationMode ?? 0;
168524
168539
  this.centerHTMLInstance_.marker.setCoordinates(this.center_), e === 0 || e === 2 ? this.centerHTMLInstance_.infoWindow.hide() : this.centerHTMLInstance_.infoWindow.show();
@@ -168532,7 +168547,7 @@ class vWA {
168532
168547
  reDrawCustomLabel = () => {
168533
168548
  if (this.visible_ && Array.isArray(this.data_?.coordinates) && this.data_?.coordinates.length) {
168534
168549
  const A = this.data_.coordinates[0];
168535
- if (this.customLabelInstances_) {
168550
+ if (this.customLabelInstances_?.length) {
168536
168551
  let e = this.customLabelInstances_[0];
168537
168552
  e.setCoordinates([A.longitude, A.latitude]), e.setContent(A?.customLabel?.content ?? "");
168538
168553
  } else {
@@ -168622,7 +168637,7 @@ class vWA {
168622
168637
  mouseover = (A) => {
168623
168638
  if (this.isEditable_)
168624
168639
  return;
168625
- if (this.centerHTMLInstance_ && this.centerHTMLInstance_.presentationMode === 2 && this.centerHTMLInstance_.infoWindow.show(), this.customHTMLInstances_ && this.customHTMLInstances_.length)
168640
+ if (console.log(this.centerHTMLInstance_, this.customHTMLInstances_), this.centerHTMLInstance_ && this.centerHTMLInstance_.presentationMode === 2 && this.centerHTMLInstance_.infoWindow.show(), this.customHTMLInstances_ && this.customHTMLInstances_.length)
168626
168641
  for (let t = 0; t < this.customHTMLInstances_.length; t++)
168627
168642
  this.customHTMLInstances_[t].presentationMode === 2 && this.customHTMLInstances_[t].infoWindow.show();
168628
168643
  if (!this.isHighlight_)
@@ -168865,7 +168880,7 @@ class _q {
168865
168880
  reDrawCustomLabel = () => {
168866
168881
  if (this.visible_ && Array.isArray(this.data_?.coordinates) && this.data_?.coordinates.length) {
168867
168882
  const A = this.data_.coordinates[0];
168868
- if (this.customLabelInstances_) {
168883
+ if (this.customLabelInstances_?.length) {
168869
168884
  let e = this.customLabelInstances_[0];
168870
168885
  e.setCoordinates([A.longitude, A.latitude]), e.setContent(A?.customLabel?.content ?? "");
168871
168886
  } else {
@@ -175364,7 +175379,7 @@ class OWA {
175364
175379
  reDrawCustomLabel = () => {
175365
175380
  if (this.visible_ && Array.isArray(this.data_?.coordinates) && this.data_?.coordinates.length) {
175366
175381
  const A = this.data_.coordinates[0];
175367
- if (this.customLabelInstances_) {
175382
+ if (this.customLabelInstances_?.length) {
175368
175383
  let e = this.customLabelInstances_[0];
175369
175384
  e.setCoordinates([A.longitude, A.latitude]), e.setContent(A?.customLabel?.content ?? "");
175370
175385
  } else {
@@ -193797,7 +193812,6 @@ const zte = (n, A) => {
193797
193812
  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
193813
  this.MapEngine_Temp,
193799
193814
  this.loadZoom(),
193800
- this.MapConfiguration_Temp,
193801
193815
  !1,
193802
193816
  !1,
193803
193817
  this.MapConfiguration_Temp.isCameraMoveAnimation ?? !1,
@@ -194131,6 +194145,7 @@ const zte = (n, A) => {
194131
194145
  let t = this.createOL(e);
194132
194146
  k.setMapEngineInstance(this.openlayersID, t), this.createCesium(e);
194133
194147
  } else {
194148
+ window.isGPUSupport = !1;
194134
194149
  let t = this.createMaptalks(e);
194135
194150
  k.setMapEngineInstance(this.maptalksID, t), this.setMapEngineStateBar();
194136
194151
  let i = document.getElementById(
@@ -194275,7 +194290,6 @@ const zte = (n, A) => {
194275
194290
  ), k.setMapEnginePosition(
194276
194291
  this.MapEngine_Temp,
194277
194292
  this.loadZoom(),
194278
- this.MapConfiguration_Temp,
194279
194293
  !0,
194280
194294
  !1,
194281
194295
  this.MapConfiguration_Temp.isCameraMoveAnimation ?? !1,
@@ -194673,7 +194687,6 @@ const zte = (n, A) => {
194673
194687
  p > m && (p--, this.syncZoom(p), window.isStartMapModeChange = !0, k.setMapEnginePosition(
194674
194688
  this.MapEngine_Temp,
194675
194689
  this.loadZoom(),
194676
- this.MapConfiguration_Temp,
194677
194690
  !0,
194678
194691
  !1,
194679
194692
  this.MapConfiguration_Temp.isCameraMoveAnimation ?? !1,
@@ -194692,10 +194705,9 @@ const zte = (n, A) => {
194692
194705
  w || (w = document.createElement("img"), w.id = `${this.containerID}-MapEngineZoomIn`, n.appendChild(w), w.addEventListener("click", () => {
194693
194706
  this.setMapEngineRangingTool(!1);
194694
194707
  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(
194708
+ T > 21 && (T = 21), m < T && (m++, this.syncZoom(m), window.isStartMapModeChange = !0, k.setMapEnginePosition(
194696
194709
  this.MapEngine_Temp,
194697
194710
  this.loadZoom(),
194698
- this.MapConfiguration_Temp,
194699
194711
  !0,
194700
194712
  !1,
194701
194713
  this.MapConfiguration_Temp.isCameraMoveAnimation ?? !1,
@@ -194720,7 +194732,6 @@ const zte = (n, A) => {
194720
194732
  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
194733
  this.MapEngine_Temp,
194722
194734
  this.loadZoom(),
194723
- this.MapConfiguration_Temp,
194724
194735
  !1,
194725
194736
  !0,
194726
194737
  this.MapConfiguration_Temp.isCameraMoveAnimation ?? !1,
@@ -195470,253 +195481,173 @@ const zte = (n, A) => {
195470
195481
  // 地图定位方法:根据配置将地图视角移动到指定位置或区域
195471
195482
  setMapLocation() {
195472
195483
  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)
195484
+ let i = k.getMapEngineInstance(this.openlayersID), r = k.getMapEngineInstance(this.cesiumID);
195485
+ if (r) {
195486
+ let s;
195475
195487
  switch (n) {
195476
195488
  case 0:
195477
195489
  {
195478
- let r = k.computeMultipointCenter(
195490
+ if (!positions)
195491
+ return;
195492
+ let o = k.computeMultipointCenter(
195479
195493
  this.MapLocation_Temp.positions
195480
- ), s = this.MapLocation_Temp.positions.map(
195481
- (l) => Cesium.Cartesian3.distance(
195494
+ ), a = this.MapLocation_Temp.positions.map(
195495
+ (D) => Cesium.Cartesian3.distance(
195482
195496
  Cesium.Cartesian3.fromDegrees(
195483
- l.longitude,
195484
- l.latitude,
195485
- l.altitude
195497
+ D.longitude,
195498
+ D.latitude,
195499
+ D.altitude
195486
195500
  ),
195487
- r
195501
+ o
195488
195502
  )
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
- });
195503
+ ), l = Math.max(...a);
195504
+ s = new Cesium.BoundingSphere(o, l);
195515
195505
  }
195516
195506
  break;
195517
195507
  case 1:
195518
195508
  {
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_,
195509
+ let o = this.MapLocation_Temp.ID, a;
195510
+ if (o && (a = k.get3DTileset(o)), a)
195511
+ if (a.data_.type === 3 || a.data_.type === 5)
195512
+ if (a.pcdCenter_ || a.plyCenter_)
195513
+ a.pcdCenter_ && (s = new Cesium.BoundingSphere(
195514
+ a.pcdCenter_,
195526
195515
  1e3
195527
- )), s.plyCenter_ && (o = new Cesium.BoundingSphere(
195528
- s.plyCenter_,
195516
+ )), a.plyCenter_ && (s = new Cesium.BoundingSphere(
195517
+ a.plyCenter_,
195529
195518
  1e3
195530
195519
  ));
195531
195520
  else
195532
195521
  return;
195533
195522
  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
- }
195523
+ s = a.tilesetInstance_.boundingSphere;
195562
195524
  }
195563
195525
  break;
195564
195526
  case 2:
195565
195527
  {
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
- }
195528
+ let o = this.MapLocation_Temp.ID, a;
195529
+ o && (a = k.getModel(o)), a && (s = a.modelInstance_.boundingSphere);
195593
195530
  }
195594
195531
  break;
195595
195532
  case 3:
195596
195533
  {
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
- }
195534
+ let o = this.MapLocation_Temp.ID, a;
195535
+ o && (a = k.getVectorData(o)), a && (s = new Cesium.BoundingSphere(
195536
+ k.transformCartesian3(a.center_),
195537
+ a.radius_
195538
+ ));
195625
195539
  }
195626
195540
  break;
195627
195541
  case 4:
195542
+ return;
195543
+ }
195544
+ if (s && (n === 0 || n === 1 || n === 2 || n === 3)) {
195545
+ let o = s.radius + A;
195546
+ this.MapEngine_Temp.camera = {
195547
+ heading: 0,
195548
+ pitch: -90
195549
+ }, this.MapEngine_Temp.center = k.transformCoordinate(s.center);
195550
+ let a = k.calculateZoom(
195551
+ k.calcResolutionForDistance(
195552
+ this.containerID,
195553
+ o,
195554
+ this.MapEngine_Temp.center?.latitude ?? 0
195555
+ ),
195556
+ i
195557
+ );
195558
+ this.syncZoom(a), r.scene.camera.frustum instanceof Cesium.OrthographicFrustum ? (a > t && (a = t, this.syncZoom(a)), k.setMapEnginePosition(
195628
195559
  {
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
- });
195560
+ containerID: this.containerID,
195561
+ center: this.MapEngine_Temp.center,
195562
+ camera: this.MapEngine_Temp.camera
195563
+ },
195564
+ a,
195565
+ !1,
195566
+ !1,
195567
+ !1,
195568
+ () => {
195569
+ this.refreshZoom();
195570
+ }
195571
+ )) : a > t ? (a = t, this.syncZoom(a), k.setMapEnginePosition(
195572
+ this.MapEngine_Temp,
195573
+ a,
195574
+ !1,
195575
+ !1,
195576
+ !1,
195577
+ () => {
195578
+ this.refreshZoom();
195579
+ }
195580
+ )) : r.scene.camera.flyToBoundingSphere(
195581
+ s,
195582
+ {
195583
+ duration: e,
195584
+ offset: new Cesium.HeadingPitchRange(
195585
+ Cesium.Math.toRadians(this.MapEngine_Temp?.camera?.heading ?? 0),
195586
+ Cesium.Math.toRadians(this.MapEngine_Temp?.camera?.pitch ?? -90),
195587
+ o
195588
+ ),
195589
+ complete: () => {
195590
+ this.refreshZoom();
195660
195591
  }
195661
195592
  }
195662
- break;
195593
+ ), this.MapLocation_Temp = void 0;
195663
195594
  }
195664
- else {
195665
- let r = k.getMapEngineInstance(this.maptalksID);
195666
- if (r)
195595
+ } else {
195596
+ let s = k.getMapEngineInstance(this.maptalksID);
195597
+ if (s)
195667
195598
  switch (n) {
195668
195599
  case 0:
195669
195600
  {
195670
- let s = this.MapLocation_Temp.positions.map(
195671
- (P) => [P.longitude, P.latitude]
195672
- ), o = wm(s), a = Pf(
195673
- EE(Vs(o)),
195601
+ let o = this.MapLocation_Temp.positions.map(
195602
+ (c) => [c.longitude, c.latitude]
195603
+ ), a = wm(o), l = Pf(
195604
+ EE(Vs(a)),
195674
195605
  A,
195675
195606
  {
195676
195607
  units: "meters"
195677
195608
  }
195678
- ), l = Vs(a), D = new pn(
195679
- l[0],
195680
- l[1],
195681
- l[2],
195682
- l[3]
195609
+ ), D = Vs(l), P = new pn(
195610
+ D[0],
195611
+ D[1],
195612
+ D[2],
195613
+ D[3]
195683
195614
  );
195684
- r.fitExtent(
195685
- D,
195615
+ s.fitExtent(
195616
+ P,
195686
195617
  0,
195687
195618
  { duration: e },
195688
- (P) => {
195689
- P.playState === "finished" && (this.MapLocation_Temp = void 0, r.getZoom() > t && r.setZoom(t));
195619
+ (c) => {
195620
+ c.playState === "finished" && (this.MapLocation_Temp = void 0, s.getZoom() > t && s.setZoom(t));
195690
195621
  }
195691
195622
  );
195692
195623
  }
195693
195624
  break;
195694
195625
  case 3:
195695
195626
  {
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
195627
+ let o = this.MapLocation_Temp.ID, a;
195628
+ if (o && (a = k.getVectorData(o)), a && Array.isArray(a.primitives_)) {
195629
+ let l = [];
195630
+ for (const h of a.primitives_) {
195631
+ let g = h.getExtent().toJSON(), u = [
195632
+ g.xmin,
195633
+ g.ymin,
195634
+ g.xmax,
195635
+ g.ymax
195705
195636
  ];
195706
- a.push(EE(g));
195637
+ l.push(EE(u));
195707
195638
  }
195708
- let l = tl(a), D = Vs(l), P = new pn(
195709
- D[0],
195710
- D[1],
195711
- D[2],
195712
- D[3]
195639
+ let D = tl(l), P = Vs(D), c = new pn(
195640
+ P[0],
195641
+ P[1],
195642
+ P[2],
195643
+ P[3]
195713
195644
  );
195714
- r.fitExtent(
195715
- P,
195645
+ s.fitExtent(
195646
+ c,
195716
195647
  0,
195717
195648
  { duration: e },
195718
- (c) => {
195719
- c.playState === "finished" && (this.MapLocation_Temp = void 0, r.getZoom() > t && r.setZoom(t));
195649
+ (h) => {
195650
+ h.playState === "finished" && (this.MapLocation_Temp = void 0, s.getZoom() > t && s.setZoom(t));
195720
195651
  }
195721
195652
  );
195722
195653
  }
@@ -195797,7 +195728,11 @@ const zte = (n, A) => {
195797
195728
  if (L && (m = new Cesium.ImageryLayer(L, {
195798
195729
  show: u,
195799
195730
  splitDirection: E
195800
- }), i.imageryLayers.add(m), c)) {
195731
+ }), m.readyEvent.addEventListener((b) => {
195732
+ console.log("readyEvent", b);
195733
+ }), m.errorEvent.addEventListener((b) => {
195734
+ console.log("errorEvent", b);
195735
+ }), i.imageryLayers.add(m), console.log(m), c)) {
195801
195736
  let b = Cesium.Color.fromCssColorString(
195802
195737
  k.setMapColor(c)
195803
195738
  );
@@ -195942,7 +195877,7 @@ const zte = (n, A) => {
195942
195877
  let D = k.getNoFly(l);
195943
195878
  D && (k.removeNoFly(l), D.clear());
195944
195879
  },
195945
- 500
195880
+ 50
195946
195881
  ), console.log(`删除了${n}数据>>>>>>>>>>`, i));
195947
195882
  const r = t.changed ?? [];
195948
195883
  Array.isArray(r) && r.length && (await this.processArrayAsync(
@@ -195952,7 +195887,7 @@ const zte = (n, A) => {
195952
195887
  let D = k.getNoFly(l);
195953
195888
  D && D.DataProcessing(cA.cloneDeep(a));
195954
195889
  },
195955
- 500
195890
+ 50
195956
195891
  ), console.log(`更新了${n}数据>>>>>>>>>>`, r));
195957
195892
  const s = k.getMapEngineInstance(this.cesiumID), o = t.added ?? [];
195958
195893
  Array.isArray(o) && o.length && (await this.processArrayAsync(
@@ -196003,13 +195938,15 @@ const zte = (n, A) => {
196003
195938
  }
196004
195939
  D && (k.setNoFly(l, D), D.DataProcessing(cA.cloneDeep(a)));
196005
195940
  },
196006
- 500
195941
+ 50
196007
195942
  ).then((a) => {
196008
195943
  console.log("新增完成");
196009
195944
  }), console.log(`新增了${n}数据>>>>>>>>>>`, o));
196010
195945
  });
196011
195946
  },
196012
195947
  async setZYWLAnnotations(n, A) {
195948
+ console.time("标注");
195949
+ const e = 500;
196013
195950
  await this.handleCRUDData(n, A, async (t) => {
196014
195951
  const i = t.removed ?? [];
196015
195952
  Array.isArray(i) && i.length && (await this.processArrayAsync(
@@ -196019,7 +195956,7 @@ const zte = (n, A) => {
196019
195956
  let D = k.getAnnotation(l);
196020
195957
  D && (k.removeAnnotation(l), D.clear());
196021
195958
  },
196022
- 500
195959
+ e
196023
195960
  ), console.log(`删除了${n}数据>>>>>>>>>>`, i));
196024
195961
  const r = t.changed ?? [];
196025
195962
  Array.isArray(r) && r.length && (await this.processArrayAsync(
@@ -196029,7 +195966,7 @@ const zte = (n, A) => {
196029
195966
  let D = k.getAnnotation(l);
196030
195967
  D && D.DataProcessing(cA.cloneDeep(a));
196031
195968
  },
196032
- 500
195969
+ e
196033
195970
  ), console.log(`更新了${n}数据>>>>>>>>>>`, r));
196034
195971
  const s = k.getMapEngineInstance(this.cesiumID), o = t.added ?? [];
196035
195972
  Array.isArray(o) && o.length && (await this.processArrayAsync(
@@ -196086,8 +196023,8 @@ const zte = (n, A) => {
196086
196023
  }
196087
196024
  D && (k.setAnnotation(l, D), D.DataProcessing(cA.cloneDeep(a)));
196088
196025
  },
196089
- 500
196090
- ), console.log(`新增了${n}数据>>>>>>>>>>`, o));
196026
+ e
196027
+ ), console.log(`新增了${n}数据>>>>>>>>>>`, o), console.timeEnd("标注"));
196091
196028
  });
196092
196029
  },
196093
196030
  async setZYWLFlightPaths(n, A) {
@@ -196374,7 +196311,7 @@ const zte = (n, A) => {
196374
196311
  let D = k.getCustomNoFlyZone(l);
196375
196312
  D && (k.removeCustomNoFlyZone(l), D.clear());
196376
196313
  },
196377
- 500
196314
+ 50
196378
196315
  ), console.log(`删除了${n}数据>>>>>>>>>>`, i));
196379
196316
  const r = t.changed ?? [];
196380
196317
  Array.isArray(r) && r.length && (await this.processArrayAsync(
@@ -196384,7 +196321,7 @@ const zte = (n, A) => {
196384
196321
  let D = k.getCustomNoFlyZone(l);
196385
196322
  D && D.DataProcessing(cA.cloneDeep(a));
196386
196323
  },
196387
- 500
196324
+ 50
196388
196325
  ), console.log(`更新了${n}数据>>>>>>>>>>`, r));
196389
196326
  const s = k.getMapEngineInstance(this.cesiumID), o = t.added ?? [];
196390
196327
  Array.isArray(o) && o.length && (await this.processArrayAsync(
@@ -196414,7 +196351,7 @@ const zte = (n, A) => {
196414
196351
  }
196415
196352
  D && (k.setCustomNoFlyZone(l, D), D.DataProcessing(cA.cloneDeep(a)));
196416
196353
  },
196417
- 500
196354
+ 50
196418
196355
  ), console.log(`新增了${n}数据>>>>>>>>>>`, o));
196419
196356
  });
196420
196357
  },