earthsdk3-cesium 3.6.0-beta.119 → 3.6.0-beta.120
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/earthsdk3-cesium.iife.js +9 -9
- package/dist/earthsdk3-cesium.js +55 -46
- package/dist/earthsdk3-cesium.umd.cjs +5 -5
- package/dist/types/CzmObjects/general/CzmESMVTLayer/VectorTilesManager/VectorTilesCache.d.ts.map +1 -1
- package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/ScreenLayer.d.ts.map +1 -1
- package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/ScreenObject.d.ts +3 -0
- package/dist/types/ESCesiumViewer/ViewerExtensions/ScreenManager/ScreenObject.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/earthsdk3-cesium.js
CHANGED
|
@@ -25881,7 +25881,7 @@ g(ri, "createDefaultProps", () => ({
|
|
|
25881
25881
|
maximumLevel: 18,
|
|
25882
25882
|
minimumLevel: 0,
|
|
25883
25883
|
style: K([]),
|
|
25884
|
-
scheme: U("
|
|
25884
|
+
scheme: U("xyz"),
|
|
25885
25885
|
/**
|
|
25886
25886
|
* 分割方向
|
|
25887
25887
|
* @deprecated 未来会移除,请使用splitDirection代替 */
|
|
@@ -33449,7 +33449,7 @@ class oR extends F {
|
|
|
33449
33449
|
g(this, "czmViewer");
|
|
33450
33450
|
g(this, "czmESMVTLayer");
|
|
33451
33451
|
g(this, "screenManager");
|
|
33452
|
-
g(this, "cacheSize",
|
|
33452
|
+
g(this, "cacheSize", 300);
|
|
33453
33453
|
// 请求Url,一个服务有可能会有多个pbf文件
|
|
33454
33454
|
g(this, "urlMap", /* @__PURE__ */ new Map());
|
|
33455
33455
|
// 瓦片方案
|
|
@@ -33504,23 +33504,28 @@ class oR extends F {
|
|
|
33504
33504
|
(r = this.cache) == null || r.set(e, /* @__PURE__ */ new Map()), this.requestImage(o, n, s, e);
|
|
33505
33505
|
}
|
|
33506
33506
|
updateTiles(e, s = "hide") {
|
|
33507
|
-
var o, n;
|
|
33508
|
-
for (let
|
|
33509
|
-
const
|
|
33510
|
-
if (
|
|
33511
|
-
const
|
|
33512
|
-
for (let
|
|
33513
|
-
const
|
|
33514
|
-
|
|
33507
|
+
var o, n, r, a, l;
|
|
33508
|
+
for (let c = 0; c < e.length; c++) {
|
|
33509
|
+
const d = e[c], u = this.lastTiles.get(d);
|
|
33510
|
+
if (u) {
|
|
33511
|
+
const p = Object.keys(u.featureTable);
|
|
33512
|
+
for (let f = 0; f < p.length; f++) {
|
|
33513
|
+
const m = p[f], v = u.featureTable[m];
|
|
33514
|
+
if (s == "delete")
|
|
33515
|
+
(o = this.screenManager) == null || o.remove(u.layer, u.id, v);
|
|
33516
|
+
else {
|
|
33517
|
+
const y = (n = this.cache) == null ? void 0 : n.get(d);
|
|
33518
|
+
y && ((r = this.cache) == null || r.delete(d), (a = this.cache) == null || a.set(d, y)), this.screenManager.avoidanceManager.enable || (l = this.screenManager) == null || l.update(u.layer, u.id, v, { all: { show: s == "show" } });
|
|
33519
|
+
}
|
|
33515
33520
|
}
|
|
33516
33521
|
}
|
|
33517
|
-
s == "delete" && this.lastTiles.delete(
|
|
33522
|
+
s == "delete" && this.lastTiles.delete(d);
|
|
33518
33523
|
}
|
|
33519
33524
|
}
|
|
33520
33525
|
// 更新瓦片数据
|
|
33521
33526
|
update(e) {
|
|
33522
33527
|
const s = Array.from(this.lastTiles.keys()), o = s.filter((a) => !e.includes(a)), n = s.filter((a) => e.includes(a)), r = e.filter((a) => !s.includes(a));
|
|
33523
|
-
this.updateTiles(o), this.updateTiles(n, "show");
|
|
33528
|
+
this.updateTiles(o, "delete"), this.updateTiles(n, "show");
|
|
33524
33529
|
for (let a = 0; a < r.length; a++) {
|
|
33525
33530
|
const l = r[a];
|
|
33526
33531
|
this.addTiles(l);
|
|
@@ -33535,19 +33540,19 @@ class oR extends F {
|
|
|
33535
33540
|
var u, p;
|
|
33536
33541
|
if (d.ok && ((u = this.cache) != null && u.has(n)) && ((p = this.cache.get(n)) == null ? void 0 : p.size) == 0) return d.arrayBuffer();
|
|
33537
33542
|
}).then((d) => {
|
|
33538
|
-
var m;
|
|
33543
|
+
var m, v, y;
|
|
33539
33544
|
const u = new px(d), p = new fx(u), f = /* @__PURE__ */ new Map();
|
|
33540
|
-
for (const
|
|
33541
|
-
const
|
|
33542
|
-
if (
|
|
33543
|
-
const
|
|
33544
|
-
for (let
|
|
33545
|
-
const
|
|
33546
|
-
|
|
33545
|
+
for (const _ in p.layers) {
|
|
33546
|
+
const w = p.layers[_];
|
|
33547
|
+
if (w.length <= 0 || w.feature(0).type !== 1) continue;
|
|
33548
|
+
const b = [];
|
|
33549
|
+
for (let T = 0; T < w.length; T++) {
|
|
33550
|
+
const A = w.feature(T);
|
|
33551
|
+
b.push(A.toGeoJSON(e, s, o));
|
|
33547
33552
|
}
|
|
33548
|
-
f.set(
|
|
33553
|
+
f.set(_, b);
|
|
33549
33554
|
}
|
|
33550
|
-
(m = this.cache) == null ||
|
|
33555
|
+
(m = this.cache) != null && m.has(n) && ((v = this.cache.get(n)) == null ? void 0 : v.size) == 0 && ((y = this.cache) == null || y.set(n, f), this.addScreenManage(n, f), this.clearCache());
|
|
33551
33556
|
});
|
|
33552
33557
|
}
|
|
33553
33558
|
});
|
|
@@ -33562,22 +33567,23 @@ class oR extends F {
|
|
|
33562
33567
|
}
|
|
33563
33568
|
}
|
|
33564
33569
|
addScreenManage(e, s) {
|
|
33570
|
+
var n, r;
|
|
33565
33571
|
this.lastTiles.set(e, { layer: "default", id: this.czmESMVTLayer.sceneObject.id, featureTable: {} });
|
|
33566
33572
|
const o = this.lastTiles.get(e);
|
|
33567
|
-
for (const [
|
|
33568
|
-
const
|
|
33569
|
-
for (const
|
|
33570
|
-
const { labelStyle:
|
|
33571
|
-
let
|
|
33572
|
-
|
|
33573
|
-
position:
|
|
33574
|
-
name:
|
|
33575
|
-
index:
|
|
33576
|
-
})),
|
|
33577
|
-
position:
|
|
33578
|
-
name:
|
|
33579
|
-
index:
|
|
33580
|
-
})), o.featureTable[
|
|
33573
|
+
for (const [a, l] of s.entries()) {
|
|
33574
|
+
const c = this.czmESMVTLayer.mvtLayerJson.pointJson.find((d) => d["source-layer"] == a) ?? {};
|
|
33575
|
+
for (const d of l) {
|
|
33576
|
+
const { labelStyle: u, billboardStyle: p } = sR(c);
|
|
33577
|
+
let f, m;
|
|
33578
|
+
u && (u.show = !this.screenManager.avoidanceManager.enable, f = this.screenManager.addLabel(this.czmESMVTLayer.sceneObject.id, "default", u ?? {}, {
|
|
33579
|
+
position: d.geometry.coordinates,
|
|
33580
|
+
name: d.properties.NAME ?? d.properties.name,
|
|
33581
|
+
index: d.id ?? c["source-layer"] + ((n = d == null ? void 0 : d.properties) == null ? void 0 : n.osm_id)
|
|
33582
|
+
})), p && (p.show = !this.screenManager.avoidanceManager.enable, m = this.screenManager.addImage(this.czmESMVTLayer.sceneObject.id, "default", p ?? {}, {
|
|
33583
|
+
position: d.geometry.coordinates,
|
|
33584
|
+
name: d.properties.NAME ?? d.properties.name,
|
|
33585
|
+
index: d.id ?? c["source-layer"] + ((r = d == null ? void 0 : d.properties) == null ? void 0 : r.osm_id)
|
|
33586
|
+
})), o.featureTable[a] || (o.featureTable[a] = []), f && o.featureTable[a].push(f.screenObjectId), m && o.featureTable[a].push(m.screenObjectId);
|
|
33581
33587
|
}
|
|
33582
33588
|
}
|
|
33583
33589
|
}
|
|
@@ -46683,6 +46689,9 @@ class _5 extends F {
|
|
|
46683
46689
|
g(this, "billboard");
|
|
46684
46690
|
g(this, "rectangle");
|
|
46685
46691
|
g(this, "zOrder");
|
|
46692
|
+
g(this, "labelRefCount", 1);
|
|
46693
|
+
g(this, "billboardRefCount", 1);
|
|
46694
|
+
g(this, "rectangleRefCount", 1);
|
|
46686
46695
|
g(this, "_showEvent", this.disposeVar(new q()));
|
|
46687
46696
|
this.id = e, this.position = s, this.ad(this.showEvent.don((o) => {
|
|
46688
46697
|
this.updateShow(o);
|
|
@@ -46731,7 +46740,7 @@ class P5 extends F {
|
|
|
46731
46740
|
addLabel(e, s, o) {
|
|
46732
46741
|
const n = this.makeScreenObjectId(e, o.index ?? We()), r = Xe(o.position), a = this.getOrCreateObject(n, r);
|
|
46733
46742
|
if (a.label)
|
|
46734
|
-
return n;
|
|
46743
|
+
return a.labelRefCount++, n;
|
|
46735
46744
|
const l = this.screenManager.labelCollection.add({
|
|
46736
46745
|
...s,
|
|
46737
46746
|
position: r,
|
|
@@ -46755,7 +46764,7 @@ class P5 extends F {
|
|
|
46755
46764
|
addImage(e, s, o) {
|
|
46756
46765
|
const n = this.makeScreenObjectId(e, o.index ?? We()), r = Xe(o.position), a = this.getOrCreateObject(n, r);
|
|
46757
46766
|
if (a.billboard)
|
|
46758
|
-
return n;
|
|
46767
|
+
return a.billboardRefCount++, n;
|
|
46759
46768
|
const l = this.screenManager.billboardCollection.add({
|
|
46760
46769
|
...s,
|
|
46761
46770
|
position: r,
|
|
@@ -46779,7 +46788,7 @@ class P5 extends F {
|
|
|
46779
46788
|
addRectangle(e, s, o, n) {
|
|
46780
46789
|
const r = this.makeScreenObjectId(e, o.index ?? We()), a = Xe(o.position), l = this.getOrCreateObject(r, a);
|
|
46781
46790
|
if (l.rectangle)
|
|
46782
|
-
return r;
|
|
46791
|
+
return l.rectangleRefCount++, r;
|
|
46783
46792
|
const c = this.screenManager.rectangleCollection.add({
|
|
46784
46793
|
...C5(s.element),
|
|
46785
46794
|
...s,
|
|
@@ -46824,7 +46833,7 @@ class P5 extends F {
|
|
|
46824
46833
|
if (Array.isArray(s)) {
|
|
46825
46834
|
for (const o of s) {
|
|
46826
46835
|
const n = this.objects.get(o);
|
|
46827
|
-
n && (n.label && (this.screenManager.labelCollection.remove(n.label), n.label = void 0), n.billboard && (this.screenManager.billboardCollection.remove(n.billboard), n.billboard = void 0), n.rectangle && (this.screenManager.rectangleCollection.remove(n.rectangle), n.rectangle = void 0), this.tryDeleteEmpty(o));
|
|
46836
|
+
n && (n.label && (n.labelRefCount > 1 ? n.labelRefCount-- : (this.screenManager.labelCollection.remove(n.label), n.label = void 0)), n.billboard && (n.billboardRefCount > 1 ? n.billboardRefCount-- : (this.screenManager.billboardCollection.remove(n.billboard), n.billboard = void 0)), n.rectangle && (n.rectangleRefCount > 1 ? n.rectangleRefCount-- : (this.screenManager.rectangleCollection.remove(n.rectangle), n.rectangle = void 0)), this.tryDeleteEmpty(o));
|
|
46828
46837
|
}
|
|
46829
46838
|
return !0;
|
|
46830
46839
|
} else {
|
|
@@ -46903,7 +46912,7 @@ class b5 extends F {
|
|
|
46903
46912
|
o.show(!0);
|
|
46904
46913
|
});
|
|
46905
46914
|
}
|
|
46906
|
-
this.forceRebuildNext = !0
|
|
46915
|
+
this.forceRebuildNext = !0;
|
|
46907
46916
|
}
|
|
46908
46917
|
updateAvoidanceLayer(e, s) {
|
|
46909
46918
|
this.enable = (e == null ? void 0 : e.enabled) ?? !1, s ? e != null && e.enabled ? this.avoidanceLayers.includes(s) || this.avoidanceLayers.push(s) : this.avoidanceLayers = this.avoidanceLayers.filter((o) => o != s) : e != null && e.enabled ? this.avoidanceLayers = Array.from(this.screenManager.layers.keys()) : (this.setAvoidanceLayer(), this.avoidanceLayers = []), this.setAvoidanceLayer();
|
|
@@ -50958,7 +50967,7 @@ let Ye = _t;
|
|
|
50958
50967
|
le(Ye.prototype, Ye.createDefaultProps);
|
|
50959
50968
|
let rp;
|
|
50960
50969
|
try {
|
|
50961
|
-
const t = "earthsdk3-cesium", i = "3.6.0-beta.
|
|
50970
|
+
const t = "earthsdk3-cesium", i = "3.6.0-beta.120", e = "2025-11-05T02:39:09.000Z", s = "北京西部世界科技有限公司", o = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "f37d1422a6b0b8a0489d1bcf153ee59a0a39c2d5", a = ((Date.now() - 1762310349e3) / 36e5).toFixed(1), l = `%c🌏 ${t}%c ${i}.${n.slice(0, 8)}.${e} (距今${a}个小时)
|
|
50962
50971
|
%c${o ? o + `
|
|
50963
50972
|
` : ""}当前网站正在使用${t},此软件版权归${s}所有
|
|
50964
50973
|
`;
|
|
@@ -50972,7 +50981,7 @@ try {
|
|
|
50972
50981
|
},
|
|
50973
50982
|
// @ts-ignore
|
|
50974
50983
|
get gituri() {
|
|
50975
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
50984
|
+
return GITURI_ && GITURI_.replace("${commitId}", "f37d1422a6b0b8a0489d1bcf153ee59a0a39c2d5");
|
|
50976
50985
|
},
|
|
50977
50986
|
// @ts-ignore
|
|
50978
50987
|
get info() {
|
|
@@ -50980,7 +50989,7 @@ try {
|
|
|
50980
50989
|
},
|
|
50981
50990
|
// @ts-ignore
|
|
50982
50991
|
get date() {
|
|
50983
|
-
return "2025-11-
|
|
50992
|
+
return "2025-11-05T02:39:09.000Z";
|
|
50984
50993
|
},
|
|
50985
50994
|
// @ts-ignore
|
|
50986
50995
|
get author() {
|
|
@@ -50988,7 +50997,7 @@ try {
|
|
|
50988
50997
|
},
|
|
50989
50998
|
// @ts-ignore
|
|
50990
50999
|
get version() {
|
|
50991
|
-
return "3.6.0-beta.
|
|
51000
|
+
return "3.6.0-beta.120";
|
|
50992
51001
|
},
|
|
50993
51002
|
// @ts-ignore
|
|
50994
51003
|
get name() {
|
|
@@ -50996,7 +51005,7 @@ try {
|
|
|
50996
51005
|
},
|
|
50997
51006
|
// @ts-ignore
|
|
50998
51007
|
get commitId() {
|
|
50999
|
-
return "
|
|
51008
|
+
return "f37d1422a6b0b8a0489d1bcf153ee59a0a39c2d5";
|
|
51000
51009
|
},
|
|
51001
51010
|
print() {
|
|
51002
51011
|
console.info(
|