earthsdk3-cesium 3.6.0-beta.118 → 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 +64 -52
- package/dist/earthsdk3-cesium.umd.cjs +5 -5
- package/dist/types/CzmObjects/general/CzmESMVTLayer/VectorTilesManager/VectorTilesCache.d.ts.map +1 -1
- package/dist/types/CzmObjects/general/CzmESMVTLayer/index.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
|
// 瓦片方案
|
|
@@ -33483,8 +33483,8 @@ class oR extends F {
|
|
|
33483
33483
|
} while (!1);
|
|
33484
33484
|
})(), this.ad(() => {
|
|
33485
33485
|
var l;
|
|
33486
|
-
const a = this.lastTiles.values().
|
|
33487
|
-
a && ((l = this.screenManager) == null || l.remove(
|
|
33486
|
+
const a = Array.from(this.lastTiles.values()).map((c) => c.featureTable).map((c) => Object.values(c)).flat(1 / 0);
|
|
33487
|
+
a && ((l = this.screenManager) == null || l.remove("default", this.czmESMVTLayer.sceneObject.id, a)), this.cache && (this.cache.clear(), this.cache = null);
|
|
33488
33488
|
});
|
|
33489
33489
|
}
|
|
33490
33490
|
get cache() {
|
|
@@ -33504,28 +33504,32 @@ 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);
|
|
33527
33532
|
}
|
|
33528
|
-
this.clearCache();
|
|
33529
33533
|
}
|
|
33530
33534
|
requestImage(e, s, o, n) {
|
|
33531
33535
|
const r = this.tileScheme == "tms" ? Math.pow(2, o) - s - 1 : s;
|
|
@@ -33536,19 +33540,19 @@ class oR extends F {
|
|
|
33536
33540
|
var u, p;
|
|
33537
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();
|
|
33538
33542
|
}).then((d) => {
|
|
33539
|
-
var m;
|
|
33543
|
+
var m, v, y;
|
|
33540
33544
|
const u = new px(d), p = new fx(u), f = /* @__PURE__ */ new Map();
|
|
33541
|
-
for (const
|
|
33542
|
-
const
|
|
33543
|
-
if (
|
|
33544
|
-
const
|
|
33545
|
-
for (let
|
|
33546
|
-
const
|
|
33547
|
-
|
|
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));
|
|
33548
33552
|
}
|
|
33549
|
-
f.set(
|
|
33553
|
+
f.set(_, b);
|
|
33550
33554
|
}
|
|
33551
|
-
(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());
|
|
33552
33556
|
});
|
|
33553
33557
|
}
|
|
33554
33558
|
});
|
|
@@ -33559,26 +33563,27 @@ class oR extends F {
|
|
|
33559
33563
|
if (!(e <= 0))
|
|
33560
33564
|
for (let s = 0; s < e; s++) {
|
|
33561
33565
|
const o = this.cache.keys().next().value;
|
|
33562
|
-
o && this.cache.delete(o);
|
|
33566
|
+
o && (this.updateTiles([o], "delete"), this.cache.delete(o));
|
|
33563
33567
|
}
|
|
33564
33568
|
}
|
|
33565
33569
|
addScreenManage(e, s) {
|
|
33570
|
+
var n, r;
|
|
33566
33571
|
this.lastTiles.set(e, { layer: "default", id: this.czmESMVTLayer.sceneObject.id, featureTable: {} });
|
|
33567
33572
|
const o = this.lastTiles.get(e);
|
|
33568
|
-
for (const [
|
|
33569
|
-
const
|
|
33570
|
-
for (const
|
|
33571
|
-
const { labelStyle:
|
|
33572
|
-
let
|
|
33573
|
-
|
|
33574
|
-
position:
|
|
33575
|
-
name:
|
|
33576
|
-
index:
|
|
33577
|
-
})),
|
|
33578
|
-
position:
|
|
33579
|
-
name:
|
|
33580
|
-
index:
|
|
33581
|
-
})), 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);
|
|
33582
33587
|
}
|
|
33583
33588
|
}
|
|
33584
33589
|
}
|
|
@@ -33704,9 +33709,13 @@ const Bl = class Bl extends Zi {
|
|
|
33704
33709
|
e.schemeChanged,
|
|
33705
33710
|
e.maximumLevelChanged,
|
|
33706
33711
|
e.minimumLevelChanged,
|
|
33707
|
-
this.mvtLayerJsonChanged
|
|
33712
|
+
this.mvtLayerJsonChanged,
|
|
33713
|
+
e.showChanged
|
|
33708
33714
|
));
|
|
33709
|
-
this.ad(new he(r, () =>
|
|
33715
|
+
this.ad(new he(r, () => {
|
|
33716
|
+
if (e.show)
|
|
33717
|
+
return new nR(s, this);
|
|
33718
|
+
}));
|
|
33710
33719
|
}
|
|
33711
33720
|
get czmImagery() {
|
|
33712
33721
|
return this._czmImagery;
|
|
@@ -46680,6 +46689,9 @@ class _5 extends F {
|
|
|
46680
46689
|
g(this, "billboard");
|
|
46681
46690
|
g(this, "rectangle");
|
|
46682
46691
|
g(this, "zOrder");
|
|
46692
|
+
g(this, "labelRefCount", 1);
|
|
46693
|
+
g(this, "billboardRefCount", 1);
|
|
46694
|
+
g(this, "rectangleRefCount", 1);
|
|
46683
46695
|
g(this, "_showEvent", this.disposeVar(new q()));
|
|
46684
46696
|
this.id = e, this.position = s, this.ad(this.showEvent.don((o) => {
|
|
46685
46697
|
this.updateShow(o);
|
|
@@ -46728,7 +46740,7 @@ class P5 extends F {
|
|
|
46728
46740
|
addLabel(e, s, o) {
|
|
46729
46741
|
const n = this.makeScreenObjectId(e, o.index ?? We()), r = Xe(o.position), a = this.getOrCreateObject(n, r);
|
|
46730
46742
|
if (a.label)
|
|
46731
|
-
return n;
|
|
46743
|
+
return a.labelRefCount++, n;
|
|
46732
46744
|
const l = this.screenManager.labelCollection.add({
|
|
46733
46745
|
...s,
|
|
46734
46746
|
position: r,
|
|
@@ -46752,7 +46764,7 @@ class P5 extends F {
|
|
|
46752
46764
|
addImage(e, s, o) {
|
|
46753
46765
|
const n = this.makeScreenObjectId(e, o.index ?? We()), r = Xe(o.position), a = this.getOrCreateObject(n, r);
|
|
46754
46766
|
if (a.billboard)
|
|
46755
|
-
return n;
|
|
46767
|
+
return a.billboardRefCount++, n;
|
|
46756
46768
|
const l = this.screenManager.billboardCollection.add({
|
|
46757
46769
|
...s,
|
|
46758
46770
|
position: r,
|
|
@@ -46776,7 +46788,7 @@ class P5 extends F {
|
|
|
46776
46788
|
addRectangle(e, s, o, n) {
|
|
46777
46789
|
const r = this.makeScreenObjectId(e, o.index ?? We()), a = Xe(o.position), l = this.getOrCreateObject(r, a);
|
|
46778
46790
|
if (l.rectangle)
|
|
46779
|
-
return r;
|
|
46791
|
+
return l.rectangleRefCount++, r;
|
|
46780
46792
|
const c = this.screenManager.rectangleCollection.add({
|
|
46781
46793
|
...C5(s.element),
|
|
46782
46794
|
...s,
|
|
@@ -46821,7 +46833,7 @@ class P5 extends F {
|
|
|
46821
46833
|
if (Array.isArray(s)) {
|
|
46822
46834
|
for (const o of s) {
|
|
46823
46835
|
const n = this.objects.get(o);
|
|
46824
|
-
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));
|
|
46825
46837
|
}
|
|
46826
46838
|
return !0;
|
|
46827
46839
|
} else {
|
|
@@ -46900,7 +46912,7 @@ class b5 extends F {
|
|
|
46900
46912
|
o.show(!0);
|
|
46901
46913
|
});
|
|
46902
46914
|
}
|
|
46903
|
-
this.forceRebuildNext = !0
|
|
46915
|
+
this.forceRebuildNext = !0;
|
|
46904
46916
|
}
|
|
46905
46917
|
updateAvoidanceLayer(e, s) {
|
|
46906
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();
|
|
@@ -50955,7 +50967,7 @@ let Ye = _t;
|
|
|
50955
50967
|
le(Ye.prototype, Ye.createDefaultProps);
|
|
50956
50968
|
let rp;
|
|
50957
50969
|
try {
|
|
50958
|
-
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}个小时)
|
|
50959
50971
|
%c${o ? o + `
|
|
50960
50972
|
` : ""}当前网站正在使用${t},此软件版权归${s}所有
|
|
50961
50973
|
`;
|
|
@@ -50969,7 +50981,7 @@ try {
|
|
|
50969
50981
|
},
|
|
50970
50982
|
// @ts-ignore
|
|
50971
50983
|
get gituri() {
|
|
50972
|
-
return GITURI_ && GITURI_.replace("${commitId}", "
|
|
50984
|
+
return GITURI_ && GITURI_.replace("${commitId}", "f37d1422a6b0b8a0489d1bcf153ee59a0a39c2d5");
|
|
50973
50985
|
},
|
|
50974
50986
|
// @ts-ignore
|
|
50975
50987
|
get info() {
|
|
@@ -50977,7 +50989,7 @@ try {
|
|
|
50977
50989
|
},
|
|
50978
50990
|
// @ts-ignore
|
|
50979
50991
|
get date() {
|
|
50980
|
-
return "2025-11-
|
|
50992
|
+
return "2025-11-05T02:39:09.000Z";
|
|
50981
50993
|
},
|
|
50982
50994
|
// @ts-ignore
|
|
50983
50995
|
get author() {
|
|
@@ -50985,7 +50997,7 @@ try {
|
|
|
50985
50997
|
},
|
|
50986
50998
|
// @ts-ignore
|
|
50987
50999
|
get version() {
|
|
50988
|
-
return "3.6.0-beta.
|
|
51000
|
+
return "3.6.0-beta.120";
|
|
50989
51001
|
},
|
|
50990
51002
|
// @ts-ignore
|
|
50991
51003
|
get name() {
|
|
@@ -50993,7 +51005,7 @@ try {
|
|
|
50993
51005
|
},
|
|
50994
51006
|
// @ts-ignore
|
|
50995
51007
|
get commitId() {
|
|
50996
|
-
return "
|
|
51008
|
+
return "f37d1422a6b0b8a0489d1bcf153ee59a0a39c2d5";
|
|
50997
51009
|
},
|
|
50998
51010
|
print() {
|
|
50999
51011
|
console.info(
|