leiting-bim 2.1.165 → 2.1.171
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/leiting-bim.umd.js +7 -7
- package/package.json +2 -1
- package/plugins/cesium-core/dist/cesium-core.mjs +714 -672
- package/plugins/cesium-core/dist/cesium-core.mjs.map +1 -1
- package/plugins/cesium-core/dist/cesium-core.umd.js +21 -21
- package/plugins/cesium-core/dist/cesium-core.umd.js.map +1 -1
- package/plugins/cesium-core/dist/components/BufferedHierarchicalAggregator.d.ts +3 -0
- package/plugins/cesium-core/dist/components/entity/EntityLayer.d.ts +7 -1
- package/plugins/cesium-vue/dist/components/marker-manage.js +320 -270
- package/plugins/cesium-vue/dist/components/marker-manage.js.map +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
import { h as x, markRaw as I, render as O, defineComponent as
|
|
1
|
+
import { w as Re } from "../create-DynflqE1.js";
|
|
2
|
+
import { h as x, markRaw as I, render as O, defineComponent as Ne, inject as ke, onMounted as We, watch as te, onUnmounted as Fe, renderSlot as $e, unref as ze } from "vue";
|
|
3
3
|
import { M as G, H as ie, a as V } from "../HtmlOverlayLabelPool-CbiNlyAM.js";
|
|
4
4
|
import { CxCardCarousel as re } from "./card-carousel.js";
|
|
5
5
|
import { CxMarkerBubbleLine as Ve, CxMarkerBubble as Ke } from "./marker-bubble.js";
|
|
6
6
|
import { CxMarkerDefault as ae } from "./marker-default.js";
|
|
7
7
|
import { CxMarkerHtml as Xe } from "./marker-html.js";
|
|
8
8
|
import { CxMarkerText as Ye } from "./marker-text.js";
|
|
9
|
-
import { i as q, b as ce, a as P, S as
|
|
9
|
+
import { i as q, b as ce, a as P, S as B, d as ne, c as j, e as de, f as Ue, g as ge, M as ue, h as K, j as qe, k as je, l as Ze, m as fe, n as me, o as Je, p as Qe, q as et, r as tt, s as it, t as pe, u as rt, v as at, w as nt, x as ot } from "../index-McKGafjp.js";
|
|
10
10
|
const st = {
|
|
11
11
|
id: { type: String, default: "marker" },
|
|
12
12
|
Cesium: { type: Object },
|
|
@@ -108,6 +108,15 @@ class lt {
|
|
|
108
108
|
this._addPointToGrid(i);
|
|
109
109
|
t && this._scheduleUpdate();
|
|
110
110
|
}
|
|
111
|
+
_getCurrentBillboard(e) {
|
|
112
|
+
return e?.__currentBillboard || e?.billboard?.[0];
|
|
113
|
+
}
|
|
114
|
+
_getBillboardTheme(e) {
|
|
115
|
+
return this._getCurrentBillboard(e)?.theme;
|
|
116
|
+
}
|
|
117
|
+
_shouldSkipAggregation(e) {
|
|
118
|
+
return this._getCurrentBillboard(e)?.skipAggregation;
|
|
119
|
+
}
|
|
111
120
|
_scheduleUpdate() {
|
|
112
121
|
this._updateTimer !== null && clearTimeout(this._updateTimer), this._updateTimer = window.setTimeout(() => {
|
|
113
122
|
this._update(), this._cameraDirty = !0, this._updateTimer = null;
|
|
@@ -120,23 +129,23 @@ class lt {
|
|
|
120
129
|
for (const n of this.levels) {
|
|
121
130
|
const o = n.level, s = this.gridLayers.get(o);
|
|
122
131
|
if (!s) continue;
|
|
123
|
-
const h = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat),
|
|
132
|
+
const h = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat), d = this.tilingScheme.positionToTileXY(
|
|
124
133
|
h,
|
|
125
134
|
o,
|
|
126
135
|
new this.Cesium.Cartesian2()
|
|
127
136
|
);
|
|
128
|
-
if (!
|
|
129
|
-
const l = `${
|
|
137
|
+
if (!d) continue;
|
|
138
|
+
const l = `${d.x}_${d.y}`, c = s.get(l);
|
|
130
139
|
if (c) {
|
|
131
|
-
const
|
|
132
|
-
if (
|
|
140
|
+
const g = c.allPoints.findIndex((f) => f.id === e.id);
|
|
141
|
+
if (g !== -1 && c.allPoints.splice(g, 1), this._shouldSkipAggregation(i.data)) {
|
|
133
142
|
const f = c.skipPoints.findIndex((u) => u.id === e.id);
|
|
134
143
|
f !== -1 && c.skipPoints.splice(f, 1);
|
|
135
144
|
} else {
|
|
136
|
-
const f = this.groupByTheme ? i.data
|
|
145
|
+
const f = this.groupByTheme ? this._getBillboardTheme(i.data) : this.clusterTheme, u = c.groups.get(f);
|
|
137
146
|
if (u) {
|
|
138
|
-
const
|
|
139
|
-
|
|
147
|
+
const v = u.findIndex((p) => p.id === e.id);
|
|
148
|
+
v !== -1 && u.splice(v, 1), u.length === 0 && c.groups.delete(f);
|
|
140
149
|
}
|
|
141
150
|
}
|
|
142
151
|
}
|
|
@@ -153,8 +162,8 @@ class lt {
|
|
|
153
162
|
for (const [n, o] of r.entries()) {
|
|
154
163
|
o.allPoints = o.allPoints.filter((s) => !t.has(s.id)), o.skipPoints = o.skipPoints.filter((s) => !t.has(s.id));
|
|
155
164
|
for (const [s, h] of o.groups.entries()) {
|
|
156
|
-
const
|
|
157
|
-
|
|
165
|
+
const d = h.filter((l) => !t.has(l.id));
|
|
166
|
+
d.length === 0 ? o.groups.delete(s) : o.groups.set(s, d);
|
|
158
167
|
}
|
|
159
168
|
o.allPoints.length === 0 && r.delete(n);
|
|
160
169
|
}
|
|
@@ -184,11 +193,11 @@ class lt {
|
|
|
184
193
|
allPoints: [],
|
|
185
194
|
groups: /* @__PURE__ */ new Map(),
|
|
186
195
|
skipPoints: []
|
|
187
|
-
}, r.set(s, h)), h.allPoints.push(e), e.data
|
|
196
|
+
}, r.set(s, h)), h.allPoints.push(e), this._shouldSkipAggregation(e.data))
|
|
188
197
|
h.skipPoints.push(e);
|
|
189
198
|
else {
|
|
190
|
-
const
|
|
191
|
-
h.groups.has(
|
|
199
|
+
const d = this.groupByTheme ? this._getBillboardTheme(e.data) : this.clusterTheme;
|
|
200
|
+
h.groups.has(d) || h.groups.set(d, []), h.groups.get(d).push(e);
|
|
192
201
|
}
|
|
193
202
|
}
|
|
194
203
|
}
|
|
@@ -248,7 +257,7 @@ class lt {
|
|
|
248
257
|
lon: t.lon,
|
|
249
258
|
lat: t.lat,
|
|
250
259
|
height: t.height,
|
|
251
|
-
theme: t.data
|
|
260
|
+
theme: this._getBillboardTheme(t.data) || this.pointTheme,
|
|
252
261
|
style: t.style
|
|
253
262
|
}), e++);
|
|
254
263
|
}
|
|
@@ -283,41 +292,41 @@ class lt {
|
|
|
283
292
|
return t;
|
|
284
293
|
}
|
|
285
294
|
_processTiles(e, t) {
|
|
286
|
-
const i = /* @__PURE__ */ new Set(), r = !this._isTerrainEnabled(), n = this.viewer.scene, o = n && n.globe, s = o && o.ellipsoid, h = s && n.camera.computeViewRectangle(s),
|
|
295
|
+
const i = /* @__PURE__ */ new Set(), r = !this._isTerrainEnabled(), n = this.viewer.scene, o = n && n.globe, s = o && o.ellipsoid, h = s && n.camera.computeViewRectangle(s), d = (l, c, g) => {
|
|
287
296
|
if (!r || !h) return !0;
|
|
288
|
-
const f = this.tilingScheme.tileXYToRectangle(l, c,
|
|
297
|
+
const f = this.tilingScheme.tileXYToRectangle(l, c, g);
|
|
289
298
|
return !(!f || f.east <= h.west || f.west >= h.east || f.north <= h.south || f.south >= h.north);
|
|
290
299
|
};
|
|
291
300
|
for (const l of e) {
|
|
292
|
-
const c = l.rectangle,
|
|
293
|
-
if (!c || typeof
|
|
294
|
-
const f = this._getGridRefLevel(
|
|
301
|
+
const c = l.rectangle, g = l._level ?? l.level;
|
|
302
|
+
if (!c || typeof g != "number") continue;
|
|
303
|
+
const f = this._getGridRefLevel(g), u = this._resolveLevelIndex(f);
|
|
295
304
|
if (u === void 0) continue;
|
|
296
|
-
const
|
|
297
|
-
if (typeof
|
|
298
|
-
const L =
|
|
305
|
+
const v = this.levels[u].level, p = l._x ?? l.x, C = l._y ?? l.y;
|
|
306
|
+
if (typeof p == "number" && typeof C == "number") {
|
|
307
|
+
const L = g - v;
|
|
299
308
|
if (L >= 0) {
|
|
300
|
-
const T = 1 << L, M = Math.floor(
|
|
309
|
+
const T = 1 << L, M = Math.floor(p / T), D = Math.floor(C / T), A = `${v}_${M}_${D}`;
|
|
301
310
|
if (i.has(A)) continue;
|
|
302
|
-
i.add(A), t(u, M, D,
|
|
311
|
+
i.add(A), t(u, M, D, g);
|
|
303
312
|
} else {
|
|
304
|
-
const M = 1 << Math.min(-L, this.maxRefineLevels), D =
|
|
313
|
+
const M = 1 << Math.min(-L, this.maxRefineLevels), D = p * M, A = C * M;
|
|
305
314
|
for (let W = 0; W < M; W++)
|
|
306
315
|
for (let F = 0; F < M; F++) {
|
|
307
316
|
const $ = D + W, z = A + F;
|
|
308
|
-
if (!
|
|
309
|
-
const ee = `${
|
|
310
|
-
i.has(ee) || (i.add(ee), t(u, $, z,
|
|
317
|
+
if (!d($, z, v)) continue;
|
|
318
|
+
const ee = `${v}_${$}_${z}`;
|
|
319
|
+
i.has(ee) || (i.add(ee), t(u, $, z, g));
|
|
311
320
|
}
|
|
312
321
|
}
|
|
313
322
|
continue;
|
|
314
323
|
}
|
|
315
|
-
const
|
|
324
|
+
const m = this.levels[u].size, S = this.Cesium.Math.toDegrees(c.west), N = this.Cesium.Math.toDegrees(c.east), E = this.Cesium.Math.toDegrees(c.south), k = this.Cesium.Math.toDegrees(c.north), Oe = Math.floor((S - -180) / m), Ge = Math.floor((N - -180) / m), He = Math.floor((E - -90) / m), Be = Math.floor((k - -90) / m);
|
|
316
325
|
for (let L = Oe; L <= Ge; L++)
|
|
317
|
-
for (let T = He; T <=
|
|
318
|
-
if (!
|
|
319
|
-
const M = `${
|
|
320
|
-
i.has(M) || (i.add(M), t(u, L, T,
|
|
326
|
+
for (let T = He; T <= Be; T++) {
|
|
327
|
+
if (!d(L, T, v)) continue;
|
|
328
|
+
const M = `${v}_${L}_${T}`;
|
|
329
|
+
i.has(M) || (i.add(M), t(u, L, T, g));
|
|
321
330
|
}
|
|
322
331
|
}
|
|
323
332
|
}
|
|
@@ -330,23 +339,23 @@ class lt {
|
|
|
330
339
|
_getCellContext(e, t, i, r) {
|
|
331
340
|
const o = this.levels[e].level, s = this.gridLayers.get(o);
|
|
332
341
|
if (!s) return null;
|
|
333
|
-
const h = `${t}_${i}`,
|
|
334
|
-
if (!
|
|
335
|
-
const l = this.tilingScheme.tileXYToRectangle(t, i, o), c = this.Cesium.Math.toDegrees(l.west),
|
|
342
|
+
const h = `${t}_${i}`, d = s.get(h);
|
|
343
|
+
if (!d) return null;
|
|
344
|
+
const l = this.tilingScheme.tileXYToRectangle(t, i, o), c = this.Cesium.Math.toDegrees(l.west), g = this.Cesium.Math.toDegrees(l.south), f = this.Cesium.Math.toDegrees(l.east), u = this.Cesium.Math.toDegrees(l.north), v = (c + f) / 2, p = (g + u) / 2;
|
|
336
345
|
return {
|
|
337
346
|
levelIdx: e,
|
|
338
347
|
tileLevel: o,
|
|
339
348
|
lonIdx: t,
|
|
340
349
|
latIdx: i,
|
|
341
350
|
key: h,
|
|
342
|
-
cell:
|
|
351
|
+
cell: d,
|
|
343
352
|
rect: l,
|
|
344
353
|
west: c,
|
|
345
|
-
south:
|
|
354
|
+
south: g,
|
|
346
355
|
east: f,
|
|
347
356
|
north: u,
|
|
348
|
-
centerLon:
|
|
349
|
-
centerLat:
|
|
357
|
+
centerLon: v,
|
|
358
|
+
centerLat: p,
|
|
350
359
|
viewTileLevel: r
|
|
351
360
|
};
|
|
352
361
|
}
|
|
@@ -360,7 +369,7 @@ class lt {
|
|
|
360
369
|
lon: o.lon,
|
|
361
370
|
lat: o.lat,
|
|
362
371
|
height: o.height,
|
|
363
|
-
theme: o.data
|
|
372
|
+
theme: this._getBillboardTheme(o.data) || this.pointTheme,
|
|
364
373
|
style: o.style
|
|
365
374
|
}), t++);
|
|
366
375
|
}
|
|
@@ -373,46 +382,46 @@ class lt {
|
|
|
373
382
|
latIdx: o,
|
|
374
383
|
cell: s,
|
|
375
384
|
centerLon: h,
|
|
376
|
-
centerLat:
|
|
385
|
+
centerLat: d,
|
|
377
386
|
viewTileLevel: l
|
|
378
387
|
} = e, c = l;
|
|
379
|
-
for (const [
|
|
380
|
-
const u = f.filter((
|
|
388
|
+
for (const [g, f] of s.groups) {
|
|
389
|
+
const u = f.filter((m) => m.data?.show !== !1);
|
|
381
390
|
if (u.length === 0) continue;
|
|
382
|
-
let
|
|
383
|
-
if (this.centralPointMode == "firstPoint" && (
|
|
384
|
-
for (const
|
|
391
|
+
let v = h, p = d, C = u[0]?.height || 0;
|
|
392
|
+
if (this.centralPointMode == "firstPoint" && (v = u[0]?.lon || 0, p = u[0]?.lat || 0, C = u[0]?.height || 0), r === this.levels.length - 1 || u.length < t)
|
|
393
|
+
for (const m of u) {
|
|
385
394
|
if (i >= this.displayLimit) break;
|
|
386
|
-
this._isVisibleAtLevel(
|
|
387
|
-
id: `point-${
|
|
388
|
-
lon:
|
|
389
|
-
lat:
|
|
390
|
-
height:
|
|
391
|
-
theme:
|
|
392
|
-
style:
|
|
395
|
+
this._isVisibleAtLevel(m, c) && (this.labelPool.add(m.data, {
|
|
396
|
+
id: `point-${m.id}`,
|
|
397
|
+
lon: m.lon,
|
|
398
|
+
lat: m.lat,
|
|
399
|
+
height: m.height,
|
|
400
|
+
theme: this._getBillboardTheme(m.data) || this.pointTheme,
|
|
401
|
+
style: m.style
|
|
393
402
|
}), i++);
|
|
394
403
|
}
|
|
395
404
|
else {
|
|
396
405
|
if (i >= this.displayLimit)
|
|
397
406
|
return i;
|
|
398
|
-
const
|
|
399
|
-
if (!
|
|
400
|
-
const
|
|
407
|
+
const m = c == null ? u : u.filter((k) => this._isVisibleAtLevel(k, c));
|
|
408
|
+
if (!m.length) return i;
|
|
409
|
+
const N = this._getBillboardTheme(m[0]?.data) || this.clusterTheme, E = this.groupByTheme ? `cluster-${r}-${n}-${o}-${g}` : `cluster-${r}-${n}-${o}`;
|
|
401
410
|
this.labelPool.add(
|
|
402
411
|
{
|
|
403
412
|
id: E,
|
|
404
|
-
billboard:
|
|
405
|
-
count:
|
|
413
|
+
billboard: m[0]?.data?.billboard || [],
|
|
414
|
+
count: m.length,
|
|
406
415
|
gridKey: `${n}_${o}`,
|
|
407
|
-
points:
|
|
408
|
-
aggregationGroup:
|
|
416
|
+
points: m,
|
|
417
|
+
aggregationGroup: g
|
|
409
418
|
},
|
|
410
419
|
{
|
|
411
420
|
id: E,
|
|
412
|
-
lon:
|
|
413
|
-
lat:
|
|
414
|
-
height:
|
|
415
|
-
theme:
|
|
421
|
+
lon: v,
|
|
422
|
+
lat: p,
|
|
423
|
+
height: C,
|
|
424
|
+
theme: N
|
|
416
425
|
}
|
|
417
426
|
), i++;
|
|
418
427
|
}
|
|
@@ -421,13 +430,13 @@ class lt {
|
|
|
421
430
|
}
|
|
422
431
|
_debugDrawCell(e) {
|
|
423
432
|
if (!this.debugCurrentGrids) return;
|
|
424
|
-
const { levelIdx: t, west: i, south: r, east: n, north: o, lonIdx: s, latIdx: h } = e,
|
|
433
|
+
const { levelIdx: t, west: i, south: r, east: n, north: o, lonIdx: s, latIdx: h } = e, d = this.levels[t].level;
|
|
425
434
|
this._drawDebugGrid(
|
|
426
435
|
i,
|
|
427
436
|
r,
|
|
428
437
|
n,
|
|
429
438
|
o,
|
|
430
|
-
`L:${
|
|
439
|
+
`L:${d} X:${s} Y:${h}`
|
|
431
440
|
);
|
|
432
441
|
}
|
|
433
442
|
refresh() {
|
|
@@ -513,18 +522,18 @@ function ye(a, e) {
|
|
|
513
522
|
r[t] = e(a[t], t, a);
|
|
514
523
|
return r;
|
|
515
524
|
}
|
|
516
|
-
var oe =
|
|
517
|
-
function
|
|
525
|
+
var oe = B ? B.prototype : void 0, se = oe ? oe.toString : void 0;
|
|
526
|
+
function be(a) {
|
|
518
527
|
if (typeof a == "string")
|
|
519
528
|
return a;
|
|
520
529
|
if (P(a))
|
|
521
|
-
return ye(a,
|
|
530
|
+
return ye(a, be) + "";
|
|
522
531
|
if (Z(a))
|
|
523
532
|
return se ? se.call(a) : "";
|
|
524
533
|
var e = a + "";
|
|
525
534
|
return e == "0" && 1 / a == -1 / 0 ? "-0" : e;
|
|
526
535
|
}
|
|
527
|
-
function
|
|
536
|
+
function ve(a) {
|
|
528
537
|
return a;
|
|
529
538
|
}
|
|
530
539
|
function ct(a, e, t) {
|
|
@@ -540,13 +549,13 @@ function ct(a, e, t) {
|
|
|
540
549
|
}
|
|
541
550
|
return a.apply(e, t);
|
|
542
551
|
}
|
|
543
|
-
var
|
|
552
|
+
var dt = 800, gt = 16, ut = Date.now;
|
|
544
553
|
function ft(a) {
|
|
545
554
|
var e = 0, t = 0;
|
|
546
555
|
return function() {
|
|
547
|
-
var i = ut(), r =
|
|
556
|
+
var i = ut(), r = gt - (i - t);
|
|
548
557
|
if (t = i, r > 0) {
|
|
549
|
-
if (++e >=
|
|
558
|
+
if (++e >= dt)
|
|
550
559
|
return arguments[0];
|
|
551
560
|
} else
|
|
552
561
|
e = 0;
|
|
@@ -565,8 +574,8 @@ var pt = ne ? function(a, e) {
|
|
|
565
574
|
value: mt(e),
|
|
566
575
|
writable: !0
|
|
567
576
|
});
|
|
568
|
-
} :
|
|
569
|
-
function
|
|
577
|
+
} : ve, Ce = ft(pt), le = Math.max;
|
|
578
|
+
function _e(a, e, t) {
|
|
570
579
|
return e = le(e === void 0 ? a.length - 1 : e, 0), function() {
|
|
571
580
|
for (var i = arguments, r = -1, n = le(i.length - e, 0), o = Array(n); ++r < n; )
|
|
572
581
|
o[r] = i[e + r];
|
|
@@ -577,30 +586,30 @@ function Me(a, e, t) {
|
|
|
577
586
|
};
|
|
578
587
|
}
|
|
579
588
|
function yt(a, e) {
|
|
580
|
-
return Ce(
|
|
589
|
+
return Ce(_e(a, e, ve), a + "");
|
|
581
590
|
}
|
|
582
|
-
function
|
|
591
|
+
function bt(a, e, t) {
|
|
583
592
|
if (!j(t))
|
|
584
593
|
return !1;
|
|
585
594
|
var i = typeof e;
|
|
586
|
-
return (i == "number" ?
|
|
595
|
+
return (i == "number" ? de(t) && Ue(e, t.length) : i == "string" && e in t) ? ge(t[e], a) : !1;
|
|
587
596
|
}
|
|
588
|
-
function
|
|
597
|
+
function vt(a) {
|
|
589
598
|
return yt(function(e, t) {
|
|
590
599
|
var i = -1, r = t.length, n = r > 1 ? t[r - 1] : void 0, o = r > 2 ? t[2] : void 0;
|
|
591
|
-
for (n = a.length > 3 && typeof n == "function" ? (r--, n) : void 0, o &&
|
|
600
|
+
for (n = a.length > 3 && typeof n == "function" ? (r--, n) : void 0, o && bt(t[0], t[1], o) && (n = r < 3 ? void 0 : n, r = 1), e = Object(e); ++i < r; ) {
|
|
592
601
|
var s = t[i];
|
|
593
602
|
s && a(e, s, i, n);
|
|
594
603
|
}
|
|
595
604
|
return e;
|
|
596
605
|
});
|
|
597
606
|
}
|
|
598
|
-
var Ct = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
599
|
-
function
|
|
607
|
+
var Ct = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, _t = /^\w*$/;
|
|
608
|
+
function Mt(a, e) {
|
|
600
609
|
if (P(a))
|
|
601
610
|
return !1;
|
|
602
611
|
var t = typeof a;
|
|
603
|
-
return t == "number" || t == "symbol" || t == "boolean" || a == null || Z(a) ? !0 :
|
|
612
|
+
return t == "number" || t == "symbol" || t == "boolean" || a == null || Z(a) ? !0 : _t.test(a) || !Ct.test(a) || e != null && a in Object(e);
|
|
604
613
|
}
|
|
605
614
|
var Lt = "Expected a function";
|
|
606
615
|
function J(a, e) {
|
|
@@ -630,10 +639,10 @@ var wt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=
|
|
|
630
639
|
}), e;
|
|
631
640
|
});
|
|
632
641
|
function St(a) {
|
|
633
|
-
return a == null ? "" :
|
|
642
|
+
return a == null ? "" : be(a);
|
|
634
643
|
}
|
|
635
644
|
function Q(a, e) {
|
|
636
|
-
return P(a) ? a :
|
|
645
|
+
return P(a) ? a : Mt(a, e) ? [a] : It(St(a));
|
|
637
646
|
}
|
|
638
647
|
function X(a) {
|
|
639
648
|
if (typeof a == "string" || Z(a))
|
|
@@ -647,7 +656,7 @@ function Et(a, e) {
|
|
|
647
656
|
a = a[X(e[t++])];
|
|
648
657
|
return t && t == i ? a : void 0;
|
|
649
658
|
}
|
|
650
|
-
var he =
|
|
659
|
+
var he = B ? B.isConcatSpreadable : void 0;
|
|
651
660
|
function Dt(a) {
|
|
652
661
|
return P(a) || K(a) || !!(he && a && a[he]);
|
|
653
662
|
}
|
|
@@ -664,17 +673,17 @@ function Ot(a) {
|
|
|
664
673
|
return e ? At(a) : [];
|
|
665
674
|
}
|
|
666
675
|
function Gt(a) {
|
|
667
|
-
return Ce(
|
|
676
|
+
return Ce(_e(a, void 0, Ot), a + "");
|
|
668
677
|
}
|
|
669
|
-
var Ht = "[object Object]",
|
|
678
|
+
var Ht = "[object Object]", Bt = Function.prototype, Rt = Object.prototype, Me = Bt.toString, Nt = Rt.hasOwnProperty, kt = Me.call(Object);
|
|
670
679
|
function Le(a) {
|
|
671
680
|
if (!q(a) || ce(a) != Ht)
|
|
672
681
|
return !1;
|
|
673
682
|
var e = je(a);
|
|
674
683
|
if (e === null)
|
|
675
684
|
return !0;
|
|
676
|
-
var t =
|
|
677
|
-
return typeof t == "function" && t instanceof t &&
|
|
685
|
+
var t = Nt.call(e, "constructor") && e.constructor;
|
|
686
|
+
return typeof t == "function" && t instanceof t && Me.call(t) == kt;
|
|
678
687
|
}
|
|
679
688
|
function Wt(a, e, t) {
|
|
680
689
|
var i = -1, r = a.length;
|
|
@@ -695,10 +704,10 @@ function Ft(a) {
|
|
|
695
704
|
}
|
|
696
705
|
var $t = Ft();
|
|
697
706
|
function Y(a, e, t) {
|
|
698
|
-
(t !== void 0 && !
|
|
707
|
+
(t !== void 0 && !ge(a[e], t) || t === void 0 && !(e in a)) && Ze(a, e, t);
|
|
699
708
|
}
|
|
700
709
|
function zt(a) {
|
|
701
|
-
return q(a) &&
|
|
710
|
+
return q(a) && de(a);
|
|
702
711
|
}
|
|
703
712
|
function U(a, e) {
|
|
704
713
|
if (!(e === "constructor" && typeof a[e] == "function") && e != "__proto__")
|
|
@@ -708,15 +717,15 @@ function Vt(a) {
|
|
|
708
717
|
return fe(a, me(a));
|
|
709
718
|
}
|
|
710
719
|
function Kt(a, e, t, i, r, n, o) {
|
|
711
|
-
var s = U(a, t), h = U(e, t),
|
|
712
|
-
if (
|
|
713
|
-
Y(a, t,
|
|
720
|
+
var s = U(a, t), h = U(e, t), d = o.get(h);
|
|
721
|
+
if (d) {
|
|
722
|
+
Y(a, t, d);
|
|
714
723
|
return;
|
|
715
724
|
}
|
|
716
725
|
var l = n ? n(s, h, t + "", a, e, o) : void 0, c = l === void 0;
|
|
717
726
|
if (c) {
|
|
718
|
-
var
|
|
719
|
-
l = h,
|
|
727
|
+
var g = P(h), f = !g && Je(h), u = !g && !f && Qe(h);
|
|
728
|
+
l = h, g || f || u ? P(s) ? l = s : zt(s) ? l = et(s) : f ? (c = !1, l = tt(h, !0)) : u ? (c = !1, l = it(h, !0)) : l = [] : Le(h) || K(h) ? (l = s, K(s) ? l = Vt(s) : (!j(s) || pe(s)) && (l = rt(h))) : c = !1;
|
|
720
729
|
}
|
|
721
730
|
c && (o.set(h, l), r(l, h, i, n, o), o.delete(h)), Y(a, t, l);
|
|
722
731
|
}
|
|
@@ -737,7 +746,7 @@ function Xt(a) {
|
|
|
737
746
|
function Yt(a, e) {
|
|
738
747
|
return e.length < 2 ? a : Et(a, Wt(e, 0, -1));
|
|
739
748
|
}
|
|
740
|
-
var Ut =
|
|
749
|
+
var Ut = vt(function(a, e, t) {
|
|
741
750
|
Te(a, e, t);
|
|
742
751
|
}), qt = Object.prototype, jt = qt.hasOwnProperty;
|
|
743
752
|
function Zt(a, e) {
|
|
@@ -894,8 +903,8 @@ function Pe(a, e) {
|
|
|
894
903
|
}), new i(e);
|
|
895
904
|
}
|
|
896
905
|
function ai(a, e) {
|
|
897
|
-
const t = a.Color, i = Object.defineProperties, r = a.Event, n = a.createPropertyDescriptor, o = a.Property, s = (c,
|
|
898
|
-
let
|
|
906
|
+
const t = a.Color, i = Object.defineProperties, r = a.Event, n = a.createPropertyDescriptor, o = a.Property, s = (c, g) => c === void 0 ? g : c, h = {};
|
|
907
|
+
let d = e.materialType || "PolylineFlow" + Date.now() + Math.floor(Math.random() * 1e3);
|
|
899
908
|
function l(c) {
|
|
900
909
|
c = s(c, h), this._definitionChanged = new r(), 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 = s(c.duration, 45);
|
|
901
910
|
}
|
|
@@ -911,22 +920,22 @@ function ai(a, e) {
|
|
|
911
920
|
}
|
|
912
921
|
}
|
|
913
922
|
}), l.prototype.getType = function(c) {
|
|
914
|
-
return
|
|
915
|
-
}, l.prototype.getValue = function(c,
|
|
916
|
-
return
|
|
923
|
+
return d;
|
|
924
|
+
}, l.prototype.getValue = function(c, g) {
|
|
925
|
+
return g || (g = {}), g.color = o.getValueOrClonedDefault(
|
|
917
926
|
this._color,
|
|
918
927
|
c,
|
|
919
928
|
a.Color.WHITE,
|
|
920
|
-
|
|
921
|
-
),
|
|
929
|
+
g.color
|
|
930
|
+
), g.duration = this._duration, g;
|
|
922
931
|
}, l.prototype.equals = function(c) {
|
|
923
932
|
return this === c || c instanceof l && o.equals(this._color, c._color);
|
|
924
933
|
}, i(l.prototype, {
|
|
925
934
|
color: n("color"),
|
|
926
935
|
duration: n("duration")
|
|
927
|
-
}), a.PolylineFlowMaterialProperty = l, a.Material._materialCache.addMaterial(
|
|
936
|
+
}), a.PolylineFlowMaterialProperty = l, a.Material._materialCache.addMaterial(d, {
|
|
928
937
|
fabric: {
|
|
929
|
-
type:
|
|
938
|
+
type: d,
|
|
930
939
|
uniforms: {
|
|
931
940
|
color: new t(1, 1, 1, 1),
|
|
932
941
|
duration: 45
|
|
@@ -1052,12 +1061,21 @@ class ni {
|
|
|
1052
1061
|
id;
|
|
1053
1062
|
entities = [];
|
|
1054
1063
|
primitives = [];
|
|
1064
|
+
billboardPointIds = [];
|
|
1055
1065
|
dataItem = {};
|
|
1056
1066
|
aggregator;
|
|
1057
1067
|
cardPool;
|
|
1058
1068
|
constructor(e) {
|
|
1059
|
-
const {
|
|
1060
|
-
|
|
1069
|
+
const {
|
|
1070
|
+
id: t,
|
|
1071
|
+
entities: i = [],
|
|
1072
|
+
primitives: r = [],
|
|
1073
|
+
billboardPointIds: n = [],
|
|
1074
|
+
dataItem: o = {},
|
|
1075
|
+
aggregator: s,
|
|
1076
|
+
cardPool: h
|
|
1077
|
+
} = e;
|
|
1078
|
+
this.id = t, this.entities = i, this.primitives = r, this.billboardPointIds = n, this.dataItem = o, this.aggregator = s, this.cardPool = h;
|
|
1061
1079
|
}
|
|
1062
1080
|
// 改造 setVisible 方法,支持 Entity 和 Primitive 的可见性控制
|
|
1063
1081
|
setVisible(e) {
|
|
@@ -1065,14 +1083,20 @@ class ni {
|
|
|
1065
1083
|
t && (t.show = e);
|
|
1066
1084
|
}), this.primitives.forEach((t) => {
|
|
1067
1085
|
t && (t.show = e);
|
|
1068
|
-
}), this.aggregator && Array.isArray(this.dataItem.billboard) && this.dataItem.billboard.map((i, r) =>
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1086
|
+
}), this.aggregator && Array.isArray(this.dataItem.billboard) && this.billboardPointIds.length && this.dataItem.billboard.map((i, r) => {
|
|
1087
|
+
const n = this.billboardPointIds[r];
|
|
1088
|
+
return n ? {
|
|
1089
|
+
id: n,
|
|
1090
|
+
data: {
|
|
1091
|
+
...this.dataItem,
|
|
1092
|
+
show: e && (i.show ?? i.data?.show ?? !0),
|
|
1093
|
+
__billboardRuntimeId: n,
|
|
1094
|
+
__billboardRuntimeIndex: r,
|
|
1095
|
+
__currentBillboard: i
|
|
1096
|
+
}
|
|
1097
|
+
} : null;
|
|
1098
|
+
}).forEach((i) => {
|
|
1099
|
+
i && this.aggregator?.updatePoint(i);
|
|
1076
1100
|
}), this.cardPool && this.dataItem.card && (e ? this.cardPool.showByIds([this.dataItem.id]) : this.cardPool.hideByIds([this.dataItem.id]));
|
|
1077
1101
|
}
|
|
1078
1102
|
// 改造 removeAll 方法,支持 Entity 和 Primitive 的移除
|
|
@@ -1081,7 +1105,10 @@ class ni {
|
|
|
1081
1105
|
i && e.entities.remove(i);
|
|
1082
1106
|
}), this.entities = [], this.primitives.forEach((i) => {
|
|
1083
1107
|
i && e.scene.primitives.remove(i);
|
|
1084
|
-
}), this.primitives = [], t && this.aggregator &&
|
|
1108
|
+
}), this.primitives = [], t && this.aggregator && this.billboardPointIds.length && this.aggregator.removePointsById(this.billboardPointIds), t && this.cardPool && this.dataItem.card && this.cardPool.removeByIds([this.dataItem.id]), {
|
|
1109
|
+
groupId: this.dataItem.id,
|
|
1110
|
+
billboardPointIds: [...this.billboardPointIds]
|
|
1111
|
+
};
|
|
1085
1112
|
}
|
|
1086
1113
|
}
|
|
1087
1114
|
class oi {
|
|
@@ -1095,7 +1122,7 @@ class oi {
|
|
|
1095
1122
|
constructor(e, t, i, r, n, o) {
|
|
1096
1123
|
this.id = e, this.Cesium = t, this.viewer = i, this.materialManager = r, this.aggregator = n, this.cardPool = o, this.aggregator.labelPool.eventBus.addListener(G.Click, {
|
|
1097
1124
|
name: "BufferedHierarchicalAggregator_maker_click",
|
|
1098
|
-
fn: (h,
|
|
1125
|
+
fn: (h, d) => {
|
|
1099
1126
|
this.cardPool.showByIds([h.data.id]);
|
|
1100
1127
|
}
|
|
1101
1128
|
}), new t.ScreenSpaceEventHandler(i.scene.canvas).setInputAction(() => {
|
|
@@ -1103,6 +1130,9 @@ class oi {
|
|
|
1103
1130
|
}, t.ScreenSpaceEventType.LEFT_CLICK);
|
|
1104
1131
|
}
|
|
1105
1132
|
/** ====== 下面是抽出的创建函数 ====== */
|
|
1133
|
+
getBillboardPointId(e, t) {
|
|
1134
|
+
return `${e}__billboard__${t}`;
|
|
1135
|
+
}
|
|
1106
1136
|
createPolyline(e, t) {
|
|
1107
1137
|
if (!e.positions || e.positions.length < 1) return null;
|
|
1108
1138
|
const i = this.materialManager.get({
|
|
@@ -1127,21 +1157,21 @@ class oi {
|
|
|
1127
1157
|
themeKey: e.theme,
|
|
1128
1158
|
category: "wall",
|
|
1129
1159
|
options: e
|
|
1130
|
-
}), r = (y,
|
|
1160
|
+
}), r = (y, m = 0) => {
|
|
1131
1161
|
const S = Number(y);
|
|
1132
|
-
return Number.isFinite(S) ? S :
|
|
1133
|
-
}, n = e.positions.map((y) => r(y?.[2], 0)), o = r(e.minHeight, 0), s = r(e.maxHeight, 0), h = (y) => Array.isArray(y) && y.length === e.positions.length && y.every((
|
|
1162
|
+
return Number.isFinite(S) ? S : m;
|
|
1163
|
+
}, n = e.positions.map((y) => r(y?.[2], 0)), o = r(e.minHeight, 0), s = r(e.maxHeight, 0), h = (y) => Array.isArray(y) && y.length === e.positions.length && y.every((m) => Math.abs(r(m, 0)) < 1e-6), d = n.some((y) => Math.abs(y) > 1e-6), g = (Array.isArray(e.minimumHeights) && e.minimumHeights.length === e.positions.length && !(h(e.minimumHeights) && d) ? e.minimumHeights.map((y) => r(y, 0)) : n).map((y) => y - o), v = (Array.isArray(e.maximumHeights) && e.maximumHeights.length === e.positions.length && !(h(e.maximumHeights) && d) ? e.maximumHeights.map((y) => r(y, 0)) : n).map((y) => y + s), p = e.positions.map(
|
|
1134
1164
|
(y) => this.Cesium.Cartesian3.fromDegrees(y[0], y[1], y[2] || 0)
|
|
1135
1165
|
);
|
|
1136
|
-
let
|
|
1166
|
+
let C = {
|
|
1137
1167
|
...e
|
|
1138
1168
|
};
|
|
1139
|
-
return i && (
|
|
1169
|
+
return i && (C.material = i), this.viewer.entities.add({
|
|
1140
1170
|
wall: {
|
|
1141
|
-
...
|
|
1142
|
-
positions:
|
|
1143
|
-
minimumHeights:
|
|
1144
|
-
maximumHeights:
|
|
1171
|
+
...C,
|
|
1172
|
+
positions: p,
|
|
1173
|
+
minimumHeights: g,
|
|
1174
|
+
maximumHeights: v
|
|
1145
1175
|
},
|
|
1146
1176
|
show: (e.show ?? !0) && t
|
|
1147
1177
|
});
|
|
@@ -1152,8 +1182,8 @@ class oi {
|
|
|
1152
1182
|
themeKey: e.theme,
|
|
1153
1183
|
category: "polygon",
|
|
1154
1184
|
options: e
|
|
1155
|
-
}), r = Array.isArray(e.hierarchy[0]) ? e.hierarchy.flat() : e.hierarchy, n = this.Cesium.Cartesian3.fromDegreesArrayHeights(r), o = e.holes?.map((
|
|
1156
|
-
let l = Array.isArray(
|
|
1185
|
+
}), r = Array.isArray(e.hierarchy[0]) ? e.hierarchy.flat() : e.hierarchy, n = this.Cesium.Cartesian3.fromDegreesArrayHeights(r), o = e.holes?.map((d) => {
|
|
1186
|
+
let l = Array.isArray(d[0]) ? e.hierarchy.flat() : e.hole;
|
|
1157
1187
|
return this.Cesium.Cartesian3.fromDegreesArrayHeights(l.flat());
|
|
1158
1188
|
}) || [], s = new this.Cesium.PolygonHierarchy(n, o);
|
|
1159
1189
|
let h = {
|
|
@@ -1169,15 +1199,20 @@ class oi {
|
|
|
1169
1199
|
});
|
|
1170
1200
|
}
|
|
1171
1201
|
createBillboardPoints(e) {
|
|
1172
|
-
return !e.billboard?.length || !this.aggregator ? [] : e.billboard.map((t) => {
|
|
1173
|
-
const [
|
|
1202
|
+
return !e.billboard?.length || !this.aggregator ? [] : e.billboard.map((t, i) => {
|
|
1203
|
+
const [r, n, o = 0] = t.position || [0, 0, 0], s = this.getBillboardPointId(e.id, i);
|
|
1174
1204
|
return {
|
|
1175
|
-
id:
|
|
1176
|
-
lon:
|
|
1177
|
-
lat:
|
|
1178
|
-
height:
|
|
1205
|
+
id: s,
|
|
1206
|
+
lon: r,
|
|
1207
|
+
lat: n,
|
|
1208
|
+
height: o,
|
|
1179
1209
|
name: t.options?.text || "",
|
|
1180
|
-
data:
|
|
1210
|
+
data: {
|
|
1211
|
+
...e,
|
|
1212
|
+
__billboardRuntimeId: s,
|
|
1213
|
+
__billboardRuntimeIndex: i,
|
|
1214
|
+
__currentBillboard: t
|
|
1215
|
+
},
|
|
1181
1216
|
style: { zIndex: e.zIndex || "1" }
|
|
1182
1217
|
};
|
|
1183
1218
|
});
|
|
@@ -1196,30 +1231,31 @@ class oi {
|
|
|
1196
1231
|
}
|
|
1197
1232
|
/** ====== 主入口:仅保留循环,内部调用独立函数 ====== */
|
|
1198
1233
|
addGroup(e, t = !0) {
|
|
1199
|
-
const i = e.id || `${Date.now()}
|
|
1234
|
+
const i = e.id || `${Date.now()}`, r = e.id ? e : { ...e, id: i };
|
|
1200
1235
|
this.removeGroup(i);
|
|
1201
|
-
const
|
|
1202
|
-
(
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1205
|
-
}), (
|
|
1206
|
-
const
|
|
1207
|
-
|
|
1208
|
-
}), (
|
|
1209
|
-
const
|
|
1210
|
-
|
|
1236
|
+
const n = [], o = r.show !== !1;
|
|
1237
|
+
(r.polyline || []).forEach((d) => {
|
|
1238
|
+
const l = this.createPolyline(d, o);
|
|
1239
|
+
l && n.push(l);
|
|
1240
|
+
}), (r.wall || []).forEach((d) => {
|
|
1241
|
+
const l = this.createWall(d, o);
|
|
1242
|
+
l && n.push(l);
|
|
1243
|
+
}), (r.polygon || []).forEach((d) => {
|
|
1244
|
+
const l = this.createPolygon(d, o);
|
|
1245
|
+
l && n.push(l);
|
|
1211
1246
|
});
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1214
|
-
const
|
|
1247
|
+
const s = this.createBillboardPoints(r);
|
|
1248
|
+
s.length && t && this.aggregator.appendPoints(s, !1), this.createCard(r);
|
|
1249
|
+
const h = new ni({
|
|
1215
1250
|
id: i,
|
|
1216
|
-
entities:
|
|
1251
|
+
entities: n,
|
|
1217
1252
|
primitives: [],
|
|
1218
|
-
|
|
1253
|
+
billboardPointIds: s.map((d) => d.id),
|
|
1254
|
+
dataItem: r,
|
|
1219
1255
|
aggregator: this.aggregator,
|
|
1220
1256
|
cardPool: this.cardPool
|
|
1221
1257
|
});
|
|
1222
|
-
return this.groupMap.set(i,
|
|
1258
|
+
return this.groupMap.set(i, h), s;
|
|
1223
1259
|
}
|
|
1224
1260
|
async addGroups(e) {
|
|
1225
1261
|
const i = e.map((r) => this.addGroup(r, !1)).flat();
|
|
@@ -1230,27 +1266,33 @@ class oi {
|
|
|
1230
1266
|
t && (t.removeAll(this.viewer), this.groupMap.delete(e));
|
|
1231
1267
|
}
|
|
1232
1268
|
removeGroups(e) {
|
|
1233
|
-
let t = [];
|
|
1234
|
-
for (const
|
|
1235
|
-
const
|
|
1236
|
-
if (
|
|
1237
|
-
let
|
|
1238
|
-
this.groupMap.delete(
|
|
1269
|
+
let t = [], i = [];
|
|
1270
|
+
for (const r of e) {
|
|
1271
|
+
const n = this.groupMap.get(r);
|
|
1272
|
+
if (n) {
|
|
1273
|
+
let o = n.removeAll(this.viewer, !1);
|
|
1274
|
+
this.groupMap.delete(r), t.push(...o.billboardPointIds), i.push(o.groupId);
|
|
1239
1275
|
}
|
|
1240
1276
|
}
|
|
1241
|
-
this.aggregator.removePointsById(t), this.cardPool.removeByIds(
|
|
1277
|
+
t.length && this.aggregator.removePointsById(t), i.length && this.cardPool.removeByIds(i);
|
|
1242
1278
|
}
|
|
1243
1279
|
updateGroup(e) {
|
|
1244
1280
|
const t = this.groupMap.get(e.id);
|
|
1245
1281
|
t && (t.removeAll(this.viewer), this.groupMap.delete(e.id)), this.addGroup(e);
|
|
1246
1282
|
}
|
|
1247
1283
|
async updateGroups(e) {
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1284
|
+
const t = e.flatMap((n) => {
|
|
1285
|
+
const o = this.groupMap.get(n.id);
|
|
1286
|
+
return o?.billboardPointIds?.length ? o.billboardPointIds : (n.billboard || []).map(
|
|
1287
|
+
(s, h) => this.getBillboardPointId(n.id, h)
|
|
1288
|
+
);
|
|
1289
|
+
});
|
|
1290
|
+
t.length && this.aggregator.removePointsById(t), this.cardPool.removeByIds(e.map((n) => n.id));
|
|
1291
|
+
const r = e.map((n) => {
|
|
1292
|
+
const o = this.groupMap.get(n.id);
|
|
1293
|
+
return o && (o.removeAll(this.viewer, !1), this.groupMap.delete(n.id)), this.addGroup(n, !1);
|
|
1252
1294
|
}).flat();
|
|
1253
|
-
|
|
1295
|
+
r.length > 0 && this.aggregator && this.aggregator.appendPoints(r, !1);
|
|
1254
1296
|
}
|
|
1255
1297
|
setGroupVisible(e, t) {
|
|
1256
1298
|
this.groupMap.get(e)?.setVisible(t);
|
|
@@ -1323,7 +1365,7 @@ class li {
|
|
|
1323
1365
|
t || (t = new V()), i || (i = new V());
|
|
1324
1366
|
const s = new ie(r, n, this.labelId, t);
|
|
1325
1367
|
s.setOcclusionOptions({ distanceEpsilon: 1 }), s.setOcclusionEnabled(!1);
|
|
1326
|
-
const h = new ie(r, n, this.cardId, i, !1),
|
|
1368
|
+
const h = new ie(r, n, this.cardId, i, !1), d = new lt(r, n, {
|
|
1327
1369
|
//聚合
|
|
1328
1370
|
threshold: o?.threshold || 16,
|
|
1329
1371
|
displayLimit: o?.displayLimit || 300,
|
|
@@ -1342,10 +1384,10 @@ class li {
|
|
|
1342
1384
|
r,
|
|
1343
1385
|
n,
|
|
1344
1386
|
l,
|
|
1345
|
-
|
|
1387
|
+
d,
|
|
1346
1388
|
h
|
|
1347
1389
|
);
|
|
1348
|
-
return { materialManager: l, entityLayerManager: c, cardPool: h, labelPool: s, aggregator:
|
|
1390
|
+
return { materialManager: l, entityLayerManager: c, cardPool: h, labelPool: s, aggregator: d, eventBus: t, cardEventBus: i };
|
|
1349
1391
|
}
|
|
1350
1392
|
//添加标记
|
|
1351
1393
|
set(e) {
|
|
@@ -1422,11 +1464,11 @@ const w = {
|
|
|
1422
1464
|
polygonTileWidth: 2,
|
|
1423
1465
|
polygonTileHeight: 2
|
|
1424
1466
|
};
|
|
1425
|
-
function
|
|
1467
|
+
function b(a, e) {
|
|
1426
1468
|
const t = Number(a);
|
|
1427
1469
|
return Number.isFinite(t) ? t : e;
|
|
1428
1470
|
}
|
|
1429
|
-
function
|
|
1471
|
+
function _(a) {
|
|
1430
1472
|
return Number.isFinite(a) ? Math.max(1, a) : 1;
|
|
1431
1473
|
}
|
|
1432
1474
|
function hi(a, e) {
|
|
@@ -1436,18 +1478,18 @@ function ci(a) {
|
|
|
1436
1478
|
const e = a?.repeat;
|
|
1437
1479
|
if (Array.isArray(e) && e.length >= 2)
|
|
1438
1480
|
return {
|
|
1439
|
-
x:
|
|
1440
|
-
y:
|
|
1481
|
+
x: _(b(e[0], 1)),
|
|
1482
|
+
y: _(b(e[1], 1))
|
|
1441
1483
|
};
|
|
1442
1484
|
if (e && typeof e == "object")
|
|
1443
1485
|
return {
|
|
1444
|
-
x:
|
|
1445
|
-
y:
|
|
1486
|
+
x: _(b(e.x, 1)),
|
|
1487
|
+
y: _(b(e.y, 1))
|
|
1446
1488
|
};
|
|
1447
1489
|
const t = Number(a?.repeatX), i = Number(a?.repeatY);
|
|
1448
1490
|
return Number.isFinite(t) && Number.isFinite(i) ? {
|
|
1449
|
-
x:
|
|
1450
|
-
y:
|
|
1491
|
+
x: _(t),
|
|
1492
|
+
y: _(i)
|
|
1451
1493
|
} : null;
|
|
1452
1494
|
}
|
|
1453
1495
|
function xe(a, e) {
|
|
@@ -1458,13 +1500,13 @@ function xe(a, e) {
|
|
|
1458
1500
|
const n = t[r - 1], o = t[r];
|
|
1459
1501
|
if (!Array.isArray(n) || !Array.isArray(o)) continue;
|
|
1460
1502
|
const s = a.Cartesian3.fromDegrees(
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1503
|
+
b(n[0], 0),
|
|
1504
|
+
b(n[1], 0),
|
|
1505
|
+
b(n[2], 0)
|
|
1464
1506
|
), h = a.Cartesian3.fromDegrees(
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1507
|
+
b(o[0], 0),
|
|
1508
|
+
b(o[1], 0),
|
|
1509
|
+
b(o[2], 0)
|
|
1468
1510
|
);
|
|
1469
1511
|
i += a.Cartesian3.distance(s, h);
|
|
1470
1512
|
}
|
|
@@ -1480,7 +1522,7 @@ function Ie(a) {
|
|
|
1480
1522
|
}
|
|
1481
1523
|
if (o > 0) return n / o;
|
|
1482
1524
|
}
|
|
1483
|
-
const i = Math.abs(
|
|
1525
|
+
const i = Math.abs(b(a?.minHeight, 0)), r = Math.abs(b(a?.maxHeight, 0));
|
|
1484
1526
|
return i > 0 || r > 0 ? i + r : 3;
|
|
1485
1527
|
}
|
|
1486
1528
|
function Se(a, e) {
|
|
@@ -1491,14 +1533,14 @@ function Se(a, e) {
|
|
|
1491
1533
|
if (!Array.isArray(i) || i.length < 3) return { width: 1, height: 1 };
|
|
1492
1534
|
let r = Number.POSITIVE_INFINITY, n = Number.NEGATIVE_INFINITY, o = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY;
|
|
1493
1535
|
for (let u = 0; u < i.length; u += 3) {
|
|
1494
|
-
const
|
|
1495
|
-
!Number.isFinite(
|
|
1536
|
+
const v = Number(i[u]), p = Number(i[u + 1]);
|
|
1537
|
+
!Number.isFinite(v) || !Number.isFinite(p) || (r = Math.min(r, v), n = Math.max(n, v), o = Math.min(o, p), s = Math.max(s, p));
|
|
1496
1538
|
}
|
|
1497
1539
|
if (!Number.isFinite(r) || !Number.isFinite(o))
|
|
1498
1540
|
return { width: 1, height: 1 };
|
|
1499
|
-
const h = (o + s) / 2,
|
|
1541
|
+
const h = (o + s) / 2, d = a.Ellipsoid.WGS84.maximumRadius, l = a.Math.toRadians(Math.abs(n - r)), c = a.Math.toRadians(Math.abs(s - o)), g = l * d * Math.cos(a.Math.toRadians(h)), f = c * d;
|
|
1500
1542
|
return {
|
|
1501
|
-
width:
|
|
1543
|
+
width: g > 0 ? g : 1,
|
|
1502
1544
|
height: f > 0 ? f : 1
|
|
1503
1545
|
};
|
|
1504
1546
|
}
|
|
@@ -1513,28 +1555,28 @@ function Ee({
|
|
|
1513
1555
|
if (e?.autoRepeat === !1)
|
|
1514
1556
|
return { x: 1, y: 1 };
|
|
1515
1557
|
if (i === "wall") {
|
|
1516
|
-
const h = xe(a, t),
|
|
1558
|
+
const h = xe(a, t), d = Ie(t), l = b(
|
|
1517
1559
|
e?.tileWidth ?? e?.textureWidth,
|
|
1518
1560
|
w.wallTileWidth
|
|
1519
|
-
), c =
|
|
1561
|
+
), c = b(
|
|
1520
1562
|
e?.tileHeight ?? e?.textureHeight,
|
|
1521
1563
|
w.wallTileHeight
|
|
1522
1564
|
);
|
|
1523
1565
|
return {
|
|
1524
|
-
x:
|
|
1525
|
-
y:
|
|
1566
|
+
x: _(h / Math.max(l, 0.01)),
|
|
1567
|
+
y: _(d / Math.max(c, 0.01))
|
|
1526
1568
|
};
|
|
1527
1569
|
}
|
|
1528
|
-
const n = Se(a, t), o =
|
|
1570
|
+
const n = Se(a, t), o = b(
|
|
1529
1571
|
e?.tileWidth ?? e?.textureWidth,
|
|
1530
1572
|
w.polygonTileWidth
|
|
1531
|
-
), s =
|
|
1573
|
+
), s = b(
|
|
1532
1574
|
e?.tileHeight ?? e?.textureHeight,
|
|
1533
1575
|
w.polygonTileHeight
|
|
1534
1576
|
);
|
|
1535
1577
|
return {
|
|
1536
|
-
x:
|
|
1537
|
-
y:
|
|
1578
|
+
x: _(n.width / Math.max(o, 0.01)),
|
|
1579
|
+
y: _(n.height / Math.max(s, 0.01))
|
|
1538
1580
|
};
|
|
1539
1581
|
}
|
|
1540
1582
|
function De({
|
|
@@ -1549,25 +1591,25 @@ function De({
|
|
|
1549
1591
|
if (e?.autoRepeat === !1)
|
|
1550
1592
|
return 1;
|
|
1551
1593
|
if (i === "wall") {
|
|
1552
|
-
const l = xe(a, t), c = Ie(t),
|
|
1594
|
+
const l = xe(a, t), c = Ie(t), g = b(
|
|
1553
1595
|
e?.tileWidth ?? e?.textureWidth,
|
|
1554
1596
|
w.wallTileWidth
|
|
1555
|
-
), f =
|
|
1597
|
+
), f = b(
|
|
1556
1598
|
e?.tileHeight ?? e?.textureHeight,
|
|
1557
1599
|
w.wallTileHeight
|
|
1558
|
-
), u = r === "vertical" ? c / Math.max(f, 0.01) : l / Math.max(
|
|
1559
|
-
return
|
|
1600
|
+
), u = r === "vertical" ? c / Math.max(f, 0.01) : l / Math.max(g, 0.01);
|
|
1601
|
+
return _(Number(u.toFixed(2)));
|
|
1560
1602
|
}
|
|
1561
|
-
const o = Se(a, t), s =
|
|
1603
|
+
const o = Se(a, t), s = b(
|
|
1562
1604
|
e?.tileWidth ?? e?.textureWidth,
|
|
1563
1605
|
w.polygonTileWidth
|
|
1564
|
-
), h =
|
|
1606
|
+
), h = b(
|
|
1565
1607
|
e?.tileHeight ?? e?.textureHeight,
|
|
1566
1608
|
w.polygonTileHeight
|
|
1567
|
-
),
|
|
1568
|
-
return
|
|
1609
|
+
), d = r === "vertical" ? o.height / Math.max(h, 0.01) : o.width / Math.max(s, 0.01);
|
|
1610
|
+
return _(Number(d.toFixed(2)));
|
|
1569
1611
|
}
|
|
1570
|
-
function
|
|
1612
|
+
function R(a) {
|
|
1571
1613
|
const e = a;
|
|
1572
1614
|
return e.__materialFactory = !0, e;
|
|
1573
1615
|
}
|
|
@@ -1575,7 +1617,7 @@ function Ae(a) {
|
|
|
1575
1617
|
const e = String(a?.wallVerticalMode ?? a?.verticalMode ?? "stretch");
|
|
1576
1618
|
return e === "repeat" || e === "bottom" || e === "stretch" ? e : "stretch";
|
|
1577
1619
|
}
|
|
1578
|
-
function
|
|
1620
|
+
function di({
|
|
1579
1621
|
Cesium: a,
|
|
1580
1622
|
themeOptions: e,
|
|
1581
1623
|
entityOptions: t
|
|
@@ -1588,7 +1630,7 @@ function gi({
|
|
|
1588
1630
|
});
|
|
1589
1631
|
return Ae(e) === "repeat" ? i : { x: i.x, y: 1 };
|
|
1590
1632
|
}
|
|
1591
|
-
function
|
|
1633
|
+
function gi(a, e) {
|
|
1592
1634
|
const t = "WallBottomImageMaterial_" + Date.now() + "_" + Math.floor(Math.random() * 1e3);
|
|
1593
1635
|
function i(r) {
|
|
1594
1636
|
this._definitionChanged = new a.Event(), this._color = r.color, this.color = r.color;
|
|
@@ -1735,7 +1777,7 @@ function fi({
|
|
|
1735
1777
|
themeKey: e.data?.theme,
|
|
1736
1778
|
category: "polygon",
|
|
1737
1779
|
force: i,
|
|
1738
|
-
material:
|
|
1780
|
+
material: R((n = {}) => {
|
|
1739
1781
|
const o = Ee({
|
|
1740
1782
|
Cesium: a,
|
|
1741
1783
|
themeOptions: r,
|
|
@@ -1754,7 +1796,7 @@ function fi({
|
|
|
1754
1796
|
themeKey: e.data?.theme,
|
|
1755
1797
|
category: "polygon",
|
|
1756
1798
|
force: i,
|
|
1757
|
-
material:
|
|
1799
|
+
material: R((n = {}) => {
|
|
1758
1800
|
const o = e.data?.freely || "vertical", s = De({
|
|
1759
1801
|
Cesium: a,
|
|
1760
1802
|
themeOptions: r,
|
|
@@ -1765,7 +1807,7 @@ function fi({
|
|
|
1765
1807
|
return Pe(a, {
|
|
1766
1808
|
image: e.img,
|
|
1767
1809
|
color: new a.Color.fromCssColorString(r?.color || "#ffffff"),
|
|
1768
|
-
duration:
|
|
1810
|
+
duration: b(r?.duration, 5e3),
|
|
1769
1811
|
freely: o,
|
|
1770
1812
|
direction: r?.direction || "+",
|
|
1771
1813
|
count: s
|
|
@@ -1788,18 +1830,18 @@ function mi({
|
|
|
1788
1830
|
themeKey: e.data?.theme,
|
|
1789
1831
|
category: "wall",
|
|
1790
1832
|
force: i,
|
|
1791
|
-
material:
|
|
1792
|
-
const o = Ae(r), s =
|
|
1833
|
+
material: R((n = {}) => {
|
|
1834
|
+
const o = Ae(r), s = di({
|
|
1793
1835
|
Cesium: a,
|
|
1794
1836
|
themeOptions: r,
|
|
1795
1837
|
entityOptions: n
|
|
1796
1838
|
});
|
|
1797
1839
|
if (o === "bottom") {
|
|
1798
1840
|
const h = hi(
|
|
1799
|
-
|
|
1841
|
+
b(r?.bottomHeightRatio, 0.3),
|
|
1800
1842
|
0.3
|
|
1801
1843
|
);
|
|
1802
|
-
return
|
|
1844
|
+
return gi(a, {
|
|
1803
1845
|
image: e.img,
|
|
1804
1846
|
repeatX: s.x,
|
|
1805
1847
|
bottomHeightRatio: h,
|
|
@@ -1819,7 +1861,7 @@ function mi({
|
|
|
1819
1861
|
themeKey: e.data?.theme,
|
|
1820
1862
|
category: "wall",
|
|
1821
1863
|
force: i,
|
|
1822
|
-
material:
|
|
1864
|
+
material: R((n = {}) => {
|
|
1823
1865
|
const o = e.data?.freely || "vertical", s = De({
|
|
1824
1866
|
Cesium: a,
|
|
1825
1867
|
themeOptions: r,
|
|
@@ -1830,7 +1872,7 @@ function mi({
|
|
|
1830
1872
|
return Pe(a, {
|
|
1831
1873
|
image: e.img,
|
|
1832
1874
|
color: new a.Color.fromCssColorString(r?.color || "#ffffff"),
|
|
1833
|
-
duration:
|
|
1875
|
+
duration: b(r?.duration, 5e3),
|
|
1834
1876
|
freely: o,
|
|
1835
1877
|
direction: r?.direction || "+",
|
|
1836
1878
|
count: s
|
|
@@ -1841,6 +1883,9 @@ function mi({
|
|
|
1841
1883
|
}
|
|
1842
1884
|
}
|
|
1843
1885
|
class pi extends li {
|
|
1886
|
+
getCurrentBillboard(e) {
|
|
1887
|
+
return e?.__currentBillboard || e?.billboard?.[0];
|
|
1888
|
+
}
|
|
1844
1889
|
constructor(e) {
|
|
1845
1890
|
const {
|
|
1846
1891
|
labelId: t = "report-marker",
|
|
@@ -1851,13 +1896,13 @@ class pi extends li {
|
|
|
1851
1896
|
runListener: s = () => {
|
|
1852
1897
|
},
|
|
1853
1898
|
MaterialManager: h = new we(),
|
|
1854
|
-
aggregatorOptions:
|
|
1855
|
-
} = e, l = [...r], c = [...n],
|
|
1899
|
+
aggregatorOptions: d
|
|
1900
|
+
} = e, l = [...r], c = [...n], g = [...o], f = {
|
|
1856
1901
|
clusterTheme: "Tag1007",
|
|
1857
1902
|
pointTheme: "Tag1001",
|
|
1858
1903
|
centralPointMode: "firstPoint",
|
|
1859
1904
|
debugCurrentGrids: !1,
|
|
1860
|
-
...
|
|
1905
|
+
...d || {}
|
|
1861
1906
|
}, u = {
|
|
1862
1907
|
...e,
|
|
1863
1908
|
labelId: t,
|
|
@@ -1866,7 +1911,7 @@ class pi extends li {
|
|
|
1866
1911
|
aggregatorOptions: f,
|
|
1867
1912
|
eventBus: new V()
|
|
1868
1913
|
};
|
|
1869
|
-
super(u), this.opt = { ...this.opt, ...u }, this.initTagListener(this.instance.eventBus, this.opt), this.loadTabThemeConfig(l), this.loadLineThemeConfig(c), this.loadCardThemeConfig(
|
|
1914
|
+
super(u), this.opt = { ...this.opt, ...u }, this.initTagListener(this.instance.eventBus, this.opt), this.loadTabThemeConfig(l), this.loadLineThemeConfig(c), this.loadCardThemeConfig(g), this.initDefaultLineMaterials(), this.initDefaultTagTheme();
|
|
1870
1915
|
}
|
|
1871
1916
|
initDefaultTagTheme() {
|
|
1872
1917
|
this.setTagTheme({
|
|
@@ -2088,21 +2133,22 @@ class pi extends li {
|
|
|
2088
2133
|
//注册主题
|
|
2089
2134
|
setTagTheme(e) {
|
|
2090
2135
|
let { labelPool: t } = this.instance;
|
|
2136
|
+
const i = (r) => this.getCurrentBillboard(r);
|
|
2091
2137
|
t.registerTheme(e.data.theme, {
|
|
2092
|
-
createElement(
|
|
2093
|
-
let
|
|
2094
|
-
const
|
|
2095
|
-
let
|
|
2096
|
-
...
|
|
2097
|
-
text:
|
|
2138
|
+
createElement(r, n) {
|
|
2139
|
+
let o = i(n.data);
|
|
2140
|
+
const s = ii(o, ["position", "options"]);
|
|
2141
|
+
let h, d = {
|
|
2142
|
+
...s,
|
|
2143
|
+
text: o?.options?.text,
|
|
2098
2144
|
isFullLink: e?.isFullLink ?? !1,
|
|
2099
2145
|
img: e?.data?.options?.img,
|
|
2100
2146
|
textStyle: e?.data?.options?.textStyle,
|
|
2101
2147
|
imgStyle: e?.data?.options?.imgStyle
|
|
2102
2148
|
};
|
|
2103
|
-
if (
|
|
2104
|
-
|
|
2105
|
-
text:
|
|
2149
|
+
if (n.data?.gridKey)
|
|
2150
|
+
h = x(I(ae), {
|
|
2151
|
+
text: n.data?.count,
|
|
2106
2152
|
isFullLink: e.isFullLink ?? !1,
|
|
2107
2153
|
img: e?.data.options.img,
|
|
2108
2154
|
imgStyle: e?.data.options?.imgStyle,
|
|
@@ -2123,29 +2169,31 @@ class pi extends li {
|
|
|
2123
2169
|
}
|
|
2124
2170
|
});
|
|
2125
2171
|
else if (e.comType == 4)
|
|
2126
|
-
|
|
2172
|
+
h = x(I(Xe), d);
|
|
2127
2173
|
else if (e.comType == 5 || e.comType == 8) {
|
|
2128
|
-
const
|
|
2129
|
-
|
|
2130
|
-
...
|
|
2131
|
-
pixelOffset:
|
|
2132
|
-
textStyle:
|
|
2133
|
-
lineStyle:
|
|
2134
|
-
otherOffset:
|
|
2135
|
-
isCanDraggable:
|
|
2136
|
-
onCanDraggable:
|
|
2137
|
-
onSetOtherOffset: (
|
|
2138
|
-
|
|
2174
|
+
const l = o?.options || {}, c = e?.data?.options || {}, g = o?.pixelOffset || e?.data?.pixelOffset || { x: 0, y: 0 }, f = l.otherOffset ?? c.otherOffset ?? { x: 0, y: -0 }, u = l.isCanDraggable ?? c.isCanDraggable ?? e?.isCanDraggable ?? !1, v = e.comType == 8 ? Ve : Ke;
|
|
2175
|
+
h = x(I(v), {
|
|
2176
|
+
...d,
|
|
2177
|
+
pixelOffset: g,
|
|
2178
|
+
textStyle: l.textStyle || c.textStyle,
|
|
2179
|
+
lineStyle: l.lineStyle || c.lineStyle,
|
|
2180
|
+
otherOffset: f,
|
|
2181
|
+
isCanDraggable: u,
|
|
2182
|
+
onCanDraggable: l.onCanDraggable || e?.onCanDraggable,
|
|
2183
|
+
onSetOtherOffset: (p) => {
|
|
2184
|
+
const C = i(n.data);
|
|
2185
|
+
C?.options && (C.options.otherOffset = p), l.onSetOtherOffset?.(p), e?.onSetOtherOffset?.(n.data, p);
|
|
2139
2186
|
},
|
|
2140
|
-
onSetLineStake: (
|
|
2141
|
-
|
|
2187
|
+
onSetLineStake: (p) => {
|
|
2188
|
+
const C = i(n.data);
|
|
2189
|
+
C?.options && (C.options.lineStake = p), l.onSetLineStake?.(p), e?.onSetLineStake?.(n.data, p);
|
|
2142
2190
|
}
|
|
2143
2191
|
});
|
|
2144
|
-
} else e.comType == 6 || e.comType == 7 ?
|
|
2145
|
-
text:
|
|
2146
|
-
textStyle:
|
|
2147
|
-
}) :
|
|
2148
|
-
return O(
|
|
2192
|
+
} else e.comType == 6 || e.comType == 7 ? h = x(I(Ye), {
|
|
2193
|
+
text: d.text,
|
|
2194
|
+
textStyle: d.textStyle
|
|
2195
|
+
}) : h = x(I(ae), d);
|
|
2196
|
+
return O(h, r), () => O(null, r);
|
|
2149
2197
|
},
|
|
2150
2198
|
options: {
|
|
2151
2199
|
offset: e.comType == 5 || e.comType == 8 ? {} : e?.data?.pixelOffset || {}
|
|
@@ -2158,7 +2206,7 @@ class pi extends li {
|
|
|
2158
2206
|
e.addListener(G.Click, {
|
|
2159
2207
|
name: "marker:click",
|
|
2160
2208
|
fn: (n) => {
|
|
2161
|
-
t.runListener?.(H.标记左键点击, n.data), pe(n.data?.onClick) && n.data?.onClick(n.data), n.data?.cameraPoint && n.data?.
|
|
2209
|
+
t.runListener?.(H.标记左键点击, n.data), pe(n.data?.onClick) && n.data?.onClick(n.data), n.data?.cameraPoint && this.getCurrentBillboard(n.data)?.isFlyToCameraPoint && i?.camera?.flyTo({
|
|
2162
2210
|
duration: 1,
|
|
2163
2211
|
...n.data?.cameraPoint
|
|
2164
2212
|
});
|
|
@@ -2168,9 +2216,10 @@ class pi extends li {
|
|
|
2168
2216
|
fn: (n) => {
|
|
2169
2217
|
let o = this.opt.Cesium, s = { x: 0, y: 0 };
|
|
2170
2218
|
try {
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2219
|
+
const h = this.getCurrentBillboard(n.data);
|
|
2220
|
+
if (h?.position?.length > 2) {
|
|
2221
|
+
let d = h.position, l = o.Cartesian3.fromDegrees(d[0], d[1], d[3] || 0), c = this.instance.labelPool.toWindowCoordinates(l);
|
|
2222
|
+
s.x = c.x, s.y = c.y;
|
|
2174
2223
|
}
|
|
2175
2224
|
} catch (h) {
|
|
2176
2225
|
console.log(h);
|
|
@@ -2182,9 +2231,10 @@ class pi extends li {
|
|
|
2182
2231
|
fn: (n) => {
|
|
2183
2232
|
let o = this.opt.Cesium, s = { x: 0, y: 0 };
|
|
2184
2233
|
try {
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2234
|
+
const h = this.getCurrentBillboard(n.data);
|
|
2235
|
+
if (h?.position?.length > 2) {
|
|
2236
|
+
let d = h.position, l = o.Cartesian3.fromDegrees(d[0], d[1], d[3] || 0), c = this.instance.labelPool.toWindowCoordinates(l);
|
|
2237
|
+
s.x = c.x, s.y = c.y;
|
|
2188
2238
|
}
|
|
2189
2239
|
} catch (h) {
|
|
2190
2240
|
console.log(h);
|
|
@@ -2207,12 +2257,12 @@ class pi extends li {
|
|
|
2207
2257
|
});
|
|
2208
2258
|
}
|
|
2209
2259
|
}
|
|
2210
|
-
const yi = /* @__PURE__ */
|
|
2260
|
+
const yi = /* @__PURE__ */ Ne({
|
|
2211
2261
|
__name: "MarkerManage",
|
|
2212
2262
|
props: st,
|
|
2213
2263
|
emits: ["register", "load", "marker-event"],
|
|
2214
2264
|
setup(a, { expose: e, emit: t }) {
|
|
2215
|
-
const i = a, r = t, n =
|
|
2265
|
+
const i = a, r = t, n = ke("leitingMethods");
|
|
2216
2266
|
let o = null;
|
|
2217
2267
|
const s = (l = {}) => {
|
|
2218
2268
|
if (o) return o;
|
|
@@ -2221,8 +2271,8 @@ const yi = /* @__PURE__ */ ke({
|
|
|
2221
2271
|
...l,
|
|
2222
2272
|
Cesium: l.Cesium || i.Cesium,
|
|
2223
2273
|
viewer: l.viewer || i.viewer,
|
|
2224
|
-
runListener: (
|
|
2225
|
-
r("marker-event", { key:
|
|
2274
|
+
runListener: (g, f, ...u) => {
|
|
2275
|
+
r("marker-event", { key: g, data: f, args: u });
|
|
2226
2276
|
}
|
|
2227
2277
|
};
|
|
2228
2278
|
return !c.Cesium || !c.viewer ? null : (o = new pi(c), l.methods && (l.methods.setTagTheme = o.setTagTheme.bind(o), l.methods.setMaterial = o.setMaterial.bind(o), l.methods.setEntityList = o.set.bind(o), l.methods.addComItem = o.add.bind(o), l.methods.deleteComItem = o.delete.bind(o), l.methods.updateComItem = o.update.bind(o), l.methods.getEntityByID = o.getById.bind(o), l.methods.getOptions = o.getOptions.bind(o)), r("load", o), o);
|
|
@@ -2245,28 +2295,28 @@ const yi = /* @__PURE__ */ ke({
|
|
|
2245
2295
|
setMaterial: (l) => o?.setMaterial(l)
|
|
2246
2296
|
};
|
|
2247
2297
|
e(h), r("register", h);
|
|
2248
|
-
function
|
|
2298
|
+
function d() {
|
|
2249
2299
|
if (o) return o;
|
|
2250
|
-
const l = ze(n), c = l?.getCesium?.(),
|
|
2251
|
-
c &&
|
|
2300
|
+
const l = ze(n), c = l?.getCesium?.(), g = l?.getViewer?.();
|
|
2301
|
+
c && g ? s({ Cesium: c, viewer: g, methods: l }) : i.Cesium && i.viewer && s({ methods: l });
|
|
2252
2302
|
}
|
|
2253
2303
|
return We(() => {
|
|
2254
|
-
|
|
2304
|
+
d();
|
|
2255
2305
|
}), te(
|
|
2256
2306
|
() => [i.Cesium, i.viewer],
|
|
2257
2307
|
([l, c]) => {
|
|
2258
|
-
l && c && !o &&
|
|
2308
|
+
l && c && !o && d();
|
|
2259
2309
|
}
|
|
2260
2310
|
), te(
|
|
2261
2311
|
() => n?.value,
|
|
2262
2312
|
(l, c) => {
|
|
2263
|
-
|
|
2313
|
+
d();
|
|
2264
2314
|
},
|
|
2265
2315
|
{ deep: !1 }
|
|
2266
2316
|
), Fe(() => {
|
|
2267
2317
|
}), (l, c) => $e(l.$slots, "default");
|
|
2268
2318
|
}
|
|
2269
|
-
}), xi =
|
|
2319
|
+
}), xi = Re(yi);
|
|
2270
2320
|
export {
|
|
2271
2321
|
xi as CxMarkerManage,
|
|
2272
2322
|
pi as MarkerManage,
|