leiting-bim 2.1.97 → 2.1.98
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/leiting-bim.es.js +1 -1
- package/package.json +1 -1
- package/plugins/cesium-core/dist/cesium-core.mjs +281 -275
- package/plugins/cesium-core/dist/cesium-core.mjs.map +1 -1
- package/plugins/cesium-core/dist/cesium-core.umd.js +12 -12
- package/plugins/cesium-core/dist/cesium-core.umd.js.map +1 -1
- package/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +2 -0
- package/plugins/cesium-vue/dist/components/marker-manage.js +387 -381
- package/plugins/cesium-vue/dist/components/marker-manage.js.map +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { w as be } from "../create-DynflqE1.js";
|
|
2
|
-
import { h as w, markRaw as x, render as
|
|
3
|
-
import { M as
|
|
2
|
+
import { h as w, markRaw as x, render as G, defineComponent as Me, inject as _e, onMounted as Pe, watch as Y, onUnmounted as Le, renderSlot as Te, unref as we } from "vue";
|
|
3
|
+
import { M as D, H as X, a as $ } from "../HtmlOverlayLabelPool-B1gUt-p1.js";
|
|
4
4
|
import { CxCardCarousel as q } from "./card-carousel.js";
|
|
5
5
|
import { CxMarkerDefault as Z } from "./marker-default.js";
|
|
6
6
|
import { CxMarkerHtml as xe } from "./marker-html.js";
|
|
7
|
-
import { i as F, b as
|
|
7
|
+
import { i as F, b as ie, a as _, S as O, d as j, c as K, e as re, f as Se, g as ae, M as oe, h as H, j as Ee, k as Ge, l as De, m as ne, n as se, o as Ie, p as Oe, q as Ae, r as ke, s as Be, t as le, u as $e, v as He, w as Re, x as ze } from "../index-Kdqw0FJN.js";
|
|
8
8
|
const Fe = {
|
|
9
9
|
id: { type: String, default: "marker" },
|
|
10
10
|
Cesium: { type: Object },
|
|
@@ -16,7 +16,7 @@ const Fe = {
|
|
|
16
16
|
themeConfig: { type: Object }
|
|
17
17
|
// Optional override
|
|
18
18
|
};
|
|
19
|
-
var I = /* @__PURE__ */ ((
|
|
19
|
+
var I = /* @__PURE__ */ ((r) => (r.左建选中模型 = "MODEL_LEFT_CLICK", r.标记左键点击 = "TAG_LEFT_CLICK", r.标记移入 = "TAG_MOUSEENTER", r.标记移出 = "TAG_MOUSELEAVE", r.模型位置保存 = "SAVE_REGION", r.模型加载完成 = "MODEL_READY", r))(I || {});
|
|
20
20
|
class Ke {
|
|
21
21
|
Cesium;
|
|
22
22
|
viewer;
|
|
@@ -37,6 +37,7 @@ class Ke {
|
|
|
37
37
|
groupByTheme;
|
|
38
38
|
tilingScheme;
|
|
39
39
|
levelIndexByTileLevel = /* @__PURE__ */ new Map();
|
|
40
|
+
_lastTileProvider = null;
|
|
40
41
|
_updateTimer = null;
|
|
41
42
|
_updateDelay = 100;
|
|
42
43
|
_tilesRetryCount = 0;
|
|
@@ -44,26 +45,26 @@ class Ke {
|
|
|
44
45
|
_cameraDirty = !1;
|
|
45
46
|
_tileLoadListener = null;
|
|
46
47
|
_cameraChangedHandler = null;
|
|
47
|
-
constructor(e, t,
|
|
48
|
-
this.Cesium = e, this.viewer = t, this.labelPool =
|
|
49
|
-
const o = this.viewer.scene && this.viewer.scene.globe, a = o && o._surface, n = a && a._tileProvider;
|
|
50
|
-
this.
|
|
51
|
-
|
|
48
|
+
constructor(e, t, i) {
|
|
49
|
+
this.Cesium = e, this.viewer = t, this.labelPool = i.labelPool, this.threshold = i.threshold ?? 10, this.displayLimit = i.displayLimit ?? 100, this.maxLevel = i.maxLevel ?? 5, this.debugCurrentGrids = i.debugCurrentGrids ?? !1, this.clusterTheme = i.clusterTheme ?? "cluster-label", this.pointTheme = i.pointTheme ?? "point-label", this.centralPointMode = i.centralPointMode ?? "central", this.minGlobalPointCount = i.minGlobalPointCount ?? 0, this.groupByTheme = i.groupByTheme ?? !1;
|
|
50
|
+
const o = this.viewer.scene && this.viewer.scene.globe, a = o && o._surface, n = a && a._tileProvider, l = n?.tilingScheme || new this.Cesium.GeographicTilingScheme();
|
|
51
|
+
this._lastTileProvider = n, this.tilingScheme = l, this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), o && (this._tileLoadListener = (s) => {
|
|
52
|
+
s === 0 && this._cameraDirty && (this._cameraDirty = !1, this._scheduleUpdate());
|
|
52
53
|
}, o.tileLoadProgressEvent.addEventListener(this._tileLoadListener)), this._cameraChangedHandler = () => {
|
|
53
|
-
const
|
|
54
|
-
if (!
|
|
54
|
+
const s = this.viewer.scene, d = s && s.globe;
|
|
55
|
+
if (!d) {
|
|
55
56
|
this._scheduleUpdate();
|
|
56
57
|
return;
|
|
57
58
|
}
|
|
58
|
-
this._cameraDirty = !0,
|
|
59
|
+
this._cameraDirty = !0, d.tilesLoaded && (this._cameraDirty = !1, this._scheduleUpdate());
|
|
59
60
|
}, this.viewer.camera.changed.addEventListener(this._cameraChangedHandler);
|
|
60
61
|
}
|
|
61
|
-
setGroupByTheme(e, t = !0,
|
|
62
|
+
setGroupByTheme(e, t = !0, i = !0) {
|
|
62
63
|
if (this.groupByTheme === e) {
|
|
63
|
-
|
|
64
|
+
i && this._update();
|
|
64
65
|
return;
|
|
65
66
|
}
|
|
66
|
-
this.groupByTheme = e, t && this._buildLevels(),
|
|
67
|
+
this.groupByTheme = e, t && this._buildLevels(), i && this._update();
|
|
67
68
|
}
|
|
68
69
|
setMinGlobalPointCount(e, t = !0) {
|
|
69
70
|
this.minGlobalPointCount = e, t && this._update();
|
|
@@ -74,12 +75,16 @@ class Ke {
|
|
|
74
75
|
setDebugCurrentGrids(e, t = !0) {
|
|
75
76
|
this.debugCurrentGrids = e, e || this._clearDebugGrids(), t && this._update();
|
|
76
77
|
}
|
|
78
|
+
_syncTilingSchemeAndLevels() {
|
|
79
|
+
const e = this.viewer.scene && this.viewer.scene.globe, t = e && e._surface, i = t && t._tileProvider, o = i?.tilingScheme || new this.Cesium.GeographicTilingScheme(), a = i !== this._lastTileProvider, n = this.tilingScheme !== o;
|
|
80
|
+
!a && !n && this.levels && this.levels.length > 0 || (this._lastTileProvider = i, this.tilingScheme = o, this.levels = this._createLevels(), this._buildLevels());
|
|
81
|
+
}
|
|
77
82
|
_createLevels() {
|
|
78
83
|
const e = [];
|
|
79
84
|
this.levelIndexByTileLevel = /* @__PURE__ */ new Map();
|
|
80
|
-
const t = 0,
|
|
85
|
+
const t = 0, i = this.maxLevel;
|
|
81
86
|
let o = 0;
|
|
82
|
-
for (let a = t; a <=
|
|
87
|
+
for (let a = t; a <= i; a++, o++) {
|
|
83
88
|
const n = 360 / Math.pow(2, a);
|
|
84
89
|
e.push({
|
|
85
90
|
level: a,
|
|
@@ -93,10 +98,10 @@ class Ke {
|
|
|
93
98
|
this.points = e, this._buildLevels();
|
|
94
99
|
}
|
|
95
100
|
appendPoints(e, t = !0) {
|
|
96
|
-
for (const
|
|
97
|
-
this.points.push(
|
|
98
|
-
for (const
|
|
99
|
-
this._addPointToGrid(
|
|
101
|
+
for (const i of e)
|
|
102
|
+
this.points.push(i);
|
|
103
|
+
for (const i of e)
|
|
104
|
+
this._addPointToGrid(i);
|
|
100
105
|
t && this._scheduleUpdate();
|
|
101
106
|
}
|
|
102
107
|
_scheduleUpdate() {
|
|
@@ -107,11 +112,11 @@ class Ke {
|
|
|
107
112
|
updatePoint(e) {
|
|
108
113
|
const t = this.points.findIndex((a) => a.id === e.id);
|
|
109
114
|
if (t === -1) return;
|
|
110
|
-
const
|
|
115
|
+
const i = this.points[t];
|
|
111
116
|
for (const a of this.levels) {
|
|
112
117
|
const n = a.level, l = this.gridLayers.get(n);
|
|
113
118
|
if (!l) continue;
|
|
114
|
-
const s = this.Cesium.Cartographic.fromDegrees(
|
|
119
|
+
const s = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat), d = this.tilingScheme.positionToTileXY(
|
|
115
120
|
s,
|
|
116
121
|
n,
|
|
117
122
|
new this.Cesium.Cartesian2()
|
|
@@ -120,26 +125,26 @@ class Ke {
|
|
|
120
125
|
const h = `${d.x}_${d.y}`, c = l.get(h);
|
|
121
126
|
if (c) {
|
|
122
127
|
const g = c.allPoints.findIndex((u) => u.id === e.id);
|
|
123
|
-
if (g !== -1 && c.allPoints.splice(g, 1),
|
|
128
|
+
if (g !== -1 && c.allPoints.splice(g, 1), i.data?.skipAggregation) {
|
|
124
129
|
const u = c.skipPoints.findIndex((f) => f.id === e.id);
|
|
125
130
|
u !== -1 && c.skipPoints.splice(u, 1);
|
|
126
131
|
} else {
|
|
127
|
-
const u = this.groupByTheme ?
|
|
132
|
+
const u = this.groupByTheme ? i.data?.theme : this.clusterTheme, f = c.groups.get(u);
|
|
128
133
|
if (f) {
|
|
129
|
-
const
|
|
130
|
-
|
|
134
|
+
const L = f.findIndex((b) => b.id === e.id);
|
|
135
|
+
L !== -1 && f.splice(L, 1), f.length === 0 && c.groups.delete(u);
|
|
131
136
|
}
|
|
132
137
|
}
|
|
133
138
|
}
|
|
134
139
|
}
|
|
135
|
-
const o = { ...
|
|
140
|
+
const o = { ...i, ...e };
|
|
136
141
|
this.points[t] = o, this._addPointToGrid(o), this._update();
|
|
137
142
|
}
|
|
138
143
|
removePointsById(e) {
|
|
139
144
|
const t = new Set(e);
|
|
140
|
-
this.points = this.points.filter((
|
|
141
|
-
for (const
|
|
142
|
-
const o = this.gridLayers.get(
|
|
145
|
+
this.points = this.points.filter((i) => !t.has(i.id));
|
|
146
|
+
for (const i of this.levels) {
|
|
147
|
+
const o = this.gridLayers.get(i.level);
|
|
143
148
|
if (o)
|
|
144
149
|
for (const [a, n] of o.entries()) {
|
|
145
150
|
n.allPoints = n.allPoints.filter((l) => !t.has(l.id)), n.skipPoints = n.skipPoints.filter((l) => !t.has(l.id));
|
|
@@ -161,11 +166,11 @@ class Ke {
|
|
|
161
166
|
}
|
|
162
167
|
_addPointToGrid(e) {
|
|
163
168
|
for (const t of this.levels) {
|
|
164
|
-
const
|
|
169
|
+
const i = t.level, o = this.gridLayers.get(i);
|
|
165
170
|
if (!o) continue;
|
|
166
171
|
const a = this.Cesium.Cartographic.fromDegrees(e.lon, e.lat), n = this.tilingScheme.positionToTileXY(
|
|
167
172
|
a,
|
|
168
|
-
|
|
173
|
+
i,
|
|
169
174
|
new this.Cesium.Cartesian2()
|
|
170
175
|
);
|
|
171
176
|
if (!n) continue;
|
|
@@ -185,17 +190,17 @@ class Ke {
|
|
|
185
190
|
}
|
|
186
191
|
_update() {
|
|
187
192
|
if (!this.labelPool) return;
|
|
188
|
-
this.labelPool.reset(), this.debugCurrentGrids && this._clearDebugGrids();
|
|
193
|
+
this._syncTilingSchemeAndLevels(), this.labelPool.reset(), this.debugCurrentGrids && this._clearDebugGrids();
|
|
189
194
|
const e = this.points.length < this.minGlobalPointCount ? 1 / 0 : this.threshold;
|
|
190
195
|
let t = 0;
|
|
191
|
-
const
|
|
196
|
+
const i = (o, a, n) => {
|
|
192
197
|
if (t >= this.displayLimit || o < 0) return;
|
|
193
198
|
o >= this.levels.length && (o = this.levels.length - 1);
|
|
194
199
|
const l = this.levels[o], s = o === this.levels.length - 1, d = l.level, h = this.gridLayers.get(d);
|
|
195
200
|
if (!h) return;
|
|
196
201
|
const c = `${a}_${n}`, g = h.get(c);
|
|
197
202
|
if (!g) return;
|
|
198
|
-
const u = this.tilingScheme.tileXYToRectangle(a, n, d), f = this.Cesium.Math.toDegrees(u.west),
|
|
203
|
+
const u = this.tilingScheme.tileXYToRectangle(a, n, d), f = this.Cesium.Math.toDegrees(u.west), L = this.Cesium.Math.toDegrees(u.south), b = this.Cesium.Math.toDegrees(u.east), T = this.Cesium.Math.toDegrees(u.north), A = (f + b) / 2, k = (L + T) / 2;
|
|
199
204
|
for (const p of g.skipPoints)
|
|
200
205
|
if (p.data?.show !== !1) {
|
|
201
206
|
if (t >= this.displayLimit) break;
|
|
@@ -209,15 +214,15 @@ class Ke {
|
|
|
209
214
|
}), t++;
|
|
210
215
|
}
|
|
211
216
|
if (t >= this.displayLimit) {
|
|
212
|
-
this.debugCurrentGrids && this._drawDebugGrid(f,
|
|
217
|
+
this.debugCurrentGrids && this._drawDebugGrid(f, L, b, T, c);
|
|
213
218
|
return;
|
|
214
219
|
}
|
|
215
220
|
for (const [p, B] of g.groups) {
|
|
216
|
-
const
|
|
217
|
-
if (
|
|
218
|
-
let
|
|
219
|
-
if (this.centralPointMode == "firstPoint" && (
|
|
220
|
-
for (const m of
|
|
221
|
+
const C = B.filter((m) => m.data?.show !== !1);
|
|
222
|
+
if (C.length === 0) continue;
|
|
223
|
+
let S = A, E = k, y = C[0]?.height || 0;
|
|
224
|
+
if (this.centralPointMode == "firstPoint" && (S = C[0]?.lon || 0, E = C[0]?.lat || 0, y = C[0]?.height || 0), s || C.length < e)
|
|
225
|
+
for (const m of C) {
|
|
221
226
|
if (t >= this.displayLimit) break;
|
|
222
227
|
this.labelPool.add(m.data, {
|
|
223
228
|
id: `point-${m.id}`,
|
|
@@ -230,21 +235,22 @@ class Ke {
|
|
|
230
235
|
}
|
|
231
236
|
else {
|
|
232
237
|
if (t >= this.displayLimit) break;
|
|
233
|
-
const
|
|
238
|
+
const v = C[0]?.data?.billboard?.[0]?.theme || this.clusterTheme, P = this.groupByTheme ? `cluster-${o}-${a}-${n}-${p}` : `cluster-${o}-${a}-${n}`;
|
|
234
239
|
this.labelPool.add(
|
|
235
240
|
{
|
|
236
|
-
id:
|
|
237
|
-
billboard:
|
|
238
|
-
count:
|
|
241
|
+
id: P,
|
|
242
|
+
billboard: C[0]?.data?.billboard || [],
|
|
243
|
+
count: C.length,
|
|
239
244
|
gridKey: c,
|
|
240
|
-
points:
|
|
245
|
+
points: C,
|
|
241
246
|
aggregationGroup: p
|
|
242
247
|
},
|
|
243
248
|
{
|
|
244
|
-
id:
|
|
245
|
-
lon:
|
|
246
|
-
lat:
|
|
247
|
-
|
|
249
|
+
id: P,
|
|
250
|
+
lon: S,
|
|
251
|
+
lat: E,
|
|
252
|
+
height: y,
|
|
253
|
+
theme: v
|
|
248
254
|
}
|
|
249
255
|
), t++;
|
|
250
256
|
}
|
|
@@ -253,9 +259,9 @@ class Ke {
|
|
|
253
259
|
const p = this.levels[o].level;
|
|
254
260
|
this._drawDebugGrid(
|
|
255
261
|
f,
|
|
256
|
-
P,
|
|
257
|
-
b,
|
|
258
262
|
L,
|
|
263
|
+
b,
|
|
264
|
+
T,
|
|
259
265
|
`L:${p} X:${a} Y:${n}`
|
|
260
266
|
);
|
|
261
267
|
}
|
|
@@ -286,42 +292,42 @@ class Ke {
|
|
|
286
292
|
let c = this.levelIndexByTileLevel.get(h);
|
|
287
293
|
if (c === void 0) {
|
|
288
294
|
if (this.levels.length === 0) continue;
|
|
289
|
-
const
|
|
290
|
-
if (h >
|
|
295
|
+
const y = this.levels[0].level, m = this.levels[this.levels.length - 1].level;
|
|
296
|
+
if (h > m)
|
|
291
297
|
c = this.levels.length - 1;
|
|
292
|
-
else if (h <
|
|
298
|
+
else if (h < y)
|
|
293
299
|
c = 0;
|
|
294
300
|
else {
|
|
295
|
-
let
|
|
301
|
+
let v = 0, P = 1 / 0;
|
|
296
302
|
for (let M = 0; M < this.levels.length; M++) {
|
|
297
303
|
const U = Math.abs(this.levels[M].level - h);
|
|
298
|
-
U <
|
|
304
|
+
U < P && (P = U, v = M);
|
|
299
305
|
}
|
|
300
|
-
c =
|
|
306
|
+
c = v;
|
|
301
307
|
}
|
|
302
308
|
}
|
|
303
309
|
if (c === void 0) continue;
|
|
304
310
|
const g = this.levels[c].level, u = s._x ?? s.x, f = s._y ?? s.y;
|
|
305
311
|
if (typeof u == "number" && typeof f == "number") {
|
|
306
|
-
let
|
|
307
|
-
const
|
|
308
|
-
if (
|
|
309
|
-
const M = 1 <<
|
|
310
|
-
|
|
311
|
-
} else if (
|
|
312
|
-
const M = 1 << -
|
|
313
|
-
|
|
312
|
+
let y = u, m = f;
|
|
313
|
+
const v = h - g;
|
|
314
|
+
if (v > 0) {
|
|
315
|
+
const M = 1 << v;
|
|
316
|
+
y = Math.floor(u / M), m = Math.floor(f / M);
|
|
317
|
+
} else if (v < 0) {
|
|
318
|
+
const M = 1 << -v;
|
|
319
|
+
y = u * M, m = f * M;
|
|
314
320
|
}
|
|
315
|
-
const
|
|
316
|
-
if (l.has(
|
|
317
|
-
l.add(
|
|
321
|
+
const P = `${g}_${y}_${m}`;
|
|
322
|
+
if (l.has(P)) continue;
|
|
323
|
+
l.add(P), i(c, y, m);
|
|
318
324
|
continue;
|
|
319
325
|
}
|
|
320
|
-
const b = this.levels[c].size,
|
|
321
|
-
for (let
|
|
322
|
-
for (let
|
|
323
|
-
const
|
|
324
|
-
l.has(
|
|
326
|
+
const b = this.levels[c].size, T = this.Cesium.Math.toDegrees(d.west), A = this.Cesium.Math.toDegrees(d.east), k = this.Cesium.Math.toDegrees(d.south), p = this.Cesium.Math.toDegrees(d.north), B = Math.floor((T - -180) / b), C = Math.floor((A - -180) / b), S = Math.floor((k - -90) / b), E = Math.floor((p - -90) / b);
|
|
327
|
+
for (let y = B; y <= C; y++)
|
|
328
|
+
for (let m = S; m <= E; m++) {
|
|
329
|
+
const v = `${g}_${y}_${m}`;
|
|
330
|
+
l.has(v) || (l.add(v), i(c, y, m));
|
|
325
331
|
}
|
|
326
332
|
}
|
|
327
333
|
} catch {
|
|
@@ -333,8 +339,8 @@ class Ke {
|
|
|
333
339
|
refresh() {
|
|
334
340
|
this._update();
|
|
335
341
|
}
|
|
336
|
-
_drawDebugGrid(e, t,
|
|
337
|
-
const n = this.Cesium.Rectangle.fromDegrees(e, t,
|
|
342
|
+
_drawDebugGrid(e, t, i, o, a) {
|
|
343
|
+
const n = this.Cesium.Rectangle.fromDegrees(e, t, i, o), l = this.viewer.entities.add({
|
|
338
344
|
rectangle: {
|
|
339
345
|
coordinates: n,
|
|
340
346
|
material: this.Cesium.Color.YELLOW.withAlpha(0.2),
|
|
@@ -367,187 +373,187 @@ class Ke {
|
|
|
367
373
|
}
|
|
368
374
|
}
|
|
369
375
|
var Ne = "[object Symbol]";
|
|
370
|
-
function N(
|
|
371
|
-
return typeof
|
|
376
|
+
function N(r) {
|
|
377
|
+
return typeof r == "symbol" || F(r) && ie(r) == Ne;
|
|
372
378
|
}
|
|
373
|
-
function he(
|
|
374
|
-
for (var t = -1,
|
|
375
|
-
o[t] = e(
|
|
379
|
+
function he(r, e) {
|
|
380
|
+
for (var t = -1, i = r == null ? 0 : r.length, o = Array(i); ++t < i; )
|
|
381
|
+
o[t] = e(r[t], t, r);
|
|
376
382
|
return o;
|
|
377
383
|
}
|
|
378
384
|
var J = O ? O.prototype : void 0, Q = J ? J.toString : void 0;
|
|
379
|
-
function ce(
|
|
380
|
-
if (typeof
|
|
381
|
-
return
|
|
382
|
-
if (_(
|
|
383
|
-
return he(
|
|
384
|
-
if (N(
|
|
385
|
-
return Q ? Q.call(
|
|
386
|
-
var e =
|
|
387
|
-
return e == "0" && 1 /
|
|
385
|
+
function ce(r) {
|
|
386
|
+
if (typeof r == "string")
|
|
387
|
+
return r;
|
|
388
|
+
if (_(r))
|
|
389
|
+
return he(r, ce) + "";
|
|
390
|
+
if (N(r))
|
|
391
|
+
return Q ? Q.call(r) : "";
|
|
392
|
+
var e = r + "";
|
|
393
|
+
return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
|
|
388
394
|
}
|
|
389
|
-
function de(
|
|
390
|
-
return
|
|
395
|
+
function de(r) {
|
|
396
|
+
return r;
|
|
391
397
|
}
|
|
392
|
-
function We(
|
|
398
|
+
function We(r, e, t) {
|
|
393
399
|
switch (t.length) {
|
|
394
400
|
case 0:
|
|
395
|
-
return
|
|
401
|
+
return r.call(e);
|
|
396
402
|
case 1:
|
|
397
|
-
return
|
|
403
|
+
return r.call(e, t[0]);
|
|
398
404
|
case 2:
|
|
399
|
-
return
|
|
405
|
+
return r.call(e, t[0], t[1]);
|
|
400
406
|
case 3:
|
|
401
|
-
return
|
|
407
|
+
return r.call(e, t[0], t[1], t[2]);
|
|
402
408
|
}
|
|
403
|
-
return
|
|
409
|
+
return r.apply(e, t);
|
|
404
410
|
}
|
|
405
411
|
var Ve = 800, Ue = 16, Ye = Date.now;
|
|
406
|
-
function Xe(
|
|
412
|
+
function Xe(r) {
|
|
407
413
|
var e = 0, t = 0;
|
|
408
414
|
return function() {
|
|
409
|
-
var
|
|
410
|
-
if (t =
|
|
415
|
+
var i = Ye(), o = Ue - (i - t);
|
|
416
|
+
if (t = i, o > 0) {
|
|
411
417
|
if (++e >= Ve)
|
|
412
418
|
return arguments[0];
|
|
413
419
|
} else
|
|
414
420
|
e = 0;
|
|
415
|
-
return
|
|
421
|
+
return r.apply(void 0, arguments);
|
|
416
422
|
};
|
|
417
423
|
}
|
|
418
|
-
function qe(
|
|
424
|
+
function qe(r) {
|
|
419
425
|
return function() {
|
|
420
|
-
return
|
|
426
|
+
return r;
|
|
421
427
|
};
|
|
422
428
|
}
|
|
423
|
-
var Ze = j ? function(
|
|
424
|
-
return j(
|
|
429
|
+
var Ze = j ? function(r, e) {
|
|
430
|
+
return j(r, "toString", {
|
|
425
431
|
configurable: !0,
|
|
426
432
|
enumerable: !1,
|
|
427
433
|
value: qe(e),
|
|
428
434
|
writable: !0
|
|
429
435
|
});
|
|
430
436
|
} : de, ge = Xe(Ze), ee = Math.max;
|
|
431
|
-
function ue(
|
|
432
|
-
return e = ee(e === void 0 ?
|
|
433
|
-
for (var
|
|
434
|
-
n[o] =
|
|
437
|
+
function ue(r, e, t) {
|
|
438
|
+
return e = ee(e === void 0 ? r.length - 1 : e, 0), function() {
|
|
439
|
+
for (var i = arguments, o = -1, a = ee(i.length - e, 0), n = Array(a); ++o < a; )
|
|
440
|
+
n[o] = i[e + o];
|
|
435
441
|
o = -1;
|
|
436
442
|
for (var l = Array(e + 1); ++o < e; )
|
|
437
|
-
l[o] =
|
|
438
|
-
return l[e] = t(n), We(
|
|
443
|
+
l[o] = i[o];
|
|
444
|
+
return l[e] = t(n), We(r, this, l);
|
|
439
445
|
};
|
|
440
446
|
}
|
|
441
|
-
function je(
|
|
442
|
-
return ge(ue(
|
|
447
|
+
function je(r, e) {
|
|
448
|
+
return ge(ue(r, e, de), r + "");
|
|
443
449
|
}
|
|
444
|
-
function Je(
|
|
450
|
+
function Je(r, e, t) {
|
|
445
451
|
if (!K(t))
|
|
446
452
|
return !1;
|
|
447
|
-
var
|
|
448
|
-
return (
|
|
453
|
+
var i = typeof e;
|
|
454
|
+
return (i == "number" ? re(t) && Se(e, t.length) : i == "string" && e in t) ? ae(t[e], r) : !1;
|
|
449
455
|
}
|
|
450
|
-
function Qe(
|
|
456
|
+
function Qe(r) {
|
|
451
457
|
return je(function(e, t) {
|
|
452
|
-
var
|
|
453
|
-
for (a =
|
|
454
|
-
var l = t[
|
|
455
|
-
l &&
|
|
458
|
+
var i = -1, o = t.length, a = o > 1 ? t[o - 1] : void 0, n = o > 2 ? t[2] : void 0;
|
|
459
|
+
for (a = r.length > 3 && typeof a == "function" ? (o--, a) : void 0, n && Je(t[0], t[1], n) && (a = o < 3 ? void 0 : a, o = 1), e = Object(e); ++i < o; ) {
|
|
460
|
+
var l = t[i];
|
|
461
|
+
l && r(e, l, i, a);
|
|
456
462
|
}
|
|
457
463
|
return e;
|
|
458
464
|
});
|
|
459
465
|
}
|
|
460
466
|
var et = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, tt = /^\w*$/;
|
|
461
|
-
function
|
|
462
|
-
if (_(
|
|
467
|
+
function it(r, e) {
|
|
468
|
+
if (_(r))
|
|
463
469
|
return !1;
|
|
464
|
-
var t = typeof
|
|
465
|
-
return t == "number" || t == "symbol" || t == "boolean" ||
|
|
470
|
+
var t = typeof r;
|
|
471
|
+
return t == "number" || t == "symbol" || t == "boolean" || r == null || N(r) ? !0 : tt.test(r) || !et.test(r) || e != null && r in Object(e);
|
|
466
472
|
}
|
|
467
|
-
var
|
|
468
|
-
function W(
|
|
469
|
-
if (typeof
|
|
470
|
-
throw new TypeError(
|
|
473
|
+
var rt = "Expected a function";
|
|
474
|
+
function W(r, e) {
|
|
475
|
+
if (typeof r != "function" || e != null && typeof e != "function")
|
|
476
|
+
throw new TypeError(rt);
|
|
471
477
|
var t = function() {
|
|
472
|
-
var
|
|
478
|
+
var i = arguments, o = e ? e.apply(this, i) : i[0], a = t.cache;
|
|
473
479
|
if (a.has(o))
|
|
474
480
|
return a.get(o);
|
|
475
|
-
var n =
|
|
481
|
+
var n = r.apply(this, i);
|
|
476
482
|
return t.cache = a.set(o, n) || a, n;
|
|
477
483
|
};
|
|
478
484
|
return t.cache = new (W.Cache || oe)(), t;
|
|
479
485
|
}
|
|
480
486
|
W.Cache = oe;
|
|
481
487
|
var at = 500;
|
|
482
|
-
function ot(
|
|
483
|
-
var e = W(
|
|
484
|
-
return t.size === at && t.clear(),
|
|
488
|
+
function ot(r) {
|
|
489
|
+
var e = W(r, function(i) {
|
|
490
|
+
return t.size === at && t.clear(), i;
|
|
485
491
|
}), t = e.cache;
|
|
486
492
|
return e;
|
|
487
493
|
}
|
|
488
|
-
var nt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, st = /\\(\\)?/g, lt = ot(function(
|
|
494
|
+
var nt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, st = /\\(\\)?/g, lt = ot(function(r) {
|
|
489
495
|
var e = [];
|
|
490
|
-
return
|
|
491
|
-
e.push(o ? a.replace(st, "$1") :
|
|
496
|
+
return r.charCodeAt(0) === 46 && e.push(""), r.replace(nt, function(t, i, o, a) {
|
|
497
|
+
e.push(o ? a.replace(st, "$1") : i || t);
|
|
492
498
|
}), e;
|
|
493
499
|
});
|
|
494
|
-
function ht(
|
|
495
|
-
return
|
|
500
|
+
function ht(r) {
|
|
501
|
+
return r == null ? "" : ce(r);
|
|
496
502
|
}
|
|
497
|
-
function V(
|
|
498
|
-
return _(
|
|
503
|
+
function V(r, e) {
|
|
504
|
+
return _(r) ? r : it(r, e) ? [r] : lt(ht(r));
|
|
499
505
|
}
|
|
500
|
-
function fe(
|
|
501
|
-
if (typeof
|
|
502
|
-
return
|
|
503
|
-
var e =
|
|
504
|
-
return e == "0" && 1 /
|
|
506
|
+
function fe(r) {
|
|
507
|
+
if (typeof r == "string" || N(r))
|
|
508
|
+
return r;
|
|
509
|
+
var e = r + "";
|
|
510
|
+
return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
|
|
505
511
|
}
|
|
506
|
-
function ct(
|
|
507
|
-
e = V(e,
|
|
508
|
-
for (var t = 0,
|
|
509
|
-
|
|
510
|
-
return t && t ==
|
|
512
|
+
function ct(r, e) {
|
|
513
|
+
e = V(e, r);
|
|
514
|
+
for (var t = 0, i = e.length; r != null && t < i; )
|
|
515
|
+
r = r[fe(e[t++])];
|
|
516
|
+
return t && t == i ? r : void 0;
|
|
511
517
|
}
|
|
512
518
|
var te = O ? O.isConcatSpreadable : void 0;
|
|
513
|
-
function dt(
|
|
514
|
-
return _(
|
|
519
|
+
function dt(r) {
|
|
520
|
+
return _(r) || H(r) || !!(te && r && r[te]);
|
|
515
521
|
}
|
|
516
|
-
function gt(
|
|
517
|
-
var a = -1, n =
|
|
522
|
+
function gt(r, e, t, i, o) {
|
|
523
|
+
var a = -1, n = r.length;
|
|
518
524
|
for (t || (t = dt), o || (o = []); ++a < n; ) {
|
|
519
|
-
var l =
|
|
520
|
-
t(l) ?
|
|
525
|
+
var l = r[a];
|
|
526
|
+
t(l) ? Ee(o, l) : o[o.length] = l;
|
|
521
527
|
}
|
|
522
528
|
return o;
|
|
523
529
|
}
|
|
524
|
-
function ut(
|
|
525
|
-
var e =
|
|
526
|
-
return e ? gt(
|
|
530
|
+
function ut(r) {
|
|
531
|
+
var e = r == null ? 0 : r.length;
|
|
532
|
+
return e ? gt(r) : [];
|
|
527
533
|
}
|
|
528
|
-
function ft(
|
|
529
|
-
return ge(ue(
|
|
534
|
+
function ft(r) {
|
|
535
|
+
return ge(ue(r, void 0, ut), r + "");
|
|
530
536
|
}
|
|
531
537
|
var mt = "[object Object]", pt = Function.prototype, yt = Object.prototype, me = pt.toString, Ct = yt.hasOwnProperty, vt = me.call(Object);
|
|
532
|
-
function pe(
|
|
533
|
-
if (!F(
|
|
538
|
+
function pe(r) {
|
|
539
|
+
if (!F(r) || ie(r) != mt)
|
|
534
540
|
return !1;
|
|
535
|
-
var e =
|
|
541
|
+
var e = Ge(r);
|
|
536
542
|
if (e === null)
|
|
537
543
|
return !0;
|
|
538
544
|
var t = Ct.call(e, "constructor") && e.constructor;
|
|
539
545
|
return typeof t == "function" && t instanceof t && me.call(t) == vt;
|
|
540
546
|
}
|
|
541
|
-
function bt(
|
|
542
|
-
var
|
|
547
|
+
function bt(r, e, t) {
|
|
548
|
+
var i = -1, o = r.length;
|
|
543
549
|
e < 0 && (e = -e > o ? 0 : o + e), t = t > o ? o : t, t < 0 && (t += o), o = e > t ? 0 : t - e >>> 0, e >>>= 0;
|
|
544
|
-
for (var a = Array(o); ++
|
|
545
|
-
a[
|
|
550
|
+
for (var a = Array(o); ++i < o; )
|
|
551
|
+
a[i] = r[i + e];
|
|
546
552
|
return a;
|
|
547
553
|
}
|
|
548
|
-
function Mt(
|
|
549
|
-
return function(e, t,
|
|
550
|
-
for (var o = -1, a = Object(e), n =
|
|
554
|
+
function Mt(r) {
|
|
555
|
+
return function(e, t, i) {
|
|
556
|
+
for (var o = -1, a = Object(e), n = i(e), l = n.length; l--; ) {
|
|
551
557
|
var s = n[++o];
|
|
552
558
|
if (t(a[s], s, a) === !1)
|
|
553
559
|
break;
|
|
@@ -556,93 +562,93 @@ function Mt(i) {
|
|
|
556
562
|
};
|
|
557
563
|
}
|
|
558
564
|
var _t = Mt();
|
|
559
|
-
function R(
|
|
560
|
-
(t !== void 0 && !ae(
|
|
565
|
+
function R(r, e, t) {
|
|
566
|
+
(t !== void 0 && !ae(r[e], t) || t === void 0 && !(e in r)) && De(r, e, t);
|
|
561
567
|
}
|
|
562
|
-
function Pt(
|
|
563
|
-
return F(
|
|
568
|
+
function Pt(r) {
|
|
569
|
+
return F(r) && re(r);
|
|
564
570
|
}
|
|
565
|
-
function z(
|
|
566
|
-
if (!(e === "constructor" && typeof
|
|
567
|
-
return
|
|
571
|
+
function z(r, e) {
|
|
572
|
+
if (!(e === "constructor" && typeof r[e] == "function") && e != "__proto__")
|
|
573
|
+
return r[e];
|
|
568
574
|
}
|
|
569
|
-
function Lt(
|
|
570
|
-
return ne(
|
|
575
|
+
function Lt(r) {
|
|
576
|
+
return ne(r, se(r));
|
|
571
577
|
}
|
|
572
|
-
function Tt(
|
|
573
|
-
var l = z(
|
|
578
|
+
function Tt(r, e, t, i, o, a, n) {
|
|
579
|
+
var l = z(r, t), s = z(e, t), d = n.get(s);
|
|
574
580
|
if (d) {
|
|
575
|
-
R(
|
|
581
|
+
R(r, t, d);
|
|
576
582
|
return;
|
|
577
583
|
}
|
|
578
|
-
var h = a ? a(l, s, t + "",
|
|
584
|
+
var h = a ? a(l, s, t + "", r, e, n) : void 0, c = h === void 0;
|
|
579
585
|
if (c) {
|
|
580
586
|
var g = _(s), u = !g && Ie(s), f = !g && !u && Oe(s);
|
|
581
587
|
h = s, g || u || f ? _(l) ? h = l : Pt(l) ? h = Ae(l) : u ? (c = !1, h = ke(s, !0)) : f ? (c = !1, h = Be(s, !0)) : h = [] : pe(s) || H(s) ? (h = l, H(l) ? h = Lt(l) : (!K(l) || le(l)) && (h = $e(s))) : c = !1;
|
|
582
588
|
}
|
|
583
|
-
c && (n.set(s, h), o(h, s,
|
|
589
|
+
c && (n.set(s, h), o(h, s, i, a, n), n.delete(s)), R(r, t, h);
|
|
584
590
|
}
|
|
585
|
-
function ye(
|
|
586
|
-
|
|
591
|
+
function ye(r, e, t, i, o) {
|
|
592
|
+
r !== e && _t(e, function(a, n) {
|
|
587
593
|
if (o || (o = new He()), K(a))
|
|
588
|
-
Tt(
|
|
594
|
+
Tt(r, e, n, t, ye, i, o);
|
|
589
595
|
else {
|
|
590
|
-
var l =
|
|
591
|
-
l === void 0 && (l = a), R(
|
|
596
|
+
var l = i ? i(z(r, n), a, n + "", r, e, o) : void 0;
|
|
597
|
+
l === void 0 && (l = a), R(r, n, l);
|
|
592
598
|
}
|
|
593
599
|
}, se);
|
|
594
600
|
}
|
|
595
|
-
function wt(
|
|
596
|
-
var e =
|
|
597
|
-
return e ?
|
|
601
|
+
function wt(r) {
|
|
602
|
+
var e = r == null ? 0 : r.length;
|
|
603
|
+
return e ? r[e - 1] : void 0;
|
|
598
604
|
}
|
|
599
|
-
function xt(
|
|
600
|
-
return e.length < 2 ?
|
|
605
|
+
function xt(r, e) {
|
|
606
|
+
return e.length < 2 ? r : ct(r, bt(e, 0, -1));
|
|
601
607
|
}
|
|
602
|
-
var
|
|
603
|
-
ye(
|
|
604
|
-
}),
|
|
605
|
-
function
|
|
606
|
-
e = V(e,
|
|
607
|
-
var t = -1,
|
|
608
|
-
if (!
|
|
608
|
+
var St = Qe(function(r, e, t) {
|
|
609
|
+
ye(r, e, t);
|
|
610
|
+
}), Et = Object.prototype, Gt = Et.hasOwnProperty;
|
|
611
|
+
function Dt(r, e) {
|
|
612
|
+
e = V(e, r);
|
|
613
|
+
var t = -1, i = e.length;
|
|
614
|
+
if (!i)
|
|
609
615
|
return !0;
|
|
610
|
-
for (var o =
|
|
616
|
+
for (var o = r == null || typeof r != "object" && typeof r != "function"; ++t < i; ) {
|
|
611
617
|
var a = e[t];
|
|
612
618
|
if (typeof a == "string") {
|
|
613
|
-
if (a === "__proto__" && !
|
|
619
|
+
if (a === "__proto__" && !Gt.call(r, "__proto__"))
|
|
614
620
|
return !1;
|
|
615
|
-
if (a === "constructor" && t + 1 <
|
|
621
|
+
if (a === "constructor" && t + 1 < i && typeof e[t + 1] == "string" && e[t + 1] === "prototype") {
|
|
616
622
|
if (o && t === 0)
|
|
617
623
|
continue;
|
|
618
624
|
return !1;
|
|
619
625
|
}
|
|
620
626
|
}
|
|
621
627
|
}
|
|
622
|
-
var n = xt(
|
|
628
|
+
var n = xt(r, e);
|
|
623
629
|
return n == null || delete n[fe(wt(e))];
|
|
624
630
|
}
|
|
625
|
-
function It(
|
|
626
|
-
return pe(
|
|
631
|
+
function It(r) {
|
|
632
|
+
return pe(r) ? void 0 : r;
|
|
627
633
|
}
|
|
628
|
-
var Ot = 1, At = 2, kt = 4, Bt = ft(function(
|
|
634
|
+
var Ot = 1, At = 2, kt = 4, Bt = ft(function(r, e) {
|
|
629
635
|
var t = {};
|
|
630
|
-
if (
|
|
636
|
+
if (r == null)
|
|
631
637
|
return t;
|
|
632
|
-
var
|
|
638
|
+
var i = !1;
|
|
633
639
|
e = he(e, function(a) {
|
|
634
|
-
return a = V(a,
|
|
635
|
-
}), ne(
|
|
640
|
+
return a = V(a, r), i || (i = a.length > 1), a;
|
|
641
|
+
}), ne(r, Re(r), t), i && (t = ze(t, Ot | At | kt, It));
|
|
636
642
|
for (var o = e.length; o--; )
|
|
637
|
-
|
|
643
|
+
Dt(t, e[o]);
|
|
638
644
|
return t;
|
|
639
645
|
});
|
|
640
|
-
function $t(
|
|
646
|
+
function $t(r, e) {
|
|
641
647
|
const t = e.materialType || "DynamicImgMaterial" + Date.now() + Math.floor(Math.random() * 1e3);
|
|
642
|
-
function
|
|
643
|
-
this._definitionChanged = new
|
|
648
|
+
function i(a) {
|
|
649
|
+
this._definitionChanged = new r.Event(), this._color = a.color, this._colorSubscription = void 0, this.color = a.color, this.duration = a.duration, this._time = Date.now();
|
|
644
650
|
}
|
|
645
|
-
Object.defineProperties(
|
|
651
|
+
Object.defineProperties(i.prototype, {
|
|
646
652
|
isConstant: {
|
|
647
653
|
get() {
|
|
648
654
|
return !1;
|
|
@@ -653,18 +659,18 @@ function $t(i, e) {
|
|
|
653
659
|
return this._definitionChanged;
|
|
654
660
|
}
|
|
655
661
|
},
|
|
656
|
-
color:
|
|
657
|
-
}),
|
|
662
|
+
color: r.createPropertyDescriptor("color")
|
|
663
|
+
}), i.prototype.getType = function() {
|
|
658
664
|
return t;
|
|
659
|
-
},
|
|
660
|
-
return
|
|
665
|
+
}, i.prototype.getValue = function(a, n) {
|
|
666
|
+
return r.defined(n) || (n = {}), n.color = r.Property.getValueOrClonedDefault(
|
|
661
667
|
this._color,
|
|
662
668
|
a,
|
|
663
|
-
|
|
669
|
+
r.Color.WHITE,
|
|
664
670
|
n.color
|
|
665
671
|
), n.image = e.image, n;
|
|
666
|
-
},
|
|
667
|
-
return this === a || a instanceof
|
|
672
|
+
}, i.prototype.equals = function(a) {
|
|
673
|
+
return this === a || a instanceof i && r.Property.equals(this._color, a._color);
|
|
668
674
|
};
|
|
669
675
|
const o = function(a) {
|
|
670
676
|
return `
|
|
@@ -679,7 +685,7 @@ function $t(i, e) {
|
|
|
679
685
|
return material;
|
|
680
686
|
}`;
|
|
681
687
|
};
|
|
682
|
-
return
|
|
688
|
+
return r.Material._materialCache.addMaterial(t, {
|
|
683
689
|
fabric: {
|
|
684
690
|
type: t,
|
|
685
691
|
uniforms: {
|
|
@@ -698,14 +704,14 @@ function $t(i, e) {
|
|
|
698
704
|
translucent() {
|
|
699
705
|
return !0;
|
|
700
706
|
}
|
|
701
|
-
}), new
|
|
707
|
+
}), new i(e);
|
|
702
708
|
}
|
|
703
|
-
function Ce(
|
|
709
|
+
function Ce(r, e) {
|
|
704
710
|
const t = e.MaterialType || "wallType" + (/* @__PURE__ */ new Date()).getTime() + parseInt(Math.random() * 1e3 + "");
|
|
705
|
-
function
|
|
706
|
-
this._definitionChanged = new
|
|
711
|
+
function i(a) {
|
|
712
|
+
this._definitionChanged = new r.Event(), this._color = void 0, this._colorSubscription = void 0, this.color = a.color, this.duration = a.duration, this._time = (/* @__PURE__ */ new Date()).getTime();
|
|
707
713
|
}
|
|
708
|
-
Object.defineProperties(
|
|
714
|
+
Object.defineProperties(i.prototype, {
|
|
709
715
|
isConstant: {
|
|
710
716
|
get: function() {
|
|
711
717
|
return !1;
|
|
@@ -716,13 +722,13 @@ function Ce(i, e) {
|
|
|
716
722
|
return this._definitionChanged;
|
|
717
723
|
}
|
|
718
724
|
},
|
|
719
|
-
color:
|
|
720
|
-
}),
|
|
725
|
+
color: r.createPropertyDescriptor("color")
|
|
726
|
+
}), i.prototype.getType = function() {
|
|
721
727
|
return t;
|
|
722
|
-
},
|
|
723
|
-
return
|
|
724
|
-
},
|
|
725
|
-
return this === a || a instanceof
|
|
728
|
+
}, i.prototype.getValue = function(a, n) {
|
|
729
|
+
return r.defined(n) || (n = {}), n.image = e.image, this.duration && (n.time = ((/* @__PURE__ */ new Date()).getTime() - this._time) % this.duration / this.duration), n;
|
|
730
|
+
}, i.prototype.equals = function(a) {
|
|
731
|
+
return this === a || a instanceof i && r.Property.equals(this._color, a._color);
|
|
726
732
|
};
|
|
727
733
|
const o = function(a) {
|
|
728
734
|
let n = `czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
@@ -744,11 +750,11 @@ function Ce(i, e) {
|
|
|
744
750
|
}
|
|
745
751
|
`, n;
|
|
746
752
|
};
|
|
747
|
-
return
|
|
753
|
+
return r.Material._materialCache.addMaterial(t, {
|
|
748
754
|
fabric: {
|
|
749
755
|
type: t,
|
|
750
756
|
uniforms: {
|
|
751
|
-
color: new
|
|
757
|
+
color: new r.Color(1, 0, 0, 0.5),
|
|
752
758
|
image: e.image,
|
|
753
759
|
time: 0
|
|
754
760
|
},
|
|
@@ -761,15 +767,15 @@ function Ce(i, e) {
|
|
|
761
767
|
translucent: function() {
|
|
762
768
|
return !0;
|
|
763
769
|
}
|
|
764
|
-
}), new
|
|
770
|
+
}), new i(e);
|
|
765
771
|
}
|
|
766
|
-
function Ht(
|
|
767
|
-
const t =
|
|
772
|
+
function Ht(r, e) {
|
|
773
|
+
const t = r.Color, i = Object.defineProperties, o = r.Event, a = r.createPropertyDescriptor, n = r.Property, l = (c, g) => c === void 0 ? g : c, s = {};
|
|
768
774
|
let d = e.materialType || "PolylineFlow" + Date.now() + Math.floor(Math.random() * 1e3);
|
|
769
775
|
function h(c) {
|
|
770
776
|
c = l(c, s), this._definitionChanged = new o(), this._color = void 0, this._colorSubscription = void 0, this.color = c.color || t.fromBytes(0, 255, 255, 255), this._duration = void 0, this._durationSubscription = void 0, this.duration = l(c.duration, 45);
|
|
771
777
|
}
|
|
772
|
-
return
|
|
778
|
+
return i(h.prototype, {
|
|
773
779
|
isConstant: {
|
|
774
780
|
get() {
|
|
775
781
|
return !1;
|
|
@@ -786,15 +792,15 @@ function Ht(i, e) {
|
|
|
786
792
|
return g || (g = {}), g.color = n.getValueOrClonedDefault(
|
|
787
793
|
this._color,
|
|
788
794
|
c,
|
|
789
|
-
|
|
795
|
+
r.Color.WHITE,
|
|
790
796
|
g.color
|
|
791
797
|
), g.duration = this._duration, g;
|
|
792
798
|
}, h.prototype.equals = function(c) {
|
|
793
799
|
return this === c || c instanceof h && n.equals(this._color, c._color);
|
|
794
|
-
},
|
|
800
|
+
}, i(h.prototype, {
|
|
795
801
|
color: a("color"),
|
|
796
802
|
duration: a("duration")
|
|
797
|
-
}),
|
|
803
|
+
}), r.PolylineFlowMaterialProperty = h, r.Material._materialCache.addMaterial(d, {
|
|
798
804
|
fabric: {
|
|
799
805
|
type: d,
|
|
800
806
|
uniforms: {
|
|
@@ -839,7 +845,7 @@ class ve {
|
|
|
839
845
|
* 注册材质
|
|
840
846
|
*/
|
|
841
847
|
register(e) {
|
|
842
|
-
const { themeKey: t, material:
|
|
848
|
+
const { themeKey: t, material: i, force: o = !1, category: a = "default" } = e;
|
|
843
849
|
this.categoryMap.has(a) || this.categoryMap.set(a, /* @__PURE__ */ new Map());
|
|
844
850
|
const n = this.categoryMap.get(a);
|
|
845
851
|
if (n.has(t))
|
|
@@ -851,7 +857,7 @@ class ve {
|
|
|
851
857
|
);
|
|
852
858
|
return;
|
|
853
859
|
}
|
|
854
|
-
n.set(t,
|
|
860
|
+
n.set(t, i);
|
|
855
861
|
}
|
|
856
862
|
/**
|
|
857
863
|
* 获取材质
|
|
@@ -859,12 +865,12 @@ class ve {
|
|
|
859
865
|
get({
|
|
860
866
|
themeKey: e,
|
|
861
867
|
category: t,
|
|
862
|
-
options:
|
|
868
|
+
options: i
|
|
863
869
|
}) {
|
|
864
870
|
return t = t || "default", this.CategoryGet[t] ? this.CategoryGet[t]({
|
|
865
871
|
themeKey: e,
|
|
866
872
|
materialMap: this.categoryMap,
|
|
867
|
-
options:
|
|
873
|
+
options: i || {}
|
|
868
874
|
}) : this.categoryMap.get(t)?.get(e);
|
|
869
875
|
}
|
|
870
876
|
/**
|
|
@@ -877,10 +883,10 @@ class ve {
|
|
|
877
883
|
* 移除材质
|
|
878
884
|
*/
|
|
879
885
|
remove(e, t = "default") {
|
|
880
|
-
const
|
|
881
|
-
if (!
|
|
882
|
-
const o =
|
|
883
|
-
o?.destroy && o.destroy(),
|
|
886
|
+
const i = this.categoryMap.get(t);
|
|
887
|
+
if (!i) return;
|
|
888
|
+
const o = i.get(e);
|
|
889
|
+
o?.destroy && o.destroy(), i.delete(e), i.size === 0 && this.categoryMap.delete(t);
|
|
884
890
|
}
|
|
885
891
|
/**
|
|
886
892
|
* 获取某分类下的所有 keys
|
|
@@ -894,8 +900,8 @@ class ve {
|
|
|
894
900
|
clearCategory(e = "default") {
|
|
895
901
|
const t = this.categoryMap.get(e);
|
|
896
902
|
if (t) {
|
|
897
|
-
for (const
|
|
898
|
-
|
|
903
|
+
for (const i of t.values())
|
|
904
|
+
i?.destroy?.();
|
|
899
905
|
t.clear(), this.categoryMap.delete(e);
|
|
900
906
|
}
|
|
901
907
|
}
|
|
@@ -923,8 +929,8 @@ class Rt {
|
|
|
923
929
|
aggregator;
|
|
924
930
|
cardPool;
|
|
925
931
|
constructor(e) {
|
|
926
|
-
const { id: t, entities:
|
|
927
|
-
this.id = t, this.entities =
|
|
932
|
+
const { id: t, entities: i = [], primitives: o = [], dataItem: a = {}, aggregator: n, cardPool: l } = e;
|
|
933
|
+
this.id = t, this.entities = i, this.primitives = o, this.dataItem = a, this.aggregator = n, this.cardPool = l;
|
|
928
934
|
}
|
|
929
935
|
// 改造 setVisible 方法,支持 Entity 和 Primitive 的可见性控制
|
|
930
936
|
setVisible(e) {
|
|
@@ -932,22 +938,22 @@ class Rt {
|
|
|
932
938
|
t && (t.show = e);
|
|
933
939
|
}), this.primitives.forEach((t) => {
|
|
934
940
|
t && (t.show = e);
|
|
935
|
-
}), this.aggregator && Array.isArray(this.dataItem.billboard) && this.dataItem.billboard.map((
|
|
941
|
+
}), this.aggregator && Array.isArray(this.dataItem.billboard) && this.dataItem.billboard.map((i, o) => ({
|
|
936
942
|
id: this.dataItem.id,
|
|
937
943
|
data: {
|
|
938
944
|
...this.dataItem,
|
|
939
|
-
show: e && (
|
|
945
|
+
show: e && (i.data?.show ?? !0)
|
|
940
946
|
}
|
|
941
|
-
})).forEach((
|
|
942
|
-
this.aggregator?.updatePoint(
|
|
947
|
+
})).forEach((i) => {
|
|
948
|
+
this.aggregator?.updatePoint(i);
|
|
943
949
|
}), this.cardPool && this.dataItem.card && (e ? this.cardPool.showByIds([this.dataItem.id]) : this.cardPool.hideByIds([this.dataItem.id]));
|
|
944
950
|
}
|
|
945
951
|
// 改造 removeAll 方法,支持 Entity 和 Primitive 的移除
|
|
946
952
|
removeAll(e, t = !0) {
|
|
947
|
-
return this.entities.forEach((
|
|
948
|
-
|
|
949
|
-
}), this.entities = [], this.primitives.forEach((
|
|
950
|
-
|
|
953
|
+
return this.entities.forEach((i) => {
|
|
954
|
+
i && e.entities.remove(i);
|
|
955
|
+
}), this.entities = [], this.primitives.forEach((i) => {
|
|
956
|
+
i && e.scene.primitives.remove(i);
|
|
951
957
|
}), this.primitives = [], t && this.aggregator && Array.isArray(this.dataItem.billboard) && this.aggregator.removePointsById([this.dataItem.id]), t && this.cardPool && this.dataItem.card && this.cardPool.removeByIds([this.dataItem.id]), this.dataItem.id;
|
|
952
958
|
}
|
|
953
959
|
}
|
|
@@ -959,20 +965,20 @@ class zt {
|
|
|
959
965
|
materialManager;
|
|
960
966
|
aggregator;
|
|
961
967
|
cardPool;
|
|
962
|
-
constructor(e, t,
|
|
963
|
-
this.id = e, this.Cesium = t, this.viewer =
|
|
968
|
+
constructor(e, t, i, o, a, n) {
|
|
969
|
+
this.id = e, this.Cesium = t, this.viewer = i, this.materialManager = o, this.aggregator = a, this.cardPool = n, this.aggregator.labelPool.eventBus.addListener(D.Click, {
|
|
964
970
|
name: "BufferedHierarchicalAggregator_maker_click",
|
|
965
971
|
fn: (s, d) => {
|
|
966
972
|
this.cardPool.showByIds([s.data.id]);
|
|
967
973
|
}
|
|
968
|
-
}), new t.ScreenSpaceEventHandler(
|
|
974
|
+
}), new t.ScreenSpaceEventHandler(i.scene.canvas).setInputAction(() => {
|
|
969
975
|
this.cardPool.hideFilter((s) => !s.initShow);
|
|
970
976
|
}, t.ScreenSpaceEventType.LEFT_CLICK);
|
|
971
977
|
}
|
|
972
978
|
/** ====== 下面是抽出的创建函数 ====== */
|
|
973
979
|
createPolyline(e, t) {
|
|
974
980
|
if (!e.positions || e.positions.length < 1) return null;
|
|
975
|
-
const
|
|
981
|
+
const i = this.materialManager.get({
|
|
976
982
|
themeKey: e.theme,
|
|
977
983
|
category: "polyline",
|
|
978
984
|
options: e
|
|
@@ -980,7 +986,7 @@ class zt {
|
|
|
980
986
|
let a = {
|
|
981
987
|
...e
|
|
982
988
|
};
|
|
983
|
-
return
|
|
989
|
+
return i && (a.material = i), this.viewer.entities.add({
|
|
984
990
|
polyline: {
|
|
985
991
|
...a,
|
|
986
992
|
positions: this.Cesium.Cartesian3.fromDegreesArrayHeights(o)
|
|
@@ -990,7 +996,7 @@ class zt {
|
|
|
990
996
|
}
|
|
991
997
|
createWall(e, t) {
|
|
992
998
|
if (!e.positions || e.positions.length < 1) return null;
|
|
993
|
-
const
|
|
999
|
+
const i = this.materialManager.get({
|
|
994
1000
|
themeKey: e.theme,
|
|
995
1001
|
category: "wall",
|
|
996
1002
|
options: e
|
|
@@ -1000,7 +1006,7 @@ class zt {
|
|
|
1000
1006
|
let l = {
|
|
1001
1007
|
...e
|
|
1002
1008
|
};
|
|
1003
|
-
return
|
|
1009
|
+
return i && (l.material = i), this.viewer.entities.add({
|
|
1004
1010
|
wall: {
|
|
1005
1011
|
...l,
|
|
1006
1012
|
positions: n,
|
|
@@ -1012,7 +1018,7 @@ class zt {
|
|
|
1012
1018
|
}
|
|
1013
1019
|
createPolygon(e, t) {
|
|
1014
1020
|
if (!e.hierarchy || e.hierarchy.length < 1) return null;
|
|
1015
|
-
const
|
|
1021
|
+
const i = this.materialManager.get({
|
|
1016
1022
|
themeKey: e.theme,
|
|
1017
1023
|
category: "polygon",
|
|
1018
1024
|
options: e
|
|
@@ -1023,7 +1029,7 @@ class zt {
|
|
|
1023
1029
|
let s = {
|
|
1024
1030
|
...e
|
|
1025
1031
|
};
|
|
1026
|
-
return
|
|
1032
|
+
return i && (s.material = i), this.viewer.entities.add({
|
|
1027
1033
|
polygon: {
|
|
1028
1034
|
...s,
|
|
1029
1035
|
hierarchy: l
|
|
@@ -1034,10 +1040,10 @@ class zt {
|
|
|
1034
1040
|
}
|
|
1035
1041
|
createBillboardPoints(e) {
|
|
1036
1042
|
return !e.billboard?.length || !this.aggregator ? [] : e.billboard.map((t) => {
|
|
1037
|
-
const [
|
|
1043
|
+
const [i, o, a = 0] = t.position || [0, 0, 0];
|
|
1038
1044
|
return {
|
|
1039
1045
|
id: e.id,
|
|
1040
|
-
lon:
|
|
1046
|
+
lon: i,
|
|
1041
1047
|
lat: o,
|
|
1042
1048
|
height: a,
|
|
1043
1049
|
name: t.options?.text || "",
|
|
@@ -1060,8 +1066,8 @@ class zt {
|
|
|
1060
1066
|
}
|
|
1061
1067
|
/** ====== 主入口:仅保留循环,内部调用独立函数 ====== */
|
|
1062
1068
|
addGroup(e, t = !0) {
|
|
1063
|
-
const
|
|
1064
|
-
this.removeGroup(
|
|
1069
|
+
const i = e.id || `${Date.now()}`;
|
|
1070
|
+
this.removeGroup(i);
|
|
1065
1071
|
const o = [], a = e.show !== !1;
|
|
1066
1072
|
(e.polyline || []).forEach((s) => {
|
|
1067
1073
|
const d = this.createPolyline(s, a);
|
|
@@ -1076,18 +1082,18 @@ class zt {
|
|
|
1076
1082
|
const n = this.createBillboardPoints(e);
|
|
1077
1083
|
n.length && t && this.aggregator.appendPoints(n, !1), this.createCard(e);
|
|
1078
1084
|
const l = new Rt({
|
|
1079
|
-
id:
|
|
1085
|
+
id: i,
|
|
1080
1086
|
entities: o,
|
|
1081
1087
|
primitives: [],
|
|
1082
1088
|
dataItem: e,
|
|
1083
1089
|
aggregator: this.aggregator,
|
|
1084
1090
|
cardPool: this.cardPool
|
|
1085
1091
|
});
|
|
1086
|
-
return this.groupMap.set(
|
|
1092
|
+
return this.groupMap.set(i, l), n;
|
|
1087
1093
|
}
|
|
1088
1094
|
async addGroups(e) {
|
|
1089
|
-
const
|
|
1090
|
-
|
|
1095
|
+
const i = e.map((o) => this.addGroup(o, !1)).flat();
|
|
1096
|
+
i.length > 0 && this.aggregator && this.aggregator.appendPoints(i, !1);
|
|
1091
1097
|
}
|
|
1092
1098
|
removeGroup(e) {
|
|
1093
1099
|
const t = this.groupMap.get(e);
|
|
@@ -1095,11 +1101,11 @@ class zt {
|
|
|
1095
1101
|
}
|
|
1096
1102
|
removeGroups(e) {
|
|
1097
1103
|
let t = [];
|
|
1098
|
-
for (const
|
|
1099
|
-
const o = this.groupMap.get(
|
|
1104
|
+
for (const i of e) {
|
|
1105
|
+
const o = this.groupMap.get(i);
|
|
1100
1106
|
if (o) {
|
|
1101
1107
|
let a = o.removeAll(this.viewer, !1);
|
|
1102
|
-
this.groupMap.delete(
|
|
1108
|
+
this.groupMap.delete(i), t.push(a);
|
|
1103
1109
|
}
|
|
1104
1110
|
}
|
|
1105
1111
|
this.aggregator.removePointsById(t), this.cardPool.removeByIds(t);
|
|
@@ -1110,11 +1116,11 @@ class zt {
|
|
|
1110
1116
|
}
|
|
1111
1117
|
async updateGroups(e) {
|
|
1112
1118
|
this.aggregator.removePointsById(e.map((o) => o.id)), this.cardPool.removeByIds(e.map((o) => o.id));
|
|
1113
|
-
const
|
|
1119
|
+
const i = e.map((o) => {
|
|
1114
1120
|
const a = this.groupMap.get(o.id);
|
|
1115
1121
|
return a && (a.removeAll(this.viewer, !1), this.groupMap.delete(o.id)), this.addGroup(o, !1);
|
|
1116
1122
|
}).flat();
|
|
1117
|
-
|
|
1123
|
+
i.length > 0 && this.aggregator && this.aggregator.appendPoints(i, !1);
|
|
1118
1124
|
}
|
|
1119
1125
|
setGroupVisible(e, t) {
|
|
1120
1126
|
this.groupMap.get(e)?.setVisible(t);
|
|
@@ -1130,8 +1136,8 @@ class Ft {
|
|
|
1130
1136
|
materialManager;
|
|
1131
1137
|
aggregator;
|
|
1132
1138
|
cardPool;
|
|
1133
|
-
constructor(e, t,
|
|
1134
|
-
this.Cesium = e, this.viewer = t, this.materialManager =
|
|
1139
|
+
constructor(e, t, i, o, a) {
|
|
1140
|
+
this.Cesium = e, this.viewer = t, this.materialManager = i, this.aggregator = o, this.cardPool = a;
|
|
1135
1141
|
}
|
|
1136
1142
|
addLayer(e) {
|
|
1137
1143
|
this.layerMap.has(e) || this.layerMap.set(
|
|
@@ -1154,15 +1160,15 @@ class Ft {
|
|
|
1154
1160
|
return this.layerMap.get(e);
|
|
1155
1161
|
}
|
|
1156
1162
|
async addGroupsToLayer(e, t) {
|
|
1157
|
-
const
|
|
1158
|
-
|
|
1163
|
+
const i = this.layerMap.get(e);
|
|
1164
|
+
i && (i.addGroups(t), this.aggregator.refresh());
|
|
1159
1165
|
}
|
|
1160
1166
|
updateGroupToLayer(e, t) {
|
|
1161
|
-
const
|
|
1162
|
-
|
|
1167
|
+
const i = this.layerMap.get(e);
|
|
1168
|
+
i && (i.updateGroups(t), this.aggregator.refresh());
|
|
1163
1169
|
}
|
|
1164
|
-
setGroupVisible(e, t,
|
|
1165
|
-
this.layerMap.get(e)?.setGroupVisible(t,
|
|
1170
|
+
setGroupVisible(e, t, i) {
|
|
1171
|
+
this.layerMap.get(e)?.setGroupVisible(t, i);
|
|
1166
1172
|
}
|
|
1167
1173
|
removeGroup(e, t) {
|
|
1168
1174
|
this.layerMap.get(e)?.removeGroup(t);
|
|
@@ -1182,10 +1188,10 @@ class Kt {
|
|
|
1182
1188
|
this.labelId = e.labelId, this.cardId = e.cardId, this.opt = e, this.MaterialManager = e.MaterialManager || new ve(), this.instance = this.initCore(e, e.eventBus, e.cardEventBus);
|
|
1183
1189
|
}
|
|
1184
1190
|
//初始化标记管理
|
|
1185
|
-
initCore(e, t,
|
|
1191
|
+
initCore(e, t, i) {
|
|
1186
1192
|
let { Cesium: o, viewer: a, aggregatorOptions: n } = e;
|
|
1187
|
-
t || (t = new $()),
|
|
1188
|
-
const l = new X(o, a, this.labelId, t), s = new X(o, a, this.cardId,
|
|
1193
|
+
t || (t = new $()), i || (i = new $());
|
|
1194
|
+
const l = new X(o, a, this.labelId, t), s = new X(o, a, this.cardId, i, !1), d = new Ke(o, a, {
|
|
1189
1195
|
//聚合
|
|
1190
1196
|
threshold: n?.threshold || 16,
|
|
1191
1197
|
displayLimit: n?.displayLimit || 1e3,
|
|
@@ -1207,7 +1213,7 @@ class Kt {
|
|
|
1207
1213
|
d,
|
|
1208
1214
|
s
|
|
1209
1215
|
);
|
|
1210
|
-
return { materialManager: h, entityLayerManager: c, cardPool: s, labelPool: l, aggregator: d, eventBus: t, cardEventBus:
|
|
1216
|
+
return { materialManager: h, entityLayerManager: c, cardPool: s, labelPool: l, aggregator: d, eventBus: t, cardEventBus: i };
|
|
1211
1217
|
}
|
|
1212
1218
|
//添加标记
|
|
1213
1219
|
set(e) {
|
|
@@ -1221,18 +1227,18 @@ class Kt {
|
|
|
1221
1227
|
//添加
|
|
1222
1228
|
add(e) {
|
|
1223
1229
|
let t = [];
|
|
1224
|
-
_(e) ? t = e : t.push(e), t.forEach((
|
|
1225
|
-
this.entityList.set(
|
|
1230
|
+
_(e) ? t = e : t.push(e), t.forEach((i) => {
|
|
1231
|
+
this.entityList.set(i.id, i);
|
|
1226
1232
|
}), this.instance.entityLayerManager.getLayer("Layer_default") || this.instance.entityLayerManager.addLayer("Layer_default"), this.instance.entityLayerManager.addGroupsToLayer("Layer_default", t);
|
|
1227
1233
|
}
|
|
1228
1234
|
//更新标记
|
|
1229
1235
|
update(e, t = !0) {
|
|
1230
|
-
let
|
|
1231
|
-
_(e) ?
|
|
1232
|
-
const o =
|
|
1236
|
+
let i = [];
|
|
1237
|
+
_(e) ? i = e : i.push(e);
|
|
1238
|
+
const o = i.map((a) => {
|
|
1233
1239
|
const n = this.entityList.get(a.id);
|
|
1234
1240
|
if (!n) return;
|
|
1235
|
-
let l =
|
|
1241
|
+
let l = St({}, n, a);
|
|
1236
1242
|
return this.entityList.set(a.id, l), l;
|
|
1237
1243
|
}).filter(Boolean);
|
|
1238
1244
|
t && this.instance.entityLayerManager.updateGroupToLayer("Layer_default", o);
|
|
@@ -1251,8 +1257,8 @@ class Kt {
|
|
|
1251
1257
|
//删除标记
|
|
1252
1258
|
delete(e) {
|
|
1253
1259
|
let t = [];
|
|
1254
|
-
_(e) ? t = e : t.push(e), t.forEach((
|
|
1255
|
-
this.entityList.delete(
|
|
1260
|
+
_(e) ? t = e : t.push(e), t.forEach((i) => {
|
|
1261
|
+
this.entityList.delete(i);
|
|
1256
1262
|
}), this.instance.entityLayerManager.removeGroups("Layer_default", t);
|
|
1257
1263
|
}
|
|
1258
1264
|
setMarkerAggregationEnabled(e, t) {
|
|
@@ -1263,55 +1269,55 @@ class Kt {
|
|
|
1263
1269
|
}
|
|
1264
1270
|
}
|
|
1265
1271
|
function Nt({
|
|
1266
|
-
Cesium:
|
|
1272
|
+
Cesium: r,
|
|
1267
1273
|
options: e,
|
|
1268
1274
|
MaterialManager: t
|
|
1269
1275
|
}) {
|
|
1270
1276
|
if (e.data?.theme) {
|
|
1271
1277
|
if (e.data?.lineType == "1") {
|
|
1272
|
-
let
|
|
1273
|
-
color: new
|
|
1278
|
+
let i = Ht(r, {
|
|
1279
|
+
color: new r.Color.fromCssColorString(e?.options?.color || "#ffffff"),
|
|
1274
1280
|
duration: 100
|
|
1275
1281
|
});
|
|
1276
1282
|
t.register({
|
|
1277
1283
|
themeKey: e.data?.theme,
|
|
1278
|
-
material:
|
|
1284
|
+
material: i,
|
|
1279
1285
|
category: "polyline"
|
|
1280
1286
|
});
|
|
1281
1287
|
} else if (e.data?.lineType == "2") {
|
|
1282
|
-
let
|
|
1283
|
-
|
|
1288
|
+
let i = new r.PolylineArrowMaterialProperty(
|
|
1289
|
+
r.Color.fromCssColorString(e?.options?.color || "red")
|
|
1284
1290
|
);
|
|
1285
1291
|
t.register({
|
|
1286
1292
|
themeKey: e.data?.theme,
|
|
1287
|
-
material:
|
|
1293
|
+
material: i,
|
|
1288
1294
|
category: "polyline"
|
|
1289
1295
|
});
|
|
1290
1296
|
} else if (e.data?.lineType == "3") {
|
|
1291
|
-
let
|
|
1292
|
-
color:
|
|
1297
|
+
let i = new r.PolylineOutlineMaterialProperty({
|
|
1298
|
+
color: r.Color.fromCssColorString(e?.options?.color || "red"),
|
|
1293
1299
|
outlineWidth: 0
|
|
1294
1300
|
});
|
|
1295
1301
|
t.register({
|
|
1296
1302
|
themeKey: e.data?.theme,
|
|
1297
|
-
material:
|
|
1303
|
+
material: i,
|
|
1298
1304
|
category: "polyline"
|
|
1299
1305
|
});
|
|
1300
1306
|
} else if (e.data?.lineType == "4") {
|
|
1301
|
-
let
|
|
1302
|
-
color:
|
|
1307
|
+
let i = new r.PolylineDashMaterialProperty({
|
|
1308
|
+
color: r.Color.fromCssColorString(e?.options?.color || "red"),
|
|
1303
1309
|
dashLength: Number(e?.options?.dashLength || 30)
|
|
1304
1310
|
//短划线长度
|
|
1305
1311
|
});
|
|
1306
1312
|
t.register({
|
|
1307
1313
|
themeKey: e.data?.theme,
|
|
1308
|
-
material:
|
|
1314
|
+
material: i,
|
|
1309
1315
|
category: "polyline"
|
|
1310
1316
|
});
|
|
1311
1317
|
} else if (e.data?.lineType == "5") {
|
|
1312
|
-
let
|
|
1318
|
+
let i = $t(r, {
|
|
1313
1319
|
image: e.img,
|
|
1314
|
-
color: new
|
|
1320
|
+
color: new r.Color.fromCssColorString(e?.options?.color || "#ffffff"),
|
|
1315
1321
|
duration: 5e3,
|
|
1316
1322
|
// freely: 'vertical',
|
|
1317
1323
|
direction: "-",
|
|
@@ -1319,38 +1325,38 @@ function Nt({
|
|
|
1319
1325
|
});
|
|
1320
1326
|
t.register({
|
|
1321
1327
|
themeKey: e.data?.theme,
|
|
1322
|
-
material:
|
|
1328
|
+
material: i,
|
|
1323
1329
|
category: "polyline"
|
|
1324
1330
|
});
|
|
1325
1331
|
}
|
|
1326
1332
|
}
|
|
1327
1333
|
}
|
|
1328
1334
|
function Wt({
|
|
1329
|
-
Cesium:
|
|
1335
|
+
Cesium: r,
|
|
1330
1336
|
options: e,
|
|
1331
1337
|
MaterialManager: t
|
|
1332
1338
|
}) {
|
|
1333
1339
|
if (e.data?.theme) {
|
|
1334
1340
|
if (e.data?.polygonType == "colorMode") {
|
|
1335
|
-
let
|
|
1341
|
+
let i = new r.Color.fromCssColorString(e?.options?.color || "#ffffff");
|
|
1336
1342
|
t.register({
|
|
1337
1343
|
themeKey: e.data?.theme,
|
|
1338
|
-
material:
|
|
1344
|
+
material: i,
|
|
1339
1345
|
category: "polygon"
|
|
1340
1346
|
});
|
|
1341
1347
|
} else if (e.data?.polygonType == "img") {
|
|
1342
|
-
let
|
|
1348
|
+
let i = new r.ImageMaterialProperty({
|
|
1343
1349
|
image: e.img
|
|
1344
1350
|
});
|
|
1345
1351
|
t.register({
|
|
1346
1352
|
themeKey: e.data?.theme,
|
|
1347
|
-
material:
|
|
1353
|
+
material: i,
|
|
1348
1354
|
category: "polygon"
|
|
1349
1355
|
});
|
|
1350
1356
|
} else if (e.data?.polygonType == "DynamicImgMaterial") {
|
|
1351
|
-
let
|
|
1357
|
+
let i = Ce(r, {
|
|
1352
1358
|
image: e.img,
|
|
1353
|
-
color: new
|
|
1359
|
+
color: new r.Color.fromCssColorString(e?.options?.color),
|
|
1354
1360
|
duration: 5e3,
|
|
1355
1361
|
freely: e.data?.freely || "vertical",
|
|
1356
1362
|
direction: "+",
|
|
@@ -1358,29 +1364,29 @@ function Wt({
|
|
|
1358
1364
|
});
|
|
1359
1365
|
t.register({
|
|
1360
1366
|
themeKey: e.data?.theme,
|
|
1361
|
-
material:
|
|
1367
|
+
material: i,
|
|
1362
1368
|
category: "polygon"
|
|
1363
1369
|
});
|
|
1364
1370
|
}
|
|
1365
1371
|
}
|
|
1366
1372
|
}
|
|
1367
1373
|
function Vt({
|
|
1368
|
-
Cesium:
|
|
1374
|
+
Cesium: r,
|
|
1369
1375
|
options: e,
|
|
1370
1376
|
MaterialManager: t
|
|
1371
1377
|
}) {
|
|
1372
1378
|
if (e.data?.theme) {
|
|
1373
1379
|
if (e.data?.wallType == "img") {
|
|
1374
|
-
let
|
|
1380
|
+
let i = new r.ImageMaterialProperty({
|
|
1375
1381
|
image: e.img
|
|
1376
1382
|
});
|
|
1377
1383
|
t.register({
|
|
1378
1384
|
themeKey: e.data?.theme,
|
|
1379
|
-
material:
|
|
1385
|
+
material: i,
|
|
1380
1386
|
category: "wall"
|
|
1381
1387
|
});
|
|
1382
1388
|
} else if (e.data?.wallType == "DynamicImgMaterial") {
|
|
1383
|
-
let
|
|
1389
|
+
let i = Ce(r, {
|
|
1384
1390
|
image: e.img,
|
|
1385
1391
|
// color: new Cesium.Color.fromCssColorString(options?.options?.color),
|
|
1386
1392
|
duration: 5e3,
|
|
@@ -1390,7 +1396,7 @@ function Vt({
|
|
|
1390
1396
|
});
|
|
1391
1397
|
t.register({
|
|
1392
1398
|
themeKey: e.data?.theme,
|
|
1393
|
-
material:
|
|
1399
|
+
material: i,
|
|
1394
1400
|
category: "wall"
|
|
1395
1401
|
});
|
|
1396
1402
|
}
|
|
@@ -1400,7 +1406,7 @@ class Ut extends Kt {
|
|
|
1400
1406
|
constructor(e) {
|
|
1401
1407
|
const {
|
|
1402
1408
|
labelId: t = "report-marker",
|
|
1403
|
-
cardId:
|
|
1409
|
+
cardId: i = "report-marker",
|
|
1404
1410
|
tagThemeConfig: o = [],
|
|
1405
1411
|
lineThemeConfig: a = [],
|
|
1406
1412
|
cardThemeConfig: n = [],
|
|
@@ -1417,7 +1423,7 @@ class Ut extends Kt {
|
|
|
1417
1423
|
}, f = {
|
|
1418
1424
|
...e,
|
|
1419
1425
|
labelId: t,
|
|
1420
|
-
cardId:
|
|
1426
|
+
cardId: i,
|
|
1421
1427
|
MaterialManager: s,
|
|
1422
1428
|
aggregatorOptions: u,
|
|
1423
1429
|
eventBus: new $()
|
|
@@ -1520,9 +1526,9 @@ class Ut extends Kt {
|
|
|
1520
1526
|
})
|
|
1521
1527
|
}
|
|
1522
1528
|
};
|
|
1523
|
-
Object.entries(t).forEach(([
|
|
1524
|
-
this.MaterialManager.has(
|
|
1525
|
-
themeKey:
|
|
1529
|
+
Object.entries(t).forEach(([i, o]) => {
|
|
1530
|
+
this.MaterialManager.has(i, "polyline") || this.MaterialManager.register({
|
|
1531
|
+
themeKey: i,
|
|
1526
1532
|
material: o.material,
|
|
1527
1533
|
category: "polyline"
|
|
1528
1534
|
});
|
|
@@ -1532,33 +1538,33 @@ class Ut extends Kt {
|
|
|
1532
1538
|
initThemes(e) {
|
|
1533
1539
|
if (!e) return;
|
|
1534
1540
|
e.tag && this.loadTabThemeConfig(e.tag), e.card && this.loadCardThemeConfig(e.card);
|
|
1535
|
-
const t = this.opt.Cesium,
|
|
1541
|
+
const t = this.opt.Cesium, i = this.instance.materialManager || this.opt.MaterialManager;
|
|
1536
1542
|
if (e.line?.length > 0)
|
|
1537
1543
|
for (let o of e.line)
|
|
1538
1544
|
Nt({
|
|
1539
1545
|
options: o,
|
|
1540
1546
|
Cesium: t,
|
|
1541
|
-
MaterialManager:
|
|
1547
|
+
MaterialManager: i
|
|
1542
1548
|
});
|
|
1543
1549
|
if (e.polygon?.length > 0)
|
|
1544
1550
|
for (let o of e.polygon)
|
|
1545
1551
|
Wt({
|
|
1546
1552
|
options: o,
|
|
1547
1553
|
Cesium: t,
|
|
1548
|
-
MaterialManager:
|
|
1554
|
+
MaterialManager: i
|
|
1549
1555
|
});
|
|
1550
1556
|
if (e.wall?.length > 0)
|
|
1551
1557
|
for (let o of e.wall)
|
|
1552
1558
|
Vt({
|
|
1553
1559
|
options: o,
|
|
1554
1560
|
Cesium: t,
|
|
1555
|
-
MaterialManager:
|
|
1561
|
+
MaterialManager: i
|
|
1556
1562
|
});
|
|
1557
1563
|
}
|
|
1558
1564
|
extractOnEvents(e) {
|
|
1559
1565
|
const t = {};
|
|
1560
|
-
for (const
|
|
1561
|
-
|
|
1566
|
+
for (const i in e)
|
|
1567
|
+
i.startsWith("on") && typeof e[i] == "function" && (t[i] = e[i]);
|
|
1562
1568
|
return t;
|
|
1563
1569
|
}
|
|
1564
1570
|
//注册标记主题
|
|
@@ -1579,13 +1585,13 @@ class Ut extends Kt {
|
|
|
1579
1585
|
}
|
|
1580
1586
|
loadCardThemeConfig(e) {
|
|
1581
1587
|
let t = this.instance.cardPool;
|
|
1582
|
-
e.forEach((
|
|
1583
|
-
t.registerTheme(
|
|
1588
|
+
e.forEach((i) => {
|
|
1589
|
+
t.registerTheme(i.data.theme, {
|
|
1584
1590
|
createElement(o, a) {
|
|
1585
1591
|
let n = a.data.data, l;
|
|
1586
|
-
return
|
|
1592
|
+
return i.comType == 1 ? l = w(x(q), {
|
|
1587
1593
|
data: n || {},
|
|
1588
|
-
imgSrc:
|
|
1594
|
+
imgSrc: i.data.img,
|
|
1589
1595
|
styleConfig: {
|
|
1590
1596
|
paddingTop: "50px",
|
|
1591
1597
|
paddingRight: "18px",
|
|
@@ -1603,10 +1609,10 @@ class Ut extends Kt {
|
|
|
1603
1609
|
left: "79px",
|
|
1604
1610
|
top: "0px"
|
|
1605
1611
|
},
|
|
1606
|
-
bgClass: [
|
|
1607
|
-
}) :
|
|
1612
|
+
bgClass: [i.data.theme]
|
|
1613
|
+
}) : i.comType == 3 && (l = w(x(q), {
|
|
1608
1614
|
data: n || {},
|
|
1609
|
-
imgSrc:
|
|
1615
|
+
imgSrc: i.data.img,
|
|
1610
1616
|
styleConfig: {
|
|
1611
1617
|
paddingTop: "55px",
|
|
1612
1618
|
paddingRight: "12px",
|
|
@@ -1624,14 +1630,14 @@ class Ut extends Kt {
|
|
|
1624
1630
|
left: "79px",
|
|
1625
1631
|
top: "0px"
|
|
1626
1632
|
},
|
|
1627
|
-
bgClass: [
|
|
1633
|
+
bgClass: [i.data.theme]
|
|
1628
1634
|
// titleConfig: themeOptions.options.titleConfig,
|
|
1629
1635
|
// pageInfoConfig: themeOptions.options.pageInfoConfig,
|
|
1630
|
-
})),
|
|
1636
|
+
})), G(l, o), () => G(null, o);
|
|
1631
1637
|
},
|
|
1632
1638
|
options: {
|
|
1633
|
-
offset:
|
|
1634
|
-
...
|
|
1639
|
+
offset: i.data.pixelOffset,
|
|
1640
|
+
...i.data || {}
|
|
1635
1641
|
}
|
|
1636
1642
|
});
|
|
1637
1643
|
});
|
|
@@ -1640,7 +1646,7 @@ class Ut extends Kt {
|
|
|
1640
1646
|
setTagTheme(e) {
|
|
1641
1647
|
let { labelPool: t } = this.instance;
|
|
1642
1648
|
t.registerTheme(e.data.theme, {
|
|
1643
|
-
createElement(
|
|
1649
|
+
createElement(i, o) {
|
|
1644
1650
|
let a = o.data?.billboard?.[0];
|
|
1645
1651
|
const n = Bt(a, ["position", "options"]);
|
|
1646
1652
|
let l, s = {
|
|
@@ -1669,7 +1675,7 @@ class Ut extends Kt {
|
|
|
1669
1675
|
"text-align": "center",
|
|
1670
1676
|
color: "white"
|
|
1671
1677
|
}
|
|
1672
|
-
}) : e.comType == 4 ? l = w(x(xe), s) : l = w(x(Z), s),
|
|
1678
|
+
}) : e.comType == 4 ? l = w(x(xe), s) : l = w(x(Z), s), G(l, i), () => G(null, i);
|
|
1673
1679
|
},
|
|
1674
1680
|
options: {
|
|
1675
1681
|
offset: e?.data?.pixelOffset || {}
|
|
@@ -1678,16 +1684,16 @@ class Ut extends Kt {
|
|
|
1678
1684
|
}
|
|
1679
1685
|
//标记监听事件
|
|
1680
1686
|
initTagListener(e, t) {
|
|
1681
|
-
let { viewer:
|
|
1682
|
-
e.addListener(
|
|
1687
|
+
let { viewer: i, tagListeningOptions: o } = t;
|
|
1688
|
+
e.addListener(D.Click, {
|
|
1683
1689
|
name: "marker:click",
|
|
1684
1690
|
fn: (a) => {
|
|
1685
|
-
t.runListener?.(I.标记左键点击, a.data), le(a.data?.onClick) && a.data?.onClick(a.data), a.data?.cameraPoint && a.data?.billboard[0]?.isFlyToCameraPoint &&
|
|
1691
|
+
t.runListener?.(I.标记左键点击, a.data), le(a.data?.onClick) && a.data?.onClick(a.data), a.data?.cameraPoint && a.data?.billboard[0]?.isFlyToCameraPoint && i?.camera?.flyTo({
|
|
1686
1692
|
duration: 1,
|
|
1687
1693
|
...a.data?.cameraPoint
|
|
1688
1694
|
});
|
|
1689
1695
|
}
|
|
1690
|
-
}), e.addListener(
|
|
1696
|
+
}), e.addListener(D.MouseEnter, {
|
|
1691
1697
|
name: "marker:mouseenter",
|
|
1692
1698
|
fn: (a) => {
|
|
1693
1699
|
let n = this.opt.Cesium, l = { x: 0, y: 0 };
|
|
@@ -1701,7 +1707,7 @@ class Ut extends Kt {
|
|
|
1701
1707
|
}
|
|
1702
1708
|
t.runListener?.(I.标记移入, a.data, l);
|
|
1703
1709
|
}
|
|
1704
|
-
}), e.addListener(
|
|
1710
|
+
}), e.addListener(D.MouseLeave, {
|
|
1705
1711
|
name: "marker:mouseleave",
|
|
1706
1712
|
fn: (a) => {
|
|
1707
1713
|
let n = this.opt.Cesium, l = { x: 0, y: 0 };
|
|
@@ -1721,11 +1727,11 @@ class Ut extends Kt {
|
|
|
1721
1727
|
}
|
|
1722
1728
|
// 兼容旧模式的材质注册
|
|
1723
1729
|
setMaterial(e) {
|
|
1724
|
-
const { type: t, material:
|
|
1730
|
+
const { type: t, material: i, materialKey: o, cover: a } = e, n = t ? t.toLowerCase() : "default";
|
|
1725
1731
|
this.MaterialManager.register({
|
|
1726
1732
|
themeKey: o,
|
|
1727
1733
|
// 兼容传入的是 { material: ... } 结构或者直接是材质对象
|
|
1728
|
-
material:
|
|
1734
|
+
material: i?.material || i,
|
|
1729
1735
|
force: a,
|
|
1730
1736
|
category: n
|
|
1731
1737
|
});
|
|
@@ -1735,16 +1741,16 @@ const Yt = /* @__PURE__ */ Me({
|
|
|
1735
1741
|
__name: "MarkerManage",
|
|
1736
1742
|
props: Fe,
|
|
1737
1743
|
emits: ["register", "load", "marker-event"],
|
|
1738
|
-
setup(
|
|
1739
|
-
const
|
|
1744
|
+
setup(r, { expose: e, emit: t }) {
|
|
1745
|
+
const i = r, o = t, a = _e("leitingMethods");
|
|
1740
1746
|
let n = null;
|
|
1741
1747
|
const l = (h = {}) => {
|
|
1742
1748
|
if (n) return n;
|
|
1743
1749
|
const c = {
|
|
1744
|
-
...
|
|
1750
|
+
...i,
|
|
1745
1751
|
...h,
|
|
1746
|
-
Cesium: h.Cesium ||
|
|
1747
|
-
viewer: h.viewer ||
|
|
1752
|
+
Cesium: h.Cesium || i.Cesium,
|
|
1753
|
+
viewer: h.viewer || i.viewer,
|
|
1748
1754
|
runListener: (g, u, ...f) => {
|
|
1749
1755
|
o("marker-event", { key: g, data: u, args: f });
|
|
1750
1756
|
}
|
|
@@ -1768,12 +1774,12 @@ const Yt = /* @__PURE__ */ Me({
|
|
|
1768
1774
|
function d() {
|
|
1769
1775
|
if (n) return n;
|
|
1770
1776
|
const h = we(a), c = h?.getCesium?.(), g = h?.getViewer?.();
|
|
1771
|
-
c && g ? l({ Cesium: c, viewer: g, methods: h }) :
|
|
1777
|
+
c && g ? l({ Cesium: c, viewer: g, methods: h }) : i.Cesium && i.viewer && l({ methods: h });
|
|
1772
1778
|
}
|
|
1773
1779
|
return Pe(() => {
|
|
1774
1780
|
d();
|
|
1775
1781
|
}), Y(
|
|
1776
|
-
() => [
|
|
1782
|
+
() => [i.Cesium, i.viewer],
|
|
1777
1783
|
([h, c]) => {
|
|
1778
1784
|
h && c && !n && d();
|
|
1779
1785
|
}
|
|
@@ -1786,13 +1792,13 @@ const Yt = /* @__PURE__ */ Me({
|
|
|
1786
1792
|
), Le(() => {
|
|
1787
1793
|
}), (h, c) => Te(h.$slots, "default");
|
|
1788
1794
|
}
|
|
1789
|
-
}),
|
|
1795
|
+
}), ti = be(Yt);
|
|
1790
1796
|
export {
|
|
1791
|
-
|
|
1797
|
+
ti as CxMarkerManage,
|
|
1792
1798
|
Ut as MarkerManage,
|
|
1793
1799
|
Kt as MarkerManagerCore,
|
|
1794
1800
|
I as ReportListenerKey,
|
|
1795
|
-
|
|
1801
|
+
ti as default,
|
|
1796
1802
|
Fe as markerManageProps
|
|
1797
1803
|
};
|
|
1798
1804
|
//# sourceMappingURL=marker-manage.js.map
|