@skzz/components-gis 0.1.5 → 0.1.6

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.
Files changed (37) hide show
  1. package/dist/assets/twinPreviewWorker-DvpSZYqE.js +3 -0
  2. package/dist/assets/twinTextureMipWorker-BWoFEUdX.js +3 -0
  3. package/dist/index.d.ts +5 -4
  4. package/dist/index.es.js +380 -360
  5. package/dist/index.umd.js +209 -5
  6. package/dist/tw2Parser-Dxs5xGvB.js +115 -0
  7. package/dist/zz-layer/zz-layer-shp-zzts/shpZztsBounds.d.ts +19 -0
  8. package/dist/zz-layer/zz-layer-shp-zzts/shpZztsGeometry.d.ts +27 -0
  9. package/dist/zz-layer/zz-layer-shp-zzts/shpZztsGeometryWorker.d.ts +1 -0
  10. package/dist/zz-layer/zz-layer-shp-zzts/shpZztsPreviewBudget.d.ts +78 -0
  11. package/dist/zz-layer/zz-layer-shp-zzts/shpZztsRenderer.d.ts +217 -22
  12. package/dist/zz-layer/zz-layer-shp-zzts/shpZztsViewState.d.ts +20 -0
  13. package/dist/zz-layer/zz-layer-zzts3dv2/entityGridV2.d.ts +277 -0
  14. package/dist/zz-layer/zz-layer-zzts3dv2/index.vue.d.ts +1 -1
  15. package/dist/zz-layer/zz-layer-zzts3dv2/tw2Parser.d.ts +7 -0
  16. package/dist/zz-layer/zz-layer-zzts3dv2/twinAdaptiveMesh.d.ts +3 -0
  17. package/dist/zz-layer/zz-layer-zzts3dv2/twinCoarseLod.d.ts +4 -0
  18. package/dist/zz-layer/zz-layer-zzts3dv2/twinEnvironmentLighting.d.ts +16 -0
  19. package/dist/zz-layer/zz-layer-zzts3dv2/twinImagePixels.d.ts +6 -0
  20. package/dist/zz-layer/zz-layer-zzts3dv2/twinPagedIndex.d.ts +8 -0
  21. package/dist/zz-layer/zz-layer-zzts3dv2/twinParsePool.d.ts +10 -0
  22. package/dist/zz-layer/zz-layer-zzts3dv2/twinPreviewWorker.d.ts +1 -1
  23. package/dist/zz-layer/zz-layer-zzts3dv2/twinRegionalIndex.d.ts +23 -0
  24. package/dist/zz-layer/zz-layer-zzts3dv2/twinResourceBatch.d.ts +34 -0
  25. package/dist/zz-layer/zz-layer-zzts3dv2/twinTextureAppearance.d.ts +89 -0
  26. package/dist/zz-layer/zz-layer-zzts3dv2/twinTextureMipWorker.d.ts +1 -0
  27. package/dist/zz-layer/zz-layer-zzts3dv2/twinVisualRuntime.d.ts +107 -0
  28. package/dist/zz-layer-shp-zzts-Dr3Gxeba.js +1881 -0
  29. package/dist/{zz-layer-zzts3d-DqZmLdW3.js → zz-layer-zzts3d-CsIWse3P.js} +1 -1
  30. package/dist/{zz-layer-zzts3d-las-hNa-nqxq.js → zz-layer-zzts3d-las-D3w01aGe.js} +6 -5
  31. package/dist/{zz-layer-zzts3d-point-DrB5Uuwa.js → zz-layer-zzts3d-point-BjaTPTqj.js} +6 -4
  32. package/dist/zz-layer-zzts3dv2-DFXCOaMe.js +4019 -0
  33. package/dist/{zzts3dLayerSignature-Cnu6KIys.js → zzts3dLayerSignature-DzrPeJTd.js} +2 -0
  34. package/package.json +4 -3
  35. package/dist/assets/twinPreviewWorker-COILIqOa.js +0 -1
  36. package/dist/zz-layer-shp-zzts-D8BjI5tI.js +0 -1323
  37. package/dist/zz-layer-zzts3dv2-D5udnVGT.js +0 -913
