@skzz/components-gis 0.1.4 → 0.1.5
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/assets/twinPreviewWorker-COILIqOa.js +1 -0
- package/dist/color-DVYdxZow.js +359 -0
- package/dist/esm-BXiGX6xE.js +86 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +71 -6
- package/dist/index.es.js +1138 -9659
- package/dist/index.umd.js +5 -5
- package/dist/interpolation-Ctw2-y9G.js +211 -0
- package/dist/layerStack-CbiVJONn.js +181 -0
- package/dist/pako.esm-D6zcBi67.js +1455 -0
- package/dist/query-DgSNPfJM.js +239 -0
- package/dist/queryPoint-BOi_hkig.js +189 -0
- package/dist/zz-3dtiles-BzDYB-tW.js +75 -0
- package/dist/zz-gltf-BDHxqQjs.js +70 -0
- package/dist/zz-layer/zz-layer-shp-zzts/shpZztsCacheUtils.d.ts +53 -0
- package/dist/zz-layer/zz-layer-shp-zzts/shpZztsRenderer.d.ts +76 -6
- package/dist/zz-layer/zz-layer-zzts/zztsRasterCacheUtils.d.ts +35 -0
- package/dist/zz-layer/zz-layer-zzts/zztsRasterPreviewPolling.d.ts +10 -0
- package/dist/zz-layer/zz-layer-zzts3dv2/index.vue.d.ts +1 -0
- package/dist/zz-layer/zz-layer-zzts3dv2/twinPreviewWorker.d.ts +1 -0
- package/dist/zz-layer-geojson-CtTpn_f9.js +867 -0
- package/dist/zz-layer-mvt-R1-GwSIW.js +609 -0
- package/dist/zz-layer-shp-zzts-D8BjI5tI.js +1323 -0
- package/dist/zz-layer-zzts3d-DqZmLdW3.js +835 -0
- package/dist/zz-layer-zzts3d-grid-CTHFZBpo.js +314 -0
- package/dist/zz-layer-zzts3d-las-hNa-nqxq.js +560 -0
- package/dist/zz-layer-zzts3d-point-DrB5Uuwa.js +750 -0
- package/dist/zz-layer-zzts3dtype-BRl3mCk9.js +493 -0
- package/dist/zz-layer-zzts3dv2-D5udnVGT.js +913 -0
- package/dist/zz-terrain-excavation-A2NXSQ5P.js +502 -0
- package/dist/zz-viewer/index.vue.d.ts +2 -2
- package/dist/zzts3dLayerSignature-Cnu6KIys.js +42 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(){function e(e){throw Error(e)}self.onmessage=t=>{try{let{buffer:n,lod:r,maxBytes:i=16*1024*1024,maxEntities:a=300}=t.data||{};(!(n instanceof ArrayBuffer)||n.byteLength<16||n.byteLength>i)&&e(`孪生体轻量预览数据大小无效`);let o=new Uint8Array(n);(o[0]!==84||o[1]!==87||o[2]!==50||o[3]!==0)&&e(`孪生体轻量预览协议不受支持`);let s=new DataView(n),c=s.getUint16(4,!0),l=s.getUint32(12,!0);c!==1&&e(`孪生体轻量预览协议版本不受支持`),l>a&&e(`孪生体轻量预览实体数量超过限制`);let u=Number(r)<=3?1/100:1,d=[],f=[],p=16;for(let t=0;t<l;t+=1){p+16>o.byteLength&&e(`孪生体轻量预览数据结构不完整`);let t=s.getBigUint64(p,!0).toString(),r=s.getUint32(p+8,!0),i=s.getUint32(p+12,!0);p+=16;let a=(r+i)*4;(r%3!=0||i%3!=0||p+a>o.byteLength)&&e(`孪生体轻量预览几何数据无效`);let c=new Int32Array(n,p,r),l=new Float64Array(r);for(let e=0;e<r;e+=1)l[e]=c[e]*u;p+=r*4;let m=new Uint32Array(i);m.set(new Uint32Array(n,p,i)),p+=i*4,d.push({id:t,positions:l,indices:m}),f.push(l.buffer,m.buffer)}p!==o.byteLength&&e(`孪生体轻量预览数据包含未知内容`),self.postMessage({entities:d},f)}catch(e){self.postMessage({error:e instanceof Error?e.message:`孪生体轻量预览解析失败`})}}})();
|
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, inject as i, normalizeStyle as a, onMounted as o, onUnmounted as s, openBlock as c, reactive as l, ref as u, toDisplayString as d, watch as f } from "vue";
|
|
2
|
+
import { httpService as p } from "@skzz/libs-base";
|
|
3
|
+
//#region \0plugin-vue:export-helper
|
|
4
|
+
var m = (e, t) => {
|
|
5
|
+
let n = e.__vccOpts || e;
|
|
6
|
+
for (let [e, r] of t) n[e] = r;
|
|
7
|
+
return n;
|
|
8
|
+
}, h = { class: "zzts3d-grid-color-popup__row" }, g = { class: "zzts3d-grid-color-popup__value" }, _ = { class: "zzts3d-grid-color-popup__row" }, ee = { class: "zzts3d-grid-color-popup__value" }, v = "__zzts3dGridColorPickable", y = /*#__PURE__*/ m({
|
|
9
|
+
__name: "color",
|
|
10
|
+
props: { config: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => ({})
|
|
13
|
+
} },
|
|
14
|
+
emits: ["point-click"],
|
|
15
|
+
setup(m, { emit: y }) {
|
|
16
|
+
let b = i("cesiumViewer"), te = m, x = y, S = u(null), C = u(null), w = l({
|
|
17
|
+
visible: !1,
|
|
18
|
+
x: 0,
|
|
19
|
+
y: 0,
|
|
20
|
+
terrainHeight: null,
|
|
21
|
+
waterDepth: null
|
|
22
|
+
}), T = {
|
|
23
|
+
dictCode: "",
|
|
24
|
+
queryEnabled: !0,
|
|
25
|
+
highlightColor: "255,255,0",
|
|
26
|
+
highlightOpacity: 1,
|
|
27
|
+
highlightToggle: !0,
|
|
28
|
+
line: {
|
|
29
|
+
color: "0,0,225",
|
|
30
|
+
opacity: .5,
|
|
31
|
+
show: !0,
|
|
32
|
+
width: .5
|
|
33
|
+
}
|
|
34
|
+
}, E = e(() => {
|
|
35
|
+
let e = te.config || {};
|
|
36
|
+
return {
|
|
37
|
+
...T,
|
|
38
|
+
...e,
|
|
39
|
+
line: {
|
|
40
|
+
...T.line,
|
|
41
|
+
...e.line || {}
|
|
42
|
+
},
|
|
43
|
+
queryEnabled: e.queryEnabled === void 0 ? T.queryEnabled : e.queryEnabled,
|
|
44
|
+
highlightColor: e.highlightColor ?? T.highlightColor,
|
|
45
|
+
highlightOpacity: e.highlightOpacity === void 0 ? T.highlightOpacity : e.highlightOpacity,
|
|
46
|
+
highlightToggle: e.highlightToggle === void 0 ? T.highlightToggle : e.highlightToggle
|
|
47
|
+
};
|
|
48
|
+
}), D = 0, O = 0, k = "", A = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Set(), M = null, N = null, P = null;
|
|
49
|
+
function F(e) {
|
|
50
|
+
return Number.isFinite(e) ? `${e.toFixed(2)} m` : "--";
|
|
51
|
+
}
|
|
52
|
+
function I(e) {
|
|
53
|
+
if (!e) return {
|
|
54
|
+
r: 255,
|
|
55
|
+
g: 255,
|
|
56
|
+
b: 255
|
|
57
|
+
};
|
|
58
|
+
if (typeof e == "string" && e.startsWith("#") && e.length === 7) return {
|
|
59
|
+
r: Number.parseInt(e.slice(1, 3), 16),
|
|
60
|
+
g: Number.parseInt(e.slice(3, 5), 16),
|
|
61
|
+
b: Number.parseInt(e.slice(5, 7), 16)
|
|
62
|
+
};
|
|
63
|
+
let t = String(e).split(",").map((e) => Number.parseFloat(e.trim()));
|
|
64
|
+
return {
|
|
65
|
+
r: Number.isFinite(t[0]) ? t[0] : 255,
|
|
66
|
+
g: Number.isFinite(t[1]) ? t[1] : 255,
|
|
67
|
+
b: Number.isFinite(t[2]) ? t[2] : 255
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function L(e, t = 1) {
|
|
71
|
+
let { r: n, g: r, b: i } = I(e), a = Number.isFinite(t) ? Math.max(0, Math.min(1, t)) : 1;
|
|
72
|
+
return Cesium.Color.fromBytes(Math.max(0, Math.min(255, Math.round(n))), Math.max(0, Math.min(255, Math.round(r))), Math.max(0, Math.min(255, Math.round(i))), Math.round(a * 255));
|
|
73
|
+
}
|
|
74
|
+
function R(e, t) {
|
|
75
|
+
let n = Cesium.Color.WHITE;
|
|
76
|
+
if (t.length > 0) {
|
|
77
|
+
let r = t.find((t) => e >= t.min && e <= t.max);
|
|
78
|
+
r && (n = Cesium.Color.fromCssColorString(`rgba(${r.color}, ${r.opacity})`));
|
|
79
|
+
}
|
|
80
|
+
return n;
|
|
81
|
+
}
|
|
82
|
+
function z(e) {
|
|
83
|
+
let t = new DataView(e), n = 0, r = t.getInt32(n, !1);
|
|
84
|
+
n += 4;
|
|
85
|
+
let i = [];
|
|
86
|
+
for (let e = 0; e < r; e++) {
|
|
87
|
+
let e = t.getFloat64(n, !1), r = t.getFloat64(n + 8, !1), a = t.getFloat64(n + 16, !1), o = t.getFloat64(n + 24, !1), s = t.getFloat64(n + 32, !1), c = t.getFloat64(n + 40, !1), l = t.getFloat64(n + 48, !1);
|
|
88
|
+
n += 56, i.push([
|
|
89
|
+
e,
|
|
90
|
+
r,
|
|
91
|
+
a,
|
|
92
|
+
o,
|
|
93
|
+
s,
|
|
94
|
+
c,
|
|
95
|
+
l
|
|
96
|
+
]);
|
|
97
|
+
}
|
|
98
|
+
return i;
|
|
99
|
+
}
|
|
100
|
+
function B() {
|
|
101
|
+
if (!b.value) return null;
|
|
102
|
+
if (M) return M;
|
|
103
|
+
let e = new Cesium.PrimitiveCollection();
|
|
104
|
+
return b.value.scene.primitives.add(e), M = e, M;
|
|
105
|
+
}
|
|
106
|
+
function V() {
|
|
107
|
+
if (M) {
|
|
108
|
+
try {
|
|
109
|
+
N && M.remove(N), P && M.remove(P);
|
|
110
|
+
} catch {}
|
|
111
|
+
try {
|
|
112
|
+
N && delete N[v], P && delete P[v];
|
|
113
|
+
} catch {}
|
|
114
|
+
N = null, P = null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function H() {
|
|
118
|
+
if (S.value) {
|
|
119
|
+
try {
|
|
120
|
+
S.value.destroy();
|
|
121
|
+
} catch {}
|
|
122
|
+
S.value = null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function U() {
|
|
126
|
+
w.visible = !1, w.terrainHeight = null, w.waterDepth = null;
|
|
127
|
+
}
|
|
128
|
+
function W(e, t, n) {
|
|
129
|
+
let r = (b.value?.scene?.canvas)?.getBoundingClientRect?.(), i = r?.left ?? 0, a = r?.top ?? 0;
|
|
130
|
+
w.visible = !0, w.x = i + (e?.x ?? 0) + 12, w.y = a + (e?.y ?? 0) + 12, w.terrainHeight = t, w.waterDepth = n;
|
|
131
|
+
}
|
|
132
|
+
function G(e) {
|
|
133
|
+
if (e == null) return -1;
|
|
134
|
+
let t = String(e), n = "";
|
|
135
|
+
if (t.startsWith("grid_fill_")) n = t.slice(10);
|
|
136
|
+
else if (t.startsWith("grid_outline_")) n = t.slice(13);
|
|
137
|
+
else return -1;
|
|
138
|
+
let r = Number.parseInt(n, 10);
|
|
139
|
+
return Number.isFinite(r) ? r : -1;
|
|
140
|
+
}
|
|
141
|
+
function K() {
|
|
142
|
+
N && (N[v] = !0), P && (P[v] = !0);
|
|
143
|
+
}
|
|
144
|
+
function q(e, t) {
|
|
145
|
+
return Cesium.ColorGeometryInstanceAttribute.toValue(L(e, t));
|
|
146
|
+
}
|
|
147
|
+
function J(e) {
|
|
148
|
+
return Cesium.ColorGeometryInstanceAttribute.toValue(e);
|
|
149
|
+
}
|
|
150
|
+
function ne(e) {
|
|
151
|
+
if (e == null || e < 0) return;
|
|
152
|
+
let t = E.value, n = (k ? A.get(k) : null)?.[e];
|
|
153
|
+
if (!n) return;
|
|
154
|
+
let r = Array.isArray(t.ranges) ? t.ranges : [], i = n[6], a = R(i, r), o = `grid_fill_${e}`, s = `grid_outline_${e}`;
|
|
155
|
+
try {
|
|
156
|
+
if (N?.ready) {
|
|
157
|
+
let e = N.getGeometryInstanceAttributes(o);
|
|
158
|
+
e?.color && (e.color = J(a));
|
|
159
|
+
}
|
|
160
|
+
if (P?.ready) {
|
|
161
|
+
let e = P.getGeometryInstanceAttributes(s);
|
|
162
|
+
e?.color && t.line?.show !== !1 && (e.color = q(t.line?.color, t.line?.opacity));
|
|
163
|
+
}
|
|
164
|
+
} catch {}
|
|
165
|
+
}
|
|
166
|
+
function Y(e) {
|
|
167
|
+
if (e == null || e < 0) return;
|
|
168
|
+
let t = E.value, n = q(t.highlightColor, t.highlightOpacity ?? 1), r = `grid_fill_${e}`, i = `grid_outline_${e}`;
|
|
169
|
+
try {
|
|
170
|
+
if (N?.ready) {
|
|
171
|
+
let e = N.getGeometryInstanceAttributes(r);
|
|
172
|
+
e?.color && (e.color = n);
|
|
173
|
+
}
|
|
174
|
+
if (P?.ready) {
|
|
175
|
+
let e = P.getGeometryInstanceAttributes(i);
|
|
176
|
+
e?.color && t.line?.show !== !1 && (e.color = n);
|
|
177
|
+
}
|
|
178
|
+
} catch {}
|
|
179
|
+
}
|
|
180
|
+
function X() {
|
|
181
|
+
let e = C.value;
|
|
182
|
+
e != null && (ne(e), C.value = null);
|
|
183
|
+
}
|
|
184
|
+
function re(e) {
|
|
185
|
+
if (!b.value?.scene?.drillPick) return null;
|
|
186
|
+
let t = b.value.scene.drillPick(e.position, 32);
|
|
187
|
+
if (!t?.length) return null;
|
|
188
|
+
for (let e = 0; e < t.length; e++) {
|
|
189
|
+
let n = t[e], r = n?.primitive;
|
|
190
|
+
if (r && (r[v] === !0 || r === N || r === P)) return n;
|
|
191
|
+
}
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
function ie() {
|
|
195
|
+
return k && A.get(k) || null;
|
|
196
|
+
}
|
|
197
|
+
function Z() {
|
|
198
|
+
if (H(), b.value) {
|
|
199
|
+
if (!E.value.queryEnabled) {
|
|
200
|
+
X(), U();
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
!N && !P || (K(), S.value = new Cesium.ScreenSpaceEventHandler(b.value.scene.canvas), S.value.setInputAction((e) => {
|
|
204
|
+
try {
|
|
205
|
+
let t = E.value, n = re(e);
|
|
206
|
+
if (!n) {
|
|
207
|
+
X(), U(), x("point-click", {});
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
let r = G(n.id), i = ie(), a = r >= 0 ? i?.[r] : null;
|
|
211
|
+
if (!a) {
|
|
212
|
+
X(), U(), x("point-click", {});
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
if (C.value === r && t.highlightToggle) {
|
|
216
|
+
X(), U(), x("point-click", {});
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
X(), C.value = r, Y(r);
|
|
220
|
+
let [o, s, c, l, u, d, f] = a;
|
|
221
|
+
W(e.position, u, f), x("point-click", {
|
|
222
|
+
index: r,
|
|
223
|
+
bbox: [
|
|
224
|
+
o,
|
|
225
|
+
s,
|
|
226
|
+
c,
|
|
227
|
+
l
|
|
228
|
+
],
|
|
229
|
+
terrainHeight: u,
|
|
230
|
+
waterDepth: f
|
|
231
|
+
});
|
|
232
|
+
} catch (e) {
|
|
233
|
+
console.error("[zzLayerZzts3dGridColor] point-click", e);
|
|
234
|
+
}
|
|
235
|
+
}, Cesium.ScreenSpaceEventType.LEFT_CLICK));
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function Q() {
|
|
239
|
+
H(), C.value = null, U();
|
|
240
|
+
try {
|
|
241
|
+
V(), b.value && M && b.value.scene.primitives.remove(M);
|
|
242
|
+
} catch {}
|
|
243
|
+
M = null;
|
|
244
|
+
}
|
|
245
|
+
function ae(e) {
|
|
246
|
+
k && A.has(k) && $(A.get(k), e);
|
|
247
|
+
}
|
|
248
|
+
function $(e, t) {
|
|
249
|
+
let n = ++O, r = B();
|
|
250
|
+
if (!r) return;
|
|
251
|
+
V();
|
|
252
|
+
let i = L(t.line?.color, t.line?.opacity), a = t.line?.show !== !1, o = Array.isArray(t.ranges) ? t.ranges : [], s = o.some((e) => {
|
|
253
|
+
let t = typeof e?.opacity == "number" ? e.opacity : 1;
|
|
254
|
+
return Number.isFinite(t) && t < 1;
|
|
255
|
+
}), c = typeof t.line?.opacity == "number" ? t.line.opacity : 1, l = s || Number.isFinite(c) && c < 1, u = [], d = [];
|
|
256
|
+
for (let t = 0; t < e.length; t++) {
|
|
257
|
+
let n = e[t], r = n[0], s = n[1], c = n[2], l = n[3], f = n[4], p = n[5], m = n[6], h = R(m, o), g = Cesium.Rectangle.fromDegrees(r, s, c, l);
|
|
258
|
+
p + f, d.push(new Cesium.GeometryInstance({
|
|
259
|
+
id: `grid_fill_${t}`,
|
|
260
|
+
geometry: new Cesium.RectangleGeometry({
|
|
261
|
+
rectangle: g,
|
|
262
|
+
height: 0,
|
|
263
|
+
extrudedHeight: f + m,
|
|
264
|
+
vertexFormat: Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
|
|
265
|
+
}),
|
|
266
|
+
attributes: { color: Cesium.ColorGeometryInstanceAttribute.fromColor(h) }
|
|
267
|
+
})), a && u.push(new Cesium.GeometryInstance({
|
|
268
|
+
id: `grid_outline_${t}`,
|
|
269
|
+
geometry: new Cesium.RectangleOutlineGeometry({
|
|
270
|
+
rectangle: g,
|
|
271
|
+
height: 0,
|
|
272
|
+
extrudedHeight: f + m
|
|
273
|
+
}),
|
|
274
|
+
attributes: { color: Cesium.ColorGeometryInstanceAttribute.fromColor(i) }
|
|
275
|
+
}));
|
|
276
|
+
}
|
|
277
|
+
d.length && (N = r.add(new Cesium.Primitive({
|
|
278
|
+
geometryInstances: d,
|
|
279
|
+
appearance: new Cesium.PerInstanceColorAppearance({
|
|
280
|
+
translucent: l,
|
|
281
|
+
closed: !0
|
|
282
|
+
}),
|
|
283
|
+
asynchronous: !0,
|
|
284
|
+
allowPicking: !0
|
|
285
|
+
}))), u.length && (P = r.add(new Cesium.Primitive({
|
|
286
|
+
geometryInstances: u,
|
|
287
|
+
appearance: new Cesium.PerInstanceColorAppearance({
|
|
288
|
+
translucent: l,
|
|
289
|
+
flat: !0
|
|
290
|
+
}),
|
|
291
|
+
asynchronous: !0,
|
|
292
|
+
allowPicking: !0
|
|
293
|
+
})));
|
|
294
|
+
let f = () => {
|
|
295
|
+
if (n !== O || !b.value || b.value.isDestroyed()) return;
|
|
296
|
+
Z();
|
|
297
|
+
let e = C.value;
|
|
298
|
+
e != null && Y(e);
|
|
299
|
+
}, p = [];
|
|
300
|
+
N?.readyPromise && p.push(N.readyPromise), P?.readyPromise && p.push(P.readyPromise), p.length ? Promise.all(p).then(f, f) : f();
|
|
301
|
+
}
|
|
302
|
+
async function oe() {
|
|
303
|
+
if (!b.value) return;
|
|
304
|
+
let e = E.value || {}, t = e.dictCode;
|
|
305
|
+
if (!t) {
|
|
306
|
+
Q();
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
let n = ++D;
|
|
310
|
+
B(), V();
|
|
311
|
+
let r = A.get(t);
|
|
312
|
+
if (!r) {
|
|
313
|
+
let e = new AbortController();
|
|
314
|
+
j.add(e);
|
|
315
|
+
let i = await p.request({
|
|
316
|
+
method: "POST",
|
|
317
|
+
url: "/flood/geosot/queryBin",
|
|
318
|
+
headers: { Accept: "application/octet-stream" },
|
|
319
|
+
responseType: "arraybuffer",
|
|
320
|
+
data: { dictCode: t },
|
|
321
|
+
signal: e.signal
|
|
322
|
+
}).catch((t) => {
|
|
323
|
+
if (e.signal.aborted) return null;
|
|
324
|
+
throw t;
|
|
325
|
+
});
|
|
326
|
+
if (j.delete(e), !i || n !== D) return;
|
|
327
|
+
let a = i?.data;
|
|
328
|
+
if (!a || !a.byteLength) return;
|
|
329
|
+
r = z(a), A.set(t, r);
|
|
330
|
+
}
|
|
331
|
+
n === D && (k = t, $(r, e));
|
|
332
|
+
}
|
|
333
|
+
return f(() => E.value.dictCode, () => {
|
|
334
|
+
C.value = null, U(), oe();
|
|
335
|
+
}, { immediate: !0 }), f(() => [
|
|
336
|
+
E.value.fill,
|
|
337
|
+
E.value.line,
|
|
338
|
+
E.value.ranges
|
|
339
|
+
], () => {
|
|
340
|
+
let e = E.value || {};
|
|
341
|
+
e?.dictCode && ae(e);
|
|
342
|
+
}, { deep: !0 }), f(() => E.value.queryEnabled, () => {
|
|
343
|
+
Z();
|
|
344
|
+
}), f(() => [E.value.highlightColor, E.value.highlightOpacity], () => {
|
|
345
|
+
C.value != null && Y(C.value);
|
|
346
|
+
}), o(() => {}), s(() => {
|
|
347
|
+
D++, O++, j.forEach((e) => e.abort()), j.clear(), A.clear(), k = "", Q();
|
|
348
|
+
}), (e, i) => w.visible ? (c(), n("div", {
|
|
349
|
+
key: 0,
|
|
350
|
+
class: "zzts3d-grid-color-popup",
|
|
351
|
+
style: a({
|
|
352
|
+
left: `${w.x}px`,
|
|
353
|
+
top: `${w.y}px`
|
|
354
|
+
})
|
|
355
|
+
}, [r("div", h, [i[0] ||= r("span", { class: "zzts3d-grid-color-popup__label" }, "地形高度", -1), r("span", g, d(F(w.terrainHeight)), 1)]), r("div", _, [i[1] ||= r("span", { class: "zzts3d-grid-color-popup__label" }, "水深", -1), r("span", ee, d(F(w.waterDepth)), 1)])], 4)) : t("", !0);
|
|
356
|
+
}
|
|
357
|
+
}, [["__scopeId", "data-v-65f93b0c"]]);
|
|
358
|
+
//#endregion
|
|
359
|
+
export { y as default };
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
//#region node_modules/@turf/helpers/dist/esm/index.js
|
|
2
|
+
var e = 6371008.8;
|
|
3
|
+
e * 100, e * 100, e * 100, 360 / (2 * Math.PI), 360 / (2 * Math.PI), e * 3.28084, e * 3.28084, e * 39.37, e * 39.37, e / 1e3, e / 1e3, e / 1e3, e / 1609.344, e / 1609.344, e * 1e3, e * 1e3, e * 1e3, e / 1852, e / 1852, e * 1.0936, e * 1.0936;
|
|
4
|
+
function t(e, t, n = {}) {
|
|
5
|
+
let r = { type: "Feature" };
|
|
6
|
+
return (n.id === 0 || n.id) && (r.id = n.id), n.bbox && (r.bbox = n.bbox), r.properties = t || {}, r.geometry = e, r;
|
|
7
|
+
}
|
|
8
|
+
function n(e, n, r = {}) {
|
|
9
|
+
if (e.length < 2) throw Error("coordinates must be an array of two or more positions");
|
|
10
|
+
return t({
|
|
11
|
+
type: "LineString",
|
|
12
|
+
coordinates: e
|
|
13
|
+
}, n, r);
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region node_modules/@turf/meta/dist/esm/index.js
|
|
17
|
+
function r(e, t, n) {
|
|
18
|
+
if (e !== null) for (var i, a, o, s, c, l, u, d = 0, f = 0, p, m = e.type, h = m === "FeatureCollection", g = m === "Feature", _ = h ? e.features.length : 1, v = 0; v < _; v++) {
|
|
19
|
+
u = h ? e.features[v].geometry : g ? e.geometry : e, p = u ? u.type === "GeometryCollection" : !1, c = p ? u.geometries.length : 1;
|
|
20
|
+
for (var y = 0; y < c; y++) {
|
|
21
|
+
var b = 0, x = 0;
|
|
22
|
+
if (s = p ? u.geometries[y] : u, s !== null) {
|
|
23
|
+
l = s.coordinates;
|
|
24
|
+
var S = s.type;
|
|
25
|
+
switch (d = n && (S === "Polygon" || S === "MultiPolygon") ? 1 : 0, S) {
|
|
26
|
+
case null: break;
|
|
27
|
+
case "Point":
|
|
28
|
+
if (t(l, f, v, b, x) === !1) return !1;
|
|
29
|
+
f++, b++;
|
|
30
|
+
break;
|
|
31
|
+
case "LineString":
|
|
32
|
+
case "MultiPoint":
|
|
33
|
+
for (i = 0; i < l.length; i++) {
|
|
34
|
+
if (t(l[i], f, v, b, x) === !1) return !1;
|
|
35
|
+
f++, S === "MultiPoint" && b++;
|
|
36
|
+
}
|
|
37
|
+
S === "LineString" && b++;
|
|
38
|
+
break;
|
|
39
|
+
case "Polygon":
|
|
40
|
+
case "MultiLineString":
|
|
41
|
+
for (i = 0; i < l.length; i++) {
|
|
42
|
+
for (a = 0; a < l[i].length - d; a++) {
|
|
43
|
+
if (t(l[i][a], f, v, b, x) === !1) return !1;
|
|
44
|
+
f++;
|
|
45
|
+
}
|
|
46
|
+
S === "MultiLineString" && b++, S === "Polygon" && x++;
|
|
47
|
+
}
|
|
48
|
+
S === "Polygon" && b++;
|
|
49
|
+
break;
|
|
50
|
+
case "MultiPolygon":
|
|
51
|
+
for (i = 0; i < l.length; i++) {
|
|
52
|
+
for (x = 0, a = 0; a < l[i].length; a++) {
|
|
53
|
+
for (o = 0; o < l[i][a].length - d; o++) {
|
|
54
|
+
if (t(l[i][a][o], f, v, b, x) === !1) return !1;
|
|
55
|
+
f++;
|
|
56
|
+
}
|
|
57
|
+
x++;
|
|
58
|
+
}
|
|
59
|
+
b++;
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
case "GeometryCollection":
|
|
63
|
+
for (i = 0; i < s.geometries.length; i++) if (r(s.geometries[i], t, n) === !1) return !1;
|
|
64
|
+
break;
|
|
65
|
+
default: throw Error("Unknown Geometry Type");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region node_modules/@turf/bbox/dist/esm/index.js
|
|
73
|
+
function i(e, t = {}) {
|
|
74
|
+
if (e.bbox != null && !0 !== t.recompute) return e.bbox;
|
|
75
|
+
let n = [
|
|
76
|
+
Infinity,
|
|
77
|
+
Infinity,
|
|
78
|
+
-Infinity,
|
|
79
|
+
-Infinity
|
|
80
|
+
];
|
|
81
|
+
return r(e, (e) => {
|
|
82
|
+
n[0] > e[0] && (n[0] = e[0]), n[1] > e[1] && (n[1] = e[1]), n[2] < e[0] && (n[2] = e[0]), n[3] < e[1] && (n[3] = e[1]);
|
|
83
|
+
}), n;
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
export { n, i as t };
|
package/dist/index.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.
|
|
1
|
+
.zz-viewer{width:100%;height:100%;position:relative}.zz-viewer__engine,.zz-viewer__engine-host{z-index:0;position:absolute;inset:0}.zz-viewer__overlay{z-index:1;pointer-events:none;position:absolute;inset:0}.zz-viewer__overlay>*{pointer-events:auto}.legend-panel{z-index:20;background:#ffffffe6;border:1px solid #ffffff8c;min-width:130px;max-width:230px;position:absolute;overflow:hidden;box-shadow:0 8px 24px #0000001a}.legend-panel--bottom-right{bottom:40px;right:16px}.legend-panel--bottom-left{bottom:16px;left:16px}.legend-panel--top-right{top:16px;right:16px}.legend-panel--top-left{top:16px;left:16px}.legend-panel__header{border-bottom:1px solid #ffffff73;justify-content:space-between;align-items:center;gap:8px;padding:10px 12px;display:flex}.legend-panel__title{color:var(--el-text-color-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;font-weight:600;overflow:hidden}.legend-panel__toggle{flex:none}.legend-panel__body{max-height:260px;padding:12px 14px;overflow:auto}.legend-panel__section-title{color:var(--el-text-color-primary);margin-bottom:10px;font-size:13px;font-weight:600}.legend-panel__list{flex-direction:column;align-items:flex-start;gap:12px;display:flex}.legend-panel__item{justify-content:flex-start;align-items:center;gap:12px;width:100%;min-height:24px;display:flex}.legend-panel__item.is-item-hidden{opacity:.45}.legend-panel__item.is-item-hidden .legend-panel__label{color:#98a2b3}.legend-panel__eye{color:#667085;cursor:pointer;flex:none;margin-left:auto;font-size:14px}.legend-panel__eye:hover{color:#1d72de}.legend-panel__symbol{box-sizing:border-box;background-color:#0000;flex:none}.legend-panel__symbol--point{border-radius:50%;width:14px;height:14px}.legend-panel__symbol--line{background:0 0;align-items:center;width:22px;height:14px;display:flex}.legend-panel__line-bar{flex:none;display:block}.legend-panel__symbol--polygon{border-radius:3px;width:18px;height:18px}.legend-panel__label{color:var(--el-text-color-primary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:13px;line-height:1.4;overflow:hidden}.legend-panel__multiband{justify-content:flex-start;align-items:flex-start;gap:12px;width:100%;display:flex}.legend-panel__multiband-bar{border:1px solid #0000001f;border-radius:2px;flex:none;width:20px;height:190px}.legend-panel__multiband-labels{flex:1;height:190px;position:relative}.legend-panel__multiband-label{color:var(--el-text-color-primary);text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:1.4;position:absolute;left:0;right:0;overflow:hidden}.legend-panel__multiband-label--top{top:0}.legend-panel__multiband-label--bottom{bottom:0}.zzts3d-grid-color-popup[data-v-65f93b0c]{z-index:1000;pointer-events:none;color:#f5f7fa;background:#141820e0;border:1px solid #ffffff29;min-width:140px;padding:8px 10px;font-size:12px;line-height:1.5;position:fixed}.zzts3d-grid-color-popup__row[data-v-65f93b0c]{justify-content:space-between;align-items:baseline;gap:12px;display:flex}.zzts3d-grid-color-popup__row+.zzts3d-grid-color-popup__row[data-v-65f93b0c]{margin-top:4px}.zzts3d-grid-color-popup__label[data-v-65f93b0c]{opacity:.75;white-space:nowrap}.zzts3d-grid-color-popup__value[data-v-65f93b0c]{font-variant-numeric:tabular-nums;white-space:nowrap}
|
|
2
2
|
/*$vite$:1*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,85 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
1
2
|
import { default as zzViewer } from './zz-viewer/index.vue';
|
|
2
3
|
import { default as zzLayerWmts } from './zz-layer/zz-layer-wmts/index.vue';
|
|
3
4
|
import { default as zzLayerXyz } from './zz-layer/zz-layer-xyz/index.vue';
|
|
4
5
|
import { default as zzLayerWms } from './zz-layer/zz-layer-wms/index.vue';
|
|
5
6
|
import { default as zzLayerZzts } from './zz-layer/zz-layer-zzts/index.vue';
|
|
6
7
|
import { default as zzLayerGeojson } from './zz-layer/zz-layer-geojson/index.vue';
|
|
7
|
-
import { default as zzLayerMvt } from './zz-layer/zz-layer-mvt/index.vue';
|
|
8
|
-
import { default as zzLayerShpZzts } from './zz-layer/zz-layer-shp-zzts/index.vue';
|
|
9
8
|
import { default as zzTerrain } from './zz-terrain/index.vue';
|
|
10
|
-
import { default as zzTerrainExcavation } from './zz-analysis/zz-terrain-excavation/index.vue';
|
|
11
|
-
import { default as zz3dtiles } from './zz-model/zz-3dtiles/index.vue';
|
|
12
|
-
import { default as zzGltf } from './zz-model/zz-gltf/index.vue';
|
|
13
9
|
import { default as zzEntityPoint } from './zz-entity/zz-entity-point/index.vue';
|
|
14
10
|
import { default as zzEntityPolyline } from './zz-entity/zz-entity-polyline/index.vue';
|
|
15
11
|
import { default as zzEntityPolygon } from './zz-entity/zz-entity-polygon/index.vue';
|
|
16
12
|
import { default as zzLegendPanel } from './zz-legend/index.vue';
|
|
17
|
-
|
|
13
|
+
declare const zzLayerMvt: import('vue').DefineComponent<{}, {
|
|
14
|
+
$emit: (event: "loaded", ...args: any[]) => void;
|
|
15
|
+
groupKey: string;
|
|
16
|
+
stackIndex: number;
|
|
17
|
+
subStackIndex: number;
|
|
18
|
+
provider: Record<string, any>;
|
|
19
|
+
options: Record<string, any>;
|
|
20
|
+
$props: {
|
|
21
|
+
readonly groupKey?: string | undefined;
|
|
22
|
+
readonly stackIndex?: number | undefined;
|
|
23
|
+
readonly subStackIndex?: number | undefined;
|
|
24
|
+
readonly provider?: Record<string, any> | undefined;
|
|
25
|
+
readonly options?: Record<string, any> | undefined;
|
|
26
|
+
};
|
|
27
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
declare const zzLayerShpZzts: import('vue').DefineComponent<{}, {
|
|
29
|
+
groupKey: string;
|
|
30
|
+
stackIndex: number;
|
|
31
|
+
subStackIndex: number;
|
|
32
|
+
config: Record<string, any>;
|
|
33
|
+
$props: {
|
|
34
|
+
readonly groupKey?: string | undefined;
|
|
35
|
+
readonly stackIndex?: number | undefined;
|
|
36
|
+
readonly subStackIndex?: number | undefined;
|
|
37
|
+
readonly config?: Record<string, any> | undefined;
|
|
38
|
+
};
|
|
39
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
40
|
+
declare const zzTerrainExcavation: import('vue').DefineComponent<{
|
|
41
|
+
config?: import('./zz-analysis/zz-terrain-excavation/types').ZzTerrainExcavationConfigInput;
|
|
42
|
+
}, {
|
|
43
|
+
addExcavation: (item: import('./zz-analysis/zz-terrain-excavation/types').ZzTerrainExcavationItem) => Promise<string | null>;
|
|
44
|
+
updateExcavation: (id: string, config: Partial<import('./zz-analysis/zz-terrain-excavation/types').ZzTerrainExcavationItem>) => Promise<boolean>;
|
|
45
|
+
removeExcavation: (id: string) => void;
|
|
46
|
+
clearExcavations: () => void;
|
|
47
|
+
getExcavationIds: () => string[];
|
|
48
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
49
|
+
"excavation-ready": (...args: any[]) => void;
|
|
50
|
+
"excavation-updated": (...args: any[]) => void;
|
|
51
|
+
"excavation-removed": (...args: any[]) => void;
|
|
52
|
+
"excavation-cleared": (...args: any[]) => void;
|
|
53
|
+
"excavation-error": (...args: any[]) => void;
|
|
54
|
+
}, string, import('vue').PublicProps, Readonly<{
|
|
55
|
+
config?: import('./zz-analysis/zz-terrain-excavation/types').ZzTerrainExcavationConfigInput;
|
|
56
|
+
}> & Readonly<{
|
|
57
|
+
"onExcavation-ready"?: ((...args: any[]) => any) | undefined;
|
|
58
|
+
"onExcavation-updated"?: ((...args: any[]) => any) | undefined;
|
|
59
|
+
"onExcavation-removed"?: ((...args: any[]) => any) | undefined;
|
|
60
|
+
"onExcavation-cleared"?: ((...args: any[]) => any) | undefined;
|
|
61
|
+
"onExcavation-error"?: ((...args: any[]) => any) | undefined;
|
|
62
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
63
|
+
declare const zz3dtiles: import('vue').DefineComponent<{}, {
|
|
64
|
+
$emit: (event: "load-error", ...args: any[]) => void;
|
|
65
|
+
groupKey: string;
|
|
66
|
+
stackIndex: number;
|
|
67
|
+
subStackIndex: number;
|
|
68
|
+
config: Record<string, any>;
|
|
69
|
+
$props: {
|
|
70
|
+
readonly groupKey?: string | undefined;
|
|
71
|
+
readonly stackIndex?: number | undefined;
|
|
72
|
+
readonly subStackIndex?: number | undefined;
|
|
73
|
+
readonly config?: Record<string, any> | undefined;
|
|
74
|
+
};
|
|
75
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
76
|
+
declare const zzGltf: import('vue').DefineComponent<{}, {
|
|
77
|
+
$emit: (event: "model-ready" | "model-error", ...args: any[]) => void;
|
|
78
|
+
config: Record<string, any>;
|
|
79
|
+
$props: {
|
|
80
|
+
readonly config?: Record<string, any> | undefined;
|
|
81
|
+
};
|
|
82
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
18
83
|
declare const _default: (app: App) => void;
|
|
19
84
|
export default _default;
|
|
20
85
|
export { zzViewer, zzLayerWmts, zzLayerZzts, zzLayerXyz, zzLayerWms, zzLayerGeojson, zzLayerMvt, zzLayerShpZzts, zzTerrain, zzTerrainExcavation, zz3dtiles, zzGltf, zzEntityPoint, zzEntityPolyline, zzEntityPolygon, zzLegendPanel };
|