@@ -1,7 +1,7 @@
1
1
  import { a as e, r as t, u as n } from "./layerStack-CbiVJONn.js";
2
2
  import { t as r } from "./pako.esm-D6zcBi67.js";
3
3
  import { n as i, t as a } from "./esm-BXiGX6xE.js";
4
- import { n as o, t as s } from "./zzts3dLayerSignature-Cnu6KIys.js";
4
+ import { n as o, t as s } from "./zzts3dLayerSignature-DzrPeJTd.js";
5
5
  import { computed as c, inject as l, onUnmounted as u, ref as d, watch as f } from "vue";
6
6
  import { IndexedDBManager as p, httpService as m } from "@skzz/libs-base";
7
7
  import h from "axios";
@@ -284,7 +284,7 @@ function w(e) {
284
284
  }
285
285
  var T = class {
286
286
  constructor(e = {}) {
287
- this.id = e.layerId, this.pointSize = e.pointSize ?? 2, this.opacity = e.opacity ?? 1, this.colorMode = e.colorMode ?? "auto", this.fixedLevel = e.level ?? null, this.currentPrimitives = [], this.visibleTileKeys = /* @__PURE__ */ new Set(), this.loading = !1, this.pendingRefresh = !1, this.renderGeneration = 0, this.destroyed = !1, this.handlers = null, this.initTimer = null, this.parsedData = null, this.activeColorMode = "single", this.cancelSource = null, this.requestVersion = 0;
287
+ this.id = e.layerId, this.dataLayerId = e.dataLayerId || e.layerId, this.pointSize = e.pointSize ?? 2, this.opacity = e.opacity ?? 1, this.colorMode = e.colorMode ?? "auto", this.fixedLevel = e.level ?? null, this.currentPrimitives = [], this.visibleTileKeys = /* @__PURE__ */ new Set(), this.loading = !1, this.pendingRefresh = !1, this.renderGeneration = 0, this.destroyed = !1, this.handlers = null, this.initTimer = null, this.parsedData = null, this.activeColorMode = "single", this.cancelSource = null, this.requestVersion = 0;
288
288
  }
289
289
  async init() {
290
290
  this.initTimer = setTimeout(() => {
@@ -385,7 +385,7 @@ var T = class {
385
385
  let t = ++this.requestVersion, n = this.cancelSource;
386
386
  try {
387
387
  let r = viewer.scene.canvas, o = {
388
- layerId: this.id,
388
+ layerId: this.dataLayerId,
389
389
  region: e.join(","),
390
390
  height: String(r.clientHeight),
391
391
  width: String(r.clientWidth)
@@ -412,7 +412,7 @@ var T = class {
412
412
  if (await Promise.all(Array.from({ length: Math.min(g, c.length) }, async () => {
413
413
  for (; d < c.length;) {
414
414
  let e = d++, t = c[e], r = {
415
- layerId: this.id,
415
+ layerId: this.dataLayerId,
416
416
  geosot: t.geosot,
417
417
  level: String(t.level)
418
418
  }, i = Array.isArray(t.shards) ? t.shards.join(",") : t.hcode || "";
@@ -504,7 +504,7 @@ var T = class {
504
504
  if (!t) return console.error("[zzts3d-las] 创建图层失败:缺少 id 参数"), null;
505
505
  if (this.layers.has(t)) {
506
506
  let n = this.layers.get(t);
507
- return n.pointSize = e?.pointSize ?? n.pointSize, n.opacity = e?.opacity ?? n.opacity, n.colorMode = e?.colorMode ?? n.colorMode, n;
507
+ return n.pointSize = e?.pointSize ?? n.pointSize, n.dataLayerId = e?.dataLayerId || t, n.opacity = e?.opacity ?? n.opacity, n.colorMode = e?.colorMode ?? n.colorMode, n;
508
508
  }
509
509
  let n = new T(e);
510
510
  this.layers.set(t, n);
@@ -530,6 +530,7 @@ var T = class {
530
530
  setup(e) {
531
531
  let i = e, a = {
532
532
  layerId: "",
533
+ dataLayerId: "",
533
534
  colorMode: "auto",
534
535
  pointSize: 2,
535
536
  opacity: 1,
@@ -542,7 +543,7 @@ var T = class {
542
543
  let e = o.value;
543
544
  if (!e.layerId) return;
544
545
  let t = k(e.layerId);
545
- t ? (t.pointSize = e.pointSize, t.opacity = e.opacity, t.colorMode = e.colorMode) : await D(e);
546
+ t ? (t.pointSize = e.pointSize, t.dataLayerId = e.dataLayerId || e.layerId, t.opacity = e.opacity, t.colorMode = e.colorMode) : await D(e);
546
547
  }, l = () => {
547
548
  O(i.config?.layerId || o.value.layerId);
548
549
  };
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./pako.esm-D6zcBi67.js";
2
2
  import { n as t, t as n } from "./esm-BXiGX6xE.js";
3
- import { n as r, t as i } from "./zzts3dLayerSignature-Cnu6KIys.js";
3
+ import { n as r, t as i } from "./zzts3dLayerSignature-DzrPeJTd.js";
4
4
  import { computed as a, inject as o, onUnmounted as s, ref as c, shallowRef as l, watch as u } from "vue";
5
5
  import { IndexedDBManager as d, httpService as f, useDataService as p } from "@skzz/libs-base";
6
6
  import m from "axios";
@@ -126,7 +126,7 @@ function E(e, t) {
126
126
  }
127
127
  var D = class {
128
128
  constructor(e, t = !1, n = null, r = "255,255,255", i = 5, a = 1, o = {}) {
129
- this.id = e, this.viewer = o.viewer || null, this.isStatic = t, this.loadedTiles = /* @__PURE__ */ new Map(), this.currentTileIds = /* @__PURE__ */ new Set(), this.currentNewLevel = c(n || 15), this.gridDb = null, this.entityNum = 0, this.handlers = null, this.requestController = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.fadeAnimations = /* @__PURE__ */ new Map(), this.lastTime = 0, this.pointSize = i, this.opacity = a, this.fixedLevel = n, this.dictCode = o.dictCode || "", this.serviceName = o.serviceName || "", this.enableServiceColor = o.enableServiceColor === !0, this.modelColorUrl = o.modelColorUrl || "/v1/zzts/style/render/modelColors", this.displayRange = T(o.displayRange), this.modelColorCache = /* @__PURE__ */ new Map(), this.requestVersion = 0, this.destroyed = !1, this.initTimer = null, this.levels_add = window.levels_add_plus || 0, this.tileColor = r, this.tileSleepTime = window.tileSleepTime || 400, this.highlightModelId = null, this.highlightColor = "255,255,0", this.highlightOpacity = 1, this.highlightPointSize = null, this.modelPointIndex = /* @__PURE__ */ new Map(), this.tilePointIndex = /* @__PURE__ */ new Map(), this.modelCollections = /* @__PURE__ */ new Map(), this.renderedPointCount = 0, this.pointBudgetWarned = !1, this.maxRenderPoints = window.zztsPointRenderBudget || 12e5;
129
+ this.id = e, this.dataLayerId = o.dataLayerId || e, this.viewer = o.viewer || null, this.isStatic = t, this.loadedTiles = /* @__PURE__ */ new Map(), this.currentTileIds = /* @__PURE__ */ new Set(), this.currentNewLevel = c(n || 15), this.gridDb = null, this.entityNum = 0, this.handlers = null, this.requestController = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.fadeAnimations = /* @__PURE__ */ new Map(), this.lastTime = 0, this.pointSize = i, this.opacity = a, this.fixedLevel = n, this.dictCode = o.dictCode || "", this.serviceName = o.serviceName || "", this.enableServiceColor = o.enableServiceColor === !0, this.modelColorUrl = o.modelColorUrl || "/v1/zzts/style/render/modelColors", this.displayRange = T(o.displayRange), this.modelColorCache = /* @__PURE__ */ new Map(), this.requestVersion = 0, this.destroyed = !1, this.initTimer = null, this.levels_add = window.levels_add_plus || 0, this.tileColor = r, this.tileSleepTime = window.tileSleepTime || 400, this.highlightModelId = null, this.highlightColor = "255,255,0", this.highlightOpacity = 1, this.highlightPointSize = null, this.modelPointIndex = /* @__PURE__ */ new Map(), this.tilePointIndex = /* @__PURE__ */ new Map(), this.modelCollections = /* @__PURE__ */ new Map(), this.renderedPointCount = 0, this.pointBudgetWarned = !1, this.maxRenderPoints = window.zztsPointRenderBudget || 12e5;
130
130
  }
131
131
  getBaseStyle() {
132
132
  return {
@@ -435,7 +435,7 @@ var D = class {
435
435
  cacheId: i,
436
436
  data: (await f.request({
437
437
  method: "GET",
438
- url: `/v1/zzts/layer/3d/point/getTileNew?layerId=${this.id}&level=${t}&geosot=${e}`,
438
+ url: `/v1/zzts/layer/3d/point/getTileNew?layerId=${encodeURIComponent(this.dataLayerId)}&level=${t}&geosot=${e}`,
439
439
  headers: { Accept: "application/octet-stream" },
440
440
  responseType: "arraybuffer",
441
441
  timeout: 6e4,
@@ -581,7 +581,7 @@ var D = class {
581
581
  if (this.layers.has(t)) {
582
582
  console.warn(`图层 ${t} 已存在`);
583
583
  let o = this.layers.get(t), s = r(o.renderSignature, e || {});
584
- return n && (o.tileColor = n), o.dictCode = e?.dictCode || o.dictCode || "", o.serviceName = e?.serviceName || o.serviceName || "", e?.displayRange !== void 0 && (o.displayRange = T(e.displayRange)), e?.enableServiceColor !== void 0 && (o.enableServiceColor = !!e.enableServiceColor), o.modelColorUrl = e?.modelColorUrl || o.modelColorUrl || "/v1/zzts/style/render/modelColors", a != null && (o.fixedLevel = a, o.currentNewLevel.value = a), s && (o.renderSignature = i(e || {}), o.modelColorCache.clear(), o.clearAllTiles(), o.getViewportInfo()), o;
584
+ return n && (o.tileColor = n), o.dictCode = e?.dictCode || o.dictCode || "", o.dataLayerId = e?.dataLayerId || t, o.serviceName = e?.serviceName || o.serviceName || "", e?.displayRange !== void 0 && (o.displayRange = T(e.displayRange)), e?.enableServiceColor !== void 0 && (o.enableServiceColor = !!e.enableServiceColor), o.modelColorUrl = e?.modelColorUrl || o.modelColorUrl || "/v1/zzts/style/render/modelColors", a != null && (o.fixedLevel = a, o.currentNewLevel.value = a), s && (o.renderSignature = i(e || {}), o.modelColorCache.clear(), o.clearAllTiles(), o.getViewportInfo()), o;
585
585
  }
586
586
  let l = new D(t, o, a, n, s, c, e);
587
587
  l.renderSignature = i(e || {}), this.layers.set(t, l);
@@ -637,6 +637,7 @@ var M = {
637
637
  p();
638
638
  let i = e, d = t, m = l(null), h = l(null), g = c(null), _ = 0, v = 0, y = null, b = !1, x = {
639
639
  layerId: "",
640
+ dataLayerId: "",
640
641
  color: "255,255,255",
641
642
  isStatic: !1,
642
643
  level: null,
@@ -676,6 +677,7 @@ var M = {
676
677
  let t = e.level ? !0 : e.isStatic;
677
678
  return {
678
679
  layerId: e.layerId,
680
+ dataLayerId: e.dataLayerId || e.layerId,
679
681
  color: e.color,
680
682
  isStatic: t,
681
683
  level: e.level,