leiting-bim 2.1.159 → 2.1.160
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 +1 -1
- package/leitingbim.css +1 -1
- package/package.json +1 -1
- package/plugins/cesium-core/dist/cesium-core.mjs +133 -70
- package/plugins/cesium-core/dist/cesium-core.mjs.map +1 -1
- package/plugins/cesium-core/dist/cesium-core.umd.js +19 -19
- package/plugins/cesium-core/dist/cesium-core.umd.js.map +1 -1
- package/plugins/cesium-core/dist/components/draw/handlers/LineDrawer.d.ts +7 -0
- package/plugins/cesium-core/dist/components/draw/handlers/PolygonDrawer.d.ts +7 -0
- package/plugins/cesium-vue/dist/components/marker-manage.js +452 -434
- package/plugins/cesium-vue/dist/components/marker-manage.js.map +1 -1
|
@@ -6,7 +6,7 @@ import { CxMarkerBubbleLine as Ve, CxMarkerBubble as Ke } from "./marker-bubble.
|
|
|
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
|
|
9
|
+
import { i as q, b as ce, a as P, S as R, d as ne, c as j, e as ge, f as Ue, g as de, 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 },
|
|
@@ -18,7 +18,7 @@ const st = {
|
|
|
18
18
|
themeConfig: { type: Object }
|
|
19
19
|
// Optional override
|
|
20
20
|
};
|
|
21
|
-
var H = /* @__PURE__ */ ((
|
|
21
|
+
var H = /* @__PURE__ */ ((a) => (a.左建选中模型 = "MODEL_LEFT_CLICK", a.标记左键点击 = "TAG_LEFT_CLICK", a.标记移入 = "TAG_MOUSEENTER", a.标记移出 = "TAG_MOUSELEAVE", a.模型位置保存 = "SAVE_REGION", a.模型加载完成 = "MODEL_READY", a))(H || {});
|
|
22
22
|
class lt {
|
|
23
23
|
Cesium;
|
|
24
24
|
viewer;
|
|
@@ -56,10 +56,10 @@ class lt {
|
|
|
56
56
|
maxRefineLevels = 2;
|
|
57
57
|
constructor(e, t, i) {
|
|
58
58
|
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, this.terrainLevelOffset = i.terrainLevelOffset ?? 2;
|
|
59
|
-
const
|
|
60
|
-
this._lastTileProvider = o, this.tilingScheme = s, this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), this.debugCurrentGrids && this._ensureDebugImageryLayer(),
|
|
59
|
+
const r = this.viewer.scene && this.viewer.scene.globe, n = r && r._surface, o = n && n._tileProvider, s = o?.tilingScheme || new this.Cesium.GeographicTilingScheme();
|
|
60
|
+
this._lastTileProvider = o, this.tilingScheme = s, this.levels = this._createLevels(), this._buildLevels(), this._updateFn = this._update.bind(this), this.debugCurrentGrids && this._ensureDebugImageryLayer(), r && (this._tileLoadListener = (h) => {
|
|
61
61
|
h === 0 && this._cameraDirty && (this._cameraDirty = !1, this._scheduleUpdate());
|
|
62
|
-
},
|
|
62
|
+
}, r.tileLoadProgressEvent.addEventListener(this._tileLoadListener)), this._cameraChangedHandler = () => {
|
|
63
63
|
this._update();
|
|
64
64
|
}, this.viewer.camera.changed.addEventListener(this._cameraChangedHandler);
|
|
65
65
|
}
|
|
@@ -80,21 +80,21 @@ class lt {
|
|
|
80
80
|
this.debugCurrentGrids = e, e ? this._ensureDebugImageryLayer() : (this._clearDebugGrids(), this._removeDebugImageryLayer()), t && this._update();
|
|
81
81
|
}
|
|
82
82
|
_syncTilingSchemeAndLevels() {
|
|
83
|
-
const e = this.viewer.scene && this.viewer.scene.globe, t = e && e._surface, i = t && t._tileProvider,
|
|
84
|
-
!n && !o && this.levels && this.levels.length > 0 || (this._lastTileProvider = i, this.tilingScheme =
|
|
83
|
+
const e = this.viewer.scene && this.viewer.scene.globe, t = e && e._surface, i = t && t._tileProvider, r = i?.tilingScheme || new this.Cesium.GeographicTilingScheme(), n = i !== this._lastTileProvider, o = this.tilingScheme !== r;
|
|
84
|
+
!n && !o && this.levels && this.levels.length > 0 || (this._lastTileProvider = i, this.tilingScheme = r, this.levels = this._createLevels(), this._buildLevels(), this.debugCurrentGrids && (this._removeDebugImageryLayer(), this._ensureDebugImageryLayer()));
|
|
85
85
|
}
|
|
86
86
|
_createLevels() {
|
|
87
87
|
const e = [];
|
|
88
88
|
this.levelIndexByTileLevel = /* @__PURE__ */ new Map();
|
|
89
89
|
const t = 0, i = this.maxLevel;
|
|
90
|
-
let
|
|
91
|
-
for (let n = t; n <= i; n++,
|
|
90
|
+
let r = 0;
|
|
91
|
+
for (let n = t; n <= i; n++, r++) {
|
|
92
92
|
const o = 360 / Math.pow(2, n);
|
|
93
93
|
e.push({
|
|
94
94
|
level: n,
|
|
95
95
|
size: o,
|
|
96
96
|
minViewWidth: o * 4
|
|
97
|
-
}), this.levelIndexByTileLevel.set(n,
|
|
97
|
+
}), this.levelIndexByTileLevel.set(n, r);
|
|
98
98
|
}
|
|
99
99
|
return e;
|
|
100
100
|
}
|
|
@@ -141,22 +141,22 @@ class lt {
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
this.points[t] =
|
|
144
|
+
const r = { ...i, ...e };
|
|
145
|
+
this.points[t] = r, this._addPointToGrid(r), this._update();
|
|
146
146
|
}
|
|
147
147
|
removePointsById(e) {
|
|
148
148
|
const t = new Set(e);
|
|
149
149
|
this.points = this.points.filter((i) => !t.has(i.id));
|
|
150
150
|
for (const i of this.levels) {
|
|
151
|
-
const
|
|
152
|
-
if (
|
|
153
|
-
for (const [n, o] of
|
|
151
|
+
const r = this.gridLayers.get(i.level);
|
|
152
|
+
if (r)
|
|
153
|
+
for (const [n, o] of r.entries()) {
|
|
154
154
|
o.allPoints = o.allPoints.filter((s) => !t.has(s.id)), o.skipPoints = o.skipPoints.filter((s) => !t.has(s.id));
|
|
155
155
|
for (const [s, h] of o.groups.entries()) {
|
|
156
156
|
const g = h.filter((l) => !t.has(l.id));
|
|
157
157
|
g.length === 0 ? o.groups.delete(s) : o.groups.set(s, g);
|
|
158
158
|
}
|
|
159
|
-
o.allPoints.length === 0 &&
|
|
159
|
+
o.allPoints.length === 0 && r.delete(n);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
this._update();
|
|
@@ -170,8 +170,8 @@ class lt {
|
|
|
170
170
|
}
|
|
171
171
|
_addPointToGrid(e) {
|
|
172
172
|
for (const t of this.levels) {
|
|
173
|
-
const i = t.level,
|
|
174
|
-
if (!
|
|
173
|
+
const i = t.level, r = this.gridLayers.get(i);
|
|
174
|
+
if (!r) continue;
|
|
175
175
|
const n = this.Cesium.Cartographic.fromDegrees(e.lon, e.lat), o = this.tilingScheme.positionToTileXY(
|
|
176
176
|
n,
|
|
177
177
|
i,
|
|
@@ -179,12 +179,12 @@ class lt {
|
|
|
179
179
|
);
|
|
180
180
|
if (!o) continue;
|
|
181
181
|
const s = `${o.x}_${o.y}`;
|
|
182
|
-
let h =
|
|
182
|
+
let h = r.get(s);
|
|
183
183
|
if (h || (h = {
|
|
184
184
|
allPoints: [],
|
|
185
185
|
groups: /* @__PURE__ */ new Map(),
|
|
186
186
|
skipPoints: []
|
|
187
|
-
},
|
|
187
|
+
}, r.set(s, h)), h.allPoints.push(e), e.data?.billboard?.[0]?.skipAggregation)
|
|
188
188
|
h.skipPoints.push(e);
|
|
189
189
|
else {
|
|
190
190
|
const g = this.groupByTheme ? e.data?.billboard?.[0]?.theme : this.clusterTheme;
|
|
@@ -195,26 +195,26 @@ class lt {
|
|
|
195
195
|
// 在添加/更新点时预计算并缓存地图层级区间
|
|
196
196
|
_preparePointLevelRange(e) {
|
|
197
197
|
const t = e.data || {};
|
|
198
|
-
let i = t.minLevel,
|
|
198
|
+
let i = t.minLevel, r = t.maxLevel;
|
|
199
199
|
const n = t.levelRange;
|
|
200
|
-
Array.isArray(n) ? (n.length > 0 && i == null && (i = n[0]), n.length > 1 &&
|
|
201
|
-
const o = i == null ? this.defaultMinLevel : Number(i) || this.defaultMinLevel, s =
|
|
200
|
+
Array.isArray(n) ? (n.length > 0 && i == null && (i = n[0]), n.length > 1 && r == null && (r = n[1])) : n && typeof n == "object" && (i == null && typeof n.min == "number" && (i = n.min), r == null && typeof n.max == "number" && (r = n.max));
|
|
201
|
+
const o = i == null ? this.defaultMinLevel : Number(i) || this.defaultMinLevel, s = r == null ? this.defaultMaxLevel : Number(r) || this.defaultMaxLevel;
|
|
202
202
|
e.__minLevel = o, e.__maxLevel = s;
|
|
203
203
|
}
|
|
204
204
|
_isVisibleAtLevel(e, t) {
|
|
205
205
|
if (t == null) return !0;
|
|
206
206
|
(e.__minLevel === void 0 || e.__maxLevel === void 0) && this._preparePointLevelRange(e);
|
|
207
|
-
const i = e.__minLevel ?? this.defaultMinLevel,
|
|
208
|
-
return t >= i && t <=
|
|
207
|
+
const i = e.__minLevel ?? this.defaultMinLevel, r = e.__maxLevel ?? this.defaultMaxLevel;
|
|
208
|
+
return t >= i && t <= r;
|
|
209
209
|
}
|
|
210
210
|
_update() {
|
|
211
211
|
if (!this.labelPool) return;
|
|
212
212
|
this._syncTilingSchemeAndLevels(), this.labelPool.reset(), this.debugCurrentGrids && this._clearDebugGrids();
|
|
213
213
|
const e = this.points.length < this.minGlobalPointCount ? 1 / 0 : this.threshold;
|
|
214
214
|
let t = 0;
|
|
215
|
-
const i = (
|
|
215
|
+
const i = (r, n, o, s) => {
|
|
216
216
|
t = this._processCell(
|
|
217
|
-
|
|
217
|
+
r,
|
|
218
218
|
n,
|
|
219
219
|
o,
|
|
220
220
|
s,
|
|
@@ -223,12 +223,12 @@ class lt {
|
|
|
223
223
|
);
|
|
224
224
|
};
|
|
225
225
|
try {
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
226
|
+
const r = this._getSurfaceTiles();
|
|
227
|
+
if (!r || r.length === 0) {
|
|
228
228
|
this._handleNoSurfaceTiles(t);
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
|
-
this._tilesRetryCount = 0, this._processTiles(
|
|
231
|
+
this._tilesRetryCount = 0, this._processTiles(r, i);
|
|
232
232
|
} catch {
|
|
233
233
|
this.labelPool.cleanup();
|
|
234
234
|
return;
|
|
@@ -258,8 +258,8 @@ class lt {
|
|
|
258
258
|
let t = this.levelIndexByTileLevel.get(e);
|
|
259
259
|
if (t !== void 0) return t;
|
|
260
260
|
if (this.levels.length === 0) return;
|
|
261
|
-
const i = this.levels[0].level,
|
|
262
|
-
if (e >
|
|
261
|
+
const i = this.levels[0].level, r = this.levels[this.levels.length - 1].level;
|
|
262
|
+
if (e > r)
|
|
263
263
|
return this.levels.length - 1;
|
|
264
264
|
if (e < i)
|
|
265
265
|
return 0;
|
|
@@ -271,7 +271,7 @@ class lt {
|
|
|
271
271
|
return n;
|
|
272
272
|
}
|
|
273
273
|
_isTerrainEnabled() {
|
|
274
|
-
const e = this.viewer.terrainProvider, t = this.viewer.scene, i = t && t.globe,
|
|
274
|
+
const e = this.viewer.terrainProvider, t = this.viewer.scene, i = t && t.globe, r = i && i.terrainProvider, n = e || r;
|
|
275
275
|
return n ? !(n instanceof this.Cesium.EllipsoidTerrainProvider) : !1;
|
|
276
276
|
}
|
|
277
277
|
_getGridRefLevel(e) {
|
|
@@ -283,8 +283,8 @@ class lt {
|
|
|
283
283
|
return t;
|
|
284
284
|
}
|
|
285
285
|
_processTiles(e, t) {
|
|
286
|
-
const i = /* @__PURE__ */ new Set(),
|
|
287
|
-
if (!
|
|
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), g = (l, c, d) => {
|
|
287
|
+
if (!r || !h) return !0;
|
|
288
288
|
const f = this.tilingScheme.tileXYToRectangle(l, c, d);
|
|
289
289
|
return !(!f || f.east <= h.west || f.west >= h.east || f.north <= h.south || f.south >= h.north);
|
|
290
290
|
};
|
|
@@ -321,13 +321,13 @@ class lt {
|
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
_processCell(e, t, i,
|
|
324
|
+
_processCell(e, t, i, r, n, o) {
|
|
325
325
|
if (o >= this.displayLimit || e < 0) return o;
|
|
326
326
|
e >= this.levels.length && (e = this.levels.length - 1);
|
|
327
|
-
const s = this._getCellContext(e, t, i,
|
|
327
|
+
const s = this._getCellContext(e, t, i, r);
|
|
328
328
|
return s ? (o = this._processCellSkipPoints(s, o), o >= this.displayLimit ? (this._debugDrawCell(s), o) : (o = this._processCellGroups(s, n, o), this._debugDrawCell(s), o)) : o;
|
|
329
329
|
}
|
|
330
|
-
_getCellContext(e, t, i,
|
|
330
|
+
_getCellContext(e, t, i, r) {
|
|
331
331
|
const o = this.levels[e].level, s = this.gridLayers.get(o);
|
|
332
332
|
if (!s) return null;
|
|
333
333
|
const h = `${t}_${i}`, g = s.get(h);
|
|
@@ -347,11 +347,11 @@ class lt {
|
|
|
347
347
|
north: u,
|
|
348
348
|
centerLon: m,
|
|
349
349
|
centerLat: b,
|
|
350
|
-
viewTileLevel:
|
|
350
|
+
viewTileLevel: r
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
353
|
_processCellSkipPoints(e, t) {
|
|
354
|
-
const { cell: i, viewTileLevel:
|
|
354
|
+
const { cell: i, viewTileLevel: r } = e, n = r;
|
|
355
355
|
for (const o of i.skipPoints)
|
|
356
356
|
if (o.data?.show !== !1) {
|
|
357
357
|
if (t >= this.displayLimit) break;
|
|
@@ -368,7 +368,7 @@ class lt {
|
|
|
368
368
|
}
|
|
369
369
|
_processCellGroups(e, t, i) {
|
|
370
370
|
const {
|
|
371
|
-
levelIdx:
|
|
371
|
+
levelIdx: r,
|
|
372
372
|
lonIdx: n,
|
|
373
373
|
latIdx: o,
|
|
374
374
|
cell: s,
|
|
@@ -380,7 +380,7 @@ class lt {
|
|
|
380
380
|
const u = f.filter((p) => p.data?.show !== !1);
|
|
381
381
|
if (u.length === 0) continue;
|
|
382
382
|
let m = h, b = g, _ = u[0]?.height || 0;
|
|
383
|
-
if (this.centralPointMode == "firstPoint" && (m = u[0]?.lon || 0, b = u[0]?.lat || 0, _ = u[0]?.height || 0),
|
|
383
|
+
if (this.centralPointMode == "firstPoint" && (m = u[0]?.lon || 0, b = u[0]?.lat || 0, _ = u[0]?.height || 0), r === this.levels.length - 1 || u.length < t)
|
|
384
384
|
for (const p of u) {
|
|
385
385
|
if (i >= this.displayLimit) break;
|
|
386
386
|
this._isVisibleAtLevel(p, c) && (this.labelPool.add(p.data, {
|
|
@@ -397,7 +397,7 @@ class lt {
|
|
|
397
397
|
return i;
|
|
398
398
|
const p = c == null ? u : u.filter((B) => this._isVisibleAtLevel(B, c));
|
|
399
399
|
if (!p.length) return i;
|
|
400
|
-
const k = p[0]?.data?.billboard?.[0]?.theme || this.clusterTheme, E = this.groupByTheme ? `cluster-${
|
|
400
|
+
const k = p[0]?.data?.billboard?.[0]?.theme || this.clusterTheme, E = this.groupByTheme ? `cluster-${r}-${n}-${o}-${d}` : `cluster-${r}-${n}-${o}`;
|
|
401
401
|
this.labelPool.add(
|
|
402
402
|
{
|
|
403
403
|
id: E,
|
|
@@ -421,10 +421,10 @@ class lt {
|
|
|
421
421
|
}
|
|
422
422
|
_debugDrawCell(e) {
|
|
423
423
|
if (!this.debugCurrentGrids) return;
|
|
424
|
-
const { levelIdx: t, west: i, south:
|
|
424
|
+
const { levelIdx: t, west: i, south: r, east: n, north: o, lonIdx: s, latIdx: h } = e, g = this.levels[t].level;
|
|
425
425
|
this._drawDebugGrid(
|
|
426
426
|
i,
|
|
427
|
-
|
|
427
|
+
r,
|
|
428
428
|
n,
|
|
429
429
|
o,
|
|
430
430
|
`L:${g} X:${s} Y:${h}`
|
|
@@ -433,16 +433,16 @@ class lt {
|
|
|
433
433
|
refresh() {
|
|
434
434
|
this._update();
|
|
435
435
|
}
|
|
436
|
-
_drawDebugGrid(e, t, i,
|
|
437
|
-
const o = this.Cesium.Rectangle.fromDegrees(e, t, i,
|
|
436
|
+
_drawDebugGrid(e, t, i, r, n) {
|
|
437
|
+
const o = this.Cesium.Rectangle.fromDegrees(e, t, i, r), s = this.Cesium.Cartesian3.fromDegreesArray([
|
|
438
438
|
e,
|
|
439
439
|
t,
|
|
440
440
|
i,
|
|
441
441
|
t,
|
|
442
442
|
i,
|
|
443
|
-
|
|
443
|
+
r,
|
|
444
444
|
e,
|
|
445
|
-
|
|
445
|
+
r,
|
|
446
446
|
e,
|
|
447
447
|
t
|
|
448
448
|
]), h = this.viewer.entities.add({
|
|
@@ -505,188 +505,188 @@ class lt {
|
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
507
|
var ht = "[object Symbol]";
|
|
508
|
-
function Z(
|
|
509
|
-
return typeof
|
|
508
|
+
function Z(a) {
|
|
509
|
+
return typeof a == "symbol" || q(a) && ce(a) == ht;
|
|
510
510
|
}
|
|
511
|
-
function ye(
|
|
512
|
-
for (var t = -1, i =
|
|
513
|
-
|
|
514
|
-
return
|
|
511
|
+
function ye(a, e) {
|
|
512
|
+
for (var t = -1, i = a == null ? 0 : a.length, r = Array(i); ++t < i; )
|
|
513
|
+
r[t] = e(a[t], t, a);
|
|
514
|
+
return r;
|
|
515
515
|
}
|
|
516
516
|
var oe = R ? R.prototype : void 0, se = oe ? oe.toString : void 0;
|
|
517
|
-
function ve(
|
|
518
|
-
if (typeof
|
|
519
|
-
return
|
|
520
|
-
if (
|
|
521
|
-
return ye(
|
|
522
|
-
if (Z(
|
|
523
|
-
return se ? se.call(
|
|
524
|
-
var e =
|
|
525
|
-
return e == "0" && 1 /
|
|
517
|
+
function ve(a) {
|
|
518
|
+
if (typeof a == "string")
|
|
519
|
+
return a;
|
|
520
|
+
if (P(a))
|
|
521
|
+
return ye(a, ve) + "";
|
|
522
|
+
if (Z(a))
|
|
523
|
+
return se ? se.call(a) : "";
|
|
524
|
+
var e = a + "";
|
|
525
|
+
return e == "0" && 1 / a == -1 / 0 ? "-0" : e;
|
|
526
526
|
}
|
|
527
|
-
function be(
|
|
528
|
-
return
|
|
527
|
+
function be(a) {
|
|
528
|
+
return a;
|
|
529
529
|
}
|
|
530
|
-
function ct(
|
|
530
|
+
function ct(a, e, t) {
|
|
531
531
|
switch (t.length) {
|
|
532
532
|
case 0:
|
|
533
|
-
return
|
|
533
|
+
return a.call(e);
|
|
534
534
|
case 1:
|
|
535
|
-
return
|
|
535
|
+
return a.call(e, t[0]);
|
|
536
536
|
case 2:
|
|
537
|
-
return
|
|
537
|
+
return a.call(e, t[0], t[1]);
|
|
538
538
|
case 3:
|
|
539
|
-
return
|
|
539
|
+
return a.call(e, t[0], t[1], t[2]);
|
|
540
540
|
}
|
|
541
|
-
return
|
|
541
|
+
return a.apply(e, t);
|
|
542
542
|
}
|
|
543
543
|
var gt = 800, dt = 16, ut = Date.now;
|
|
544
|
-
function ft(
|
|
544
|
+
function ft(a) {
|
|
545
545
|
var e = 0, t = 0;
|
|
546
546
|
return function() {
|
|
547
|
-
var i = ut(),
|
|
548
|
-
if (t = i,
|
|
547
|
+
var i = ut(), r = dt - (i - t);
|
|
548
|
+
if (t = i, r > 0) {
|
|
549
549
|
if (++e >= gt)
|
|
550
550
|
return arguments[0];
|
|
551
551
|
} else
|
|
552
552
|
e = 0;
|
|
553
|
-
return
|
|
553
|
+
return a.apply(void 0, arguments);
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
|
-
function mt(
|
|
556
|
+
function mt(a) {
|
|
557
557
|
return function() {
|
|
558
|
-
return
|
|
558
|
+
return a;
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
|
-
var pt = ne ? function(
|
|
562
|
-
return ne(
|
|
561
|
+
var pt = ne ? function(a, e) {
|
|
562
|
+
return ne(a, "toString", {
|
|
563
563
|
configurable: !0,
|
|
564
564
|
enumerable: !1,
|
|
565
565
|
value: mt(e),
|
|
566
566
|
writable: !0
|
|
567
567
|
});
|
|
568
568
|
} : be, Ce = ft(pt), le = Math.max;
|
|
569
|
-
function Me(
|
|
570
|
-
return e = le(e === void 0 ?
|
|
571
|
-
for (var i = arguments,
|
|
572
|
-
o[
|
|
573
|
-
|
|
574
|
-
for (var s = Array(e + 1); ++
|
|
575
|
-
s[
|
|
576
|
-
return s[e] = t(o), ct(
|
|
569
|
+
function Me(a, e, t) {
|
|
570
|
+
return e = le(e === void 0 ? a.length - 1 : e, 0), function() {
|
|
571
|
+
for (var i = arguments, r = -1, n = le(i.length - e, 0), o = Array(n); ++r < n; )
|
|
572
|
+
o[r] = i[e + r];
|
|
573
|
+
r = -1;
|
|
574
|
+
for (var s = Array(e + 1); ++r < e; )
|
|
575
|
+
s[r] = i[r];
|
|
576
|
+
return s[e] = t(o), ct(a, this, s);
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
function yt(
|
|
580
|
-
return Ce(Me(
|
|
579
|
+
function yt(a, e) {
|
|
580
|
+
return Ce(Me(a, e, be), a + "");
|
|
581
581
|
}
|
|
582
|
-
function vt(
|
|
582
|
+
function vt(a, e, t) {
|
|
583
583
|
if (!j(t))
|
|
584
584
|
return !1;
|
|
585
585
|
var i = typeof e;
|
|
586
|
-
return (i == "number" ? ge(t) && Ue(e, t.length) : i == "string" && e in t) ? de(t[e],
|
|
586
|
+
return (i == "number" ? ge(t) && Ue(e, t.length) : i == "string" && e in t) ? de(t[e], a) : !1;
|
|
587
587
|
}
|
|
588
|
-
function bt(
|
|
588
|
+
function bt(a) {
|
|
589
589
|
return yt(function(e, t) {
|
|
590
|
-
var i = -1,
|
|
591
|
-
for (n =
|
|
590
|
+
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 && vt(t[0], t[1], o) && (n = r < 3 ? void 0 : n, r = 1), e = Object(e); ++i < r; ) {
|
|
592
592
|
var s = t[i];
|
|
593
|
-
s &&
|
|
593
|
+
s && a(e, s, i, n);
|
|
594
594
|
}
|
|
595
595
|
return e;
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
598
|
var Ct = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Mt = /^\w*$/;
|
|
599
|
-
function _t(
|
|
600
|
-
if (
|
|
599
|
+
function _t(a, e) {
|
|
600
|
+
if (P(a))
|
|
601
601
|
return !1;
|
|
602
|
-
var t = typeof
|
|
603
|
-
return t == "number" || t == "symbol" || t == "boolean" ||
|
|
602
|
+
var t = typeof a;
|
|
603
|
+
return t == "number" || t == "symbol" || t == "boolean" || a == null || Z(a) ? !0 : Mt.test(a) || !Ct.test(a) || e != null && a in Object(e);
|
|
604
604
|
}
|
|
605
605
|
var Lt = "Expected a function";
|
|
606
|
-
function J(
|
|
607
|
-
if (typeof
|
|
606
|
+
function J(a, e) {
|
|
607
|
+
if (typeof a != "function" || e != null && typeof e != "function")
|
|
608
608
|
throw new TypeError(Lt);
|
|
609
609
|
var t = function() {
|
|
610
|
-
var i = arguments,
|
|
611
|
-
if (n.has(
|
|
612
|
-
return n.get(
|
|
613
|
-
var o =
|
|
614
|
-
return t.cache = n.set(
|
|
610
|
+
var i = arguments, r = e ? e.apply(this, i) : i[0], n = t.cache;
|
|
611
|
+
if (n.has(r))
|
|
612
|
+
return n.get(r);
|
|
613
|
+
var o = a.apply(this, i);
|
|
614
|
+
return t.cache = n.set(r, o) || n, o;
|
|
615
615
|
};
|
|
616
616
|
return t.cache = new (J.Cache || ue)(), t;
|
|
617
617
|
}
|
|
618
618
|
J.Cache = ue;
|
|
619
619
|
var Tt = 500;
|
|
620
|
-
function
|
|
621
|
-
var e = J(
|
|
620
|
+
function Pt(a) {
|
|
621
|
+
var e = J(a, function(i) {
|
|
622
622
|
return t.size === Tt && t.clear(), i;
|
|
623
623
|
}), t = e.cache;
|
|
624
624
|
return e;
|
|
625
625
|
}
|
|
626
|
-
var
|
|
626
|
+
var wt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, xt = /\\(\\)?/g, It = Pt(function(a) {
|
|
627
627
|
var e = [];
|
|
628
|
-
return
|
|
629
|
-
e.push(
|
|
628
|
+
return a.charCodeAt(0) === 46 && e.push(""), a.replace(wt, function(t, i, r, n) {
|
|
629
|
+
e.push(r ? n.replace(xt, "$1") : i || t);
|
|
630
630
|
}), e;
|
|
631
631
|
});
|
|
632
|
-
function St(
|
|
633
|
-
return
|
|
632
|
+
function St(a) {
|
|
633
|
+
return a == null ? "" : ve(a);
|
|
634
634
|
}
|
|
635
|
-
function Q(
|
|
636
|
-
return
|
|
635
|
+
function Q(a, e) {
|
|
636
|
+
return P(a) ? a : _t(a, e) ? [a] : It(St(a));
|
|
637
637
|
}
|
|
638
|
-
function X(
|
|
639
|
-
if (typeof
|
|
640
|
-
return
|
|
641
|
-
var e =
|
|
642
|
-
return e == "0" && 1 /
|
|
638
|
+
function X(a) {
|
|
639
|
+
if (typeof a == "string" || Z(a))
|
|
640
|
+
return a;
|
|
641
|
+
var e = a + "";
|
|
642
|
+
return e == "0" && 1 / a == -1 / 0 ? "-0" : e;
|
|
643
643
|
}
|
|
644
|
-
function Et(
|
|
645
|
-
e = Q(e,
|
|
646
|
-
for (var t = 0, i = e.length;
|
|
647
|
-
|
|
648
|
-
return t && t == i ?
|
|
644
|
+
function Et(a, e) {
|
|
645
|
+
e = Q(e, a);
|
|
646
|
+
for (var t = 0, i = e.length; a != null && t < i; )
|
|
647
|
+
a = a[X(e[t++])];
|
|
648
|
+
return t && t == i ? a : void 0;
|
|
649
649
|
}
|
|
650
650
|
var he = R ? R.isConcatSpreadable : void 0;
|
|
651
|
-
function Dt(
|
|
652
|
-
return
|
|
651
|
+
function Dt(a) {
|
|
652
|
+
return P(a) || K(a) || !!(he && a && a[he]);
|
|
653
653
|
}
|
|
654
|
-
function At(
|
|
655
|
-
var n = -1, o =
|
|
656
|
-
for (t || (t = Dt),
|
|
657
|
-
var s =
|
|
658
|
-
t(s) ? qe(
|
|
654
|
+
function At(a, e, t, i, r) {
|
|
655
|
+
var n = -1, o = a.length;
|
|
656
|
+
for (t || (t = Dt), r || (r = []); ++n < o; ) {
|
|
657
|
+
var s = a[n];
|
|
658
|
+
t(s) ? qe(r, s) : r[r.length] = s;
|
|
659
659
|
}
|
|
660
|
-
return
|
|
660
|
+
return r;
|
|
661
661
|
}
|
|
662
|
-
function Ot(
|
|
663
|
-
var e =
|
|
664
|
-
return e ? At(
|
|
662
|
+
function Ot(a) {
|
|
663
|
+
var e = a == null ? 0 : a.length;
|
|
664
|
+
return e ? At(a) : [];
|
|
665
665
|
}
|
|
666
|
-
function Gt(
|
|
667
|
-
return Ce(Me(
|
|
666
|
+
function Gt(a) {
|
|
667
|
+
return Ce(Me(a, void 0, Ot), a + "");
|
|
668
668
|
}
|
|
669
669
|
var Ht = "[object Object]", Rt = Function.prototype, Nt = Object.prototype, _e = Rt.toString, kt = Nt.hasOwnProperty, Bt = _e.call(Object);
|
|
670
|
-
function Le(
|
|
671
|
-
if (!q(
|
|
670
|
+
function Le(a) {
|
|
671
|
+
if (!q(a) || ce(a) != Ht)
|
|
672
672
|
return !1;
|
|
673
|
-
var e = je(
|
|
673
|
+
var e = je(a);
|
|
674
674
|
if (e === null)
|
|
675
675
|
return !0;
|
|
676
676
|
var t = kt.call(e, "constructor") && e.constructor;
|
|
677
677
|
return typeof t == "function" && t instanceof t && _e.call(t) == Bt;
|
|
678
678
|
}
|
|
679
|
-
function Wt(
|
|
680
|
-
var i = -1,
|
|
681
|
-
e < 0 && (e = -e >
|
|
682
|
-
for (var n = Array(
|
|
683
|
-
n[i] =
|
|
679
|
+
function Wt(a, e, t) {
|
|
680
|
+
var i = -1, r = a.length;
|
|
681
|
+
e < 0 && (e = -e > r ? 0 : r + e), t = t > r ? r : t, t < 0 && (t += r), r = e > t ? 0 : t - e >>> 0, e >>>= 0;
|
|
682
|
+
for (var n = Array(r); ++i < r; )
|
|
683
|
+
n[i] = a[i + e];
|
|
684
684
|
return n;
|
|
685
685
|
}
|
|
686
|
-
function Ft(
|
|
686
|
+
function Ft(a) {
|
|
687
687
|
return function(e, t, i) {
|
|
688
|
-
for (var
|
|
689
|
-
var h = o[++
|
|
688
|
+
for (var r = -1, n = Object(e), o = i(e), s = o.length; s--; ) {
|
|
689
|
+
var h = o[++r];
|
|
690
690
|
if (t(n[h], h, n) === !1)
|
|
691
691
|
break;
|
|
692
692
|
}
|
|
@@ -694,84 +694,84 @@ function Ft(r) {
|
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
696
|
var $t = Ft();
|
|
697
|
-
function Y(
|
|
698
|
-
(t !== void 0 && !de(
|
|
697
|
+
function Y(a, e, t) {
|
|
698
|
+
(t !== void 0 && !de(a[e], t) || t === void 0 && !(e in a)) && Ze(a, e, t);
|
|
699
699
|
}
|
|
700
|
-
function zt(
|
|
701
|
-
return q(
|
|
700
|
+
function zt(a) {
|
|
701
|
+
return q(a) && ge(a);
|
|
702
702
|
}
|
|
703
|
-
function U(
|
|
704
|
-
if (!(e === "constructor" && typeof
|
|
705
|
-
return
|
|
703
|
+
function U(a, e) {
|
|
704
|
+
if (!(e === "constructor" && typeof a[e] == "function") && e != "__proto__")
|
|
705
|
+
return a[e];
|
|
706
706
|
}
|
|
707
|
-
function Vt(
|
|
708
|
-
return fe(
|
|
707
|
+
function Vt(a) {
|
|
708
|
+
return fe(a, me(a));
|
|
709
709
|
}
|
|
710
|
-
function Kt(
|
|
711
|
-
var s = U(
|
|
710
|
+
function Kt(a, e, t, i, r, n, o) {
|
|
711
|
+
var s = U(a, t), h = U(e, t), g = o.get(h);
|
|
712
712
|
if (g) {
|
|
713
|
-
Y(
|
|
713
|
+
Y(a, t, g);
|
|
714
714
|
return;
|
|
715
715
|
}
|
|
716
|
-
var l = n ? n(s, h, t + "",
|
|
716
|
+
var l = n ? n(s, h, t + "", a, e, o) : void 0, c = l === void 0;
|
|
717
717
|
if (c) {
|
|
718
|
-
var d =
|
|
719
|
-
l = h, d || f || u ?
|
|
718
|
+
var d = P(h), f = !d && Je(h), u = !d && !f && Qe(h);
|
|
719
|
+
l = h, d || 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
720
|
}
|
|
721
|
-
c && (o.set(h, l),
|
|
721
|
+
c && (o.set(h, l), r(l, h, i, n, o), o.delete(h)), Y(a, t, l);
|
|
722
722
|
}
|
|
723
|
-
function Te(
|
|
724
|
-
|
|
725
|
-
if (
|
|
726
|
-
Kt(
|
|
723
|
+
function Te(a, e, t, i, r) {
|
|
724
|
+
a !== e && $t(e, function(n, o) {
|
|
725
|
+
if (r || (r = new at()), j(n))
|
|
726
|
+
Kt(a, e, o, t, Te, i, r);
|
|
727
727
|
else {
|
|
728
|
-
var s = i ? i(U(
|
|
729
|
-
s === void 0 && (s = n), Y(
|
|
728
|
+
var s = i ? i(U(a, o), n, o + "", a, e, r) : void 0;
|
|
729
|
+
s === void 0 && (s = n), Y(a, o, s);
|
|
730
730
|
}
|
|
731
731
|
}, me);
|
|
732
732
|
}
|
|
733
|
-
function Xt(
|
|
734
|
-
var e =
|
|
735
|
-
return e ?
|
|
733
|
+
function Xt(a) {
|
|
734
|
+
var e = a == null ? 0 : a.length;
|
|
735
|
+
return e ? a[e - 1] : void 0;
|
|
736
736
|
}
|
|
737
|
-
function Yt(
|
|
738
|
-
return e.length < 2 ?
|
|
737
|
+
function Yt(a, e) {
|
|
738
|
+
return e.length < 2 ? a : Et(a, Wt(e, 0, -1));
|
|
739
739
|
}
|
|
740
|
-
var Ut = bt(function(
|
|
741
|
-
Te(
|
|
740
|
+
var Ut = bt(function(a, e, t) {
|
|
741
|
+
Te(a, e, t);
|
|
742
742
|
}), qt = Object.prototype, jt = qt.hasOwnProperty;
|
|
743
|
-
function Zt(
|
|
744
|
-
e = Q(e,
|
|
743
|
+
function Zt(a, e) {
|
|
744
|
+
e = Q(e, a);
|
|
745
745
|
var t = -1, i = e.length;
|
|
746
746
|
if (!i)
|
|
747
747
|
return !0;
|
|
748
748
|
for (; ++t < i; ) {
|
|
749
|
-
var
|
|
750
|
-
if (
|
|
749
|
+
var r = X(e[t]);
|
|
750
|
+
if (r === "__proto__" && !jt.call(a, "__proto__") || (r === "constructor" || r === "prototype") && t < i - 1)
|
|
751
751
|
return !1;
|
|
752
752
|
}
|
|
753
|
-
var n = Yt(
|
|
753
|
+
var n = Yt(a, e);
|
|
754
754
|
return n == null || delete n[X(Xt(e))];
|
|
755
755
|
}
|
|
756
|
-
function Jt(
|
|
757
|
-
return Le(
|
|
756
|
+
function Jt(a) {
|
|
757
|
+
return Le(a) ? void 0 : a;
|
|
758
758
|
}
|
|
759
|
-
var Qt = 1, ei = 2, ti = 4, ii = Gt(function(
|
|
759
|
+
var Qt = 1, ei = 2, ti = 4, ii = Gt(function(a, e) {
|
|
760
760
|
var t = {};
|
|
761
|
-
if (
|
|
761
|
+
if (a == null)
|
|
762
762
|
return t;
|
|
763
763
|
var i = !1;
|
|
764
764
|
e = ye(e, function(n) {
|
|
765
|
-
return n = Q(n,
|
|
766
|
-
}), fe(
|
|
767
|
-
for (var
|
|
768
|
-
Zt(t, e[
|
|
765
|
+
return n = Q(n, a), i || (i = n.length > 1), n;
|
|
766
|
+
}), fe(a, nt(a), t), i && (t = ot(t, Qt | ei | ti, Jt));
|
|
767
|
+
for (var r = e.length; r--; )
|
|
768
|
+
Zt(t, e[r]);
|
|
769
769
|
return t;
|
|
770
770
|
});
|
|
771
|
-
function ri(
|
|
771
|
+
function ri(a, e) {
|
|
772
772
|
const t = e.materialType || "DynamicImgMaterial" + Date.now() + Math.floor(Math.random() * 1e3);
|
|
773
773
|
function i(n) {
|
|
774
|
-
this._definitionChanged = new
|
|
774
|
+
this._definitionChanged = new a.Event(), this._color = n.color, this._colorSubscription = void 0, this.color = n.color, this.duration = n.duration, this._time = Date.now();
|
|
775
775
|
}
|
|
776
776
|
Object.defineProperties(i.prototype, {
|
|
777
777
|
isConstant: {
|
|
@@ -784,20 +784,20 @@ function ri(r, e) {
|
|
|
784
784
|
return this._definitionChanged;
|
|
785
785
|
}
|
|
786
786
|
},
|
|
787
|
-
color:
|
|
787
|
+
color: a.createPropertyDescriptor("color")
|
|
788
788
|
}), i.prototype.getType = function() {
|
|
789
789
|
return t;
|
|
790
790
|
}, i.prototype.getValue = function(n, o) {
|
|
791
|
-
return
|
|
791
|
+
return a.defined(o) || (o = {}), o.color = a.Property.getValueOrClonedDefault(
|
|
792
792
|
this._color,
|
|
793
793
|
n,
|
|
794
|
-
|
|
794
|
+
a.Color.WHITE,
|
|
795
795
|
o.color
|
|
796
796
|
), o.image = e.image, o;
|
|
797
797
|
}, i.prototype.equals = function(n) {
|
|
798
|
-
return this === n || n instanceof i &&
|
|
798
|
+
return this === n || n instanceof i && a.Property.equals(this._color, n._color);
|
|
799
799
|
};
|
|
800
|
-
const
|
|
800
|
+
const r = function(n) {
|
|
801
801
|
return `
|
|
802
802
|
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
803
803
|
{
|
|
@@ -810,7 +810,7 @@ function ri(r, e) {
|
|
|
810
810
|
return material;
|
|
811
811
|
}`;
|
|
812
812
|
};
|
|
813
|
-
return
|
|
813
|
+
return a.Material._materialCache.addMaterial(t, {
|
|
814
814
|
fabric: {
|
|
815
815
|
type: t,
|
|
816
816
|
uniforms: {
|
|
@@ -818,7 +818,7 @@ function ri(r, e) {
|
|
|
818
818
|
image: e.image,
|
|
819
819
|
time: 1e3
|
|
820
820
|
},
|
|
821
|
-
source:
|
|
821
|
+
source: r({
|
|
822
822
|
count: e.count,
|
|
823
823
|
freely: e.freely || "",
|
|
824
824
|
direction: e.direction,
|
|
@@ -830,10 +830,10 @@ function ri(r, e) {
|
|
|
830
830
|
}
|
|
831
831
|
}), new i(e);
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function Pe(a, e) {
|
|
834
834
|
const t = e.MaterialType || "wallType" + (/* @__PURE__ */ new Date()).getTime() + parseInt(Math.random() * 1e3 + "");
|
|
835
835
|
function i(n) {
|
|
836
|
-
this._definitionChanged = new
|
|
836
|
+
this._definitionChanged = new a.Event(), this._color = void 0, this._colorSubscription = void 0, this.color = n.color, this.duration = n.duration, this._time = (/* @__PURE__ */ new Date()).getTime();
|
|
837
837
|
}
|
|
838
838
|
Object.defineProperties(i.prototype, {
|
|
839
839
|
isConstant: {
|
|
@@ -846,15 +846,15 @@ function we(r, e) {
|
|
|
846
846
|
return this._definitionChanged;
|
|
847
847
|
}
|
|
848
848
|
},
|
|
849
|
-
color:
|
|
849
|
+
color: a.createPropertyDescriptor("color")
|
|
850
850
|
}), i.prototype.getType = function() {
|
|
851
851
|
return t;
|
|
852
852
|
}, i.prototype.getValue = function(n, o) {
|
|
853
|
-
return
|
|
853
|
+
return a.defined(o) || (o = {}), o.image = e.image, this.duration && (o.time = ((/* @__PURE__ */ new Date()).getTime() - this._time) % this.duration / this.duration), o;
|
|
854
854
|
}, i.prototype.equals = function(n) {
|
|
855
|
-
return this === n || n instanceof i &&
|
|
855
|
+
return this === n || n instanceof i && a.Property.equals(this._color, n._color);
|
|
856
856
|
};
|
|
857
|
-
const
|
|
857
|
+
const r = function(n) {
|
|
858
858
|
let o = `czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
859
859
|
{
|
|
860
860
|
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
@@ -874,15 +874,15 @@ function we(r, e) {
|
|
|
874
874
|
}
|
|
875
875
|
`, o;
|
|
876
876
|
};
|
|
877
|
-
return
|
|
877
|
+
return a.Material._materialCache.addMaterial(t, {
|
|
878
878
|
fabric: {
|
|
879
879
|
type: t,
|
|
880
880
|
uniforms: {
|
|
881
|
-
color: e.color || new
|
|
881
|
+
color: e.color || new a.Color(1, 1, 1, 1),
|
|
882
882
|
image: e.image,
|
|
883
883
|
time: 0
|
|
884
884
|
},
|
|
885
|
-
source:
|
|
885
|
+
source: r({
|
|
886
886
|
count: e.count,
|
|
887
887
|
freely: e.freely,
|
|
888
888
|
direction: e.direction
|
|
@@ -893,11 +893,11 @@ function we(r, e) {
|
|
|
893
893
|
}
|
|
894
894
|
}), new i(e);
|
|
895
895
|
}
|
|
896
|
-
function ai(
|
|
897
|
-
const t =
|
|
896
|
+
function ai(a, e) {
|
|
897
|
+
const t = a.Color, i = Object.defineProperties, r = a.Event, n = a.createPropertyDescriptor, o = a.Property, s = (c, d) => c === void 0 ? d : c, h = {};
|
|
898
898
|
let g = e.materialType || "PolylineFlow" + Date.now() + Math.floor(Math.random() * 1e3);
|
|
899
899
|
function l(c) {
|
|
900
|
-
c = s(c, h), this._definitionChanged = new
|
|
900
|
+
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
901
|
}
|
|
902
902
|
return i(l.prototype, {
|
|
903
903
|
isConstant: {
|
|
@@ -916,7 +916,7 @@ function ai(r, e) {
|
|
|
916
916
|
return d || (d = {}), d.color = o.getValueOrClonedDefault(
|
|
917
917
|
this._color,
|
|
918
918
|
c,
|
|
919
|
-
|
|
919
|
+
a.Color.WHITE,
|
|
920
920
|
d.color
|
|
921
921
|
), d.duration = this._duration, d;
|
|
922
922
|
}, l.prototype.equals = function(c) {
|
|
@@ -924,7 +924,7 @@ function ai(r, e) {
|
|
|
924
924
|
}, i(l.prototype, {
|
|
925
925
|
color: n("color"),
|
|
926
926
|
duration: n("duration")
|
|
927
|
-
}),
|
|
927
|
+
}), a.PolylineFlowMaterialProperty = l, a.Material._materialCache.addMaterial(g, {
|
|
928
928
|
fabric: {
|
|
929
929
|
type: g,
|
|
930
930
|
uniforms: {
|
|
@@ -956,7 +956,7 @@ function ai(r, e) {
|
|
|
956
956
|
}
|
|
957
957
|
}), new l(e);
|
|
958
958
|
}
|
|
959
|
-
class
|
|
959
|
+
class we {
|
|
960
960
|
categoryMap = /* @__PURE__ */ new Map();
|
|
961
961
|
CategoryGet = {};
|
|
962
962
|
constructor() {
|
|
@@ -969,11 +969,11 @@ class Pe {
|
|
|
969
969
|
* 注册材质
|
|
970
970
|
*/
|
|
971
971
|
register(e) {
|
|
972
|
-
const { themeKey: t, material: i, force:
|
|
972
|
+
const { themeKey: t, material: i, force: r = !1, category: n = "default" } = e;
|
|
973
973
|
this.categoryMap.has(n) || this.categoryMap.set(n, /* @__PURE__ */ new Map());
|
|
974
974
|
const o = this.categoryMap.get(n);
|
|
975
975
|
if (o.has(t))
|
|
976
|
-
if (
|
|
976
|
+
if (r)
|
|
977
977
|
console.info(`[MaterialManager] themeKey '${t}' 在分类 '${n}' 已被覆盖`);
|
|
978
978
|
else {
|
|
979
979
|
console.warn(
|
|
@@ -997,8 +997,8 @@ class Pe {
|
|
|
997
997
|
materialMap: this.categoryMap,
|
|
998
998
|
options: i || {}
|
|
999
999
|
});
|
|
1000
|
-
const
|
|
1001
|
-
return typeof
|
|
1000
|
+
const r = this.categoryMap.get(t)?.get(e);
|
|
1001
|
+
return typeof r == "function" && r.__materialFactory === !0 ? r(i || {}) : r;
|
|
1002
1002
|
}
|
|
1003
1003
|
/**
|
|
1004
1004
|
* 是否存在
|
|
@@ -1012,8 +1012,8 @@ class Pe {
|
|
|
1012
1012
|
remove(e, t = "default") {
|
|
1013
1013
|
const i = this.categoryMap.get(t);
|
|
1014
1014
|
if (!i) return;
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1015
|
+
const r = i.get(e);
|
|
1016
|
+
r?.destroy && r.destroy(), i.delete(e), i.size === 0 && this.categoryMap.delete(t);
|
|
1017
1017
|
}
|
|
1018
1018
|
/**
|
|
1019
1019
|
* 获取某分类下的所有 keys
|
|
@@ -1056,8 +1056,8 @@ class ni {
|
|
|
1056
1056
|
aggregator;
|
|
1057
1057
|
cardPool;
|
|
1058
1058
|
constructor(e) {
|
|
1059
|
-
const { id: t, entities: i = [], primitives:
|
|
1060
|
-
this.id = t, this.entities = i, this.primitives =
|
|
1059
|
+
const { id: t, entities: i = [], primitives: r = [], dataItem: n = {}, aggregator: o, cardPool: s } = e;
|
|
1060
|
+
this.id = t, this.entities = i, this.primitives = r, this.dataItem = n, this.aggregator = o, this.cardPool = s;
|
|
1061
1061
|
}
|
|
1062
1062
|
// 改造 setVisible 方法,支持 Entity 和 Primitive 的可见性控制
|
|
1063
1063
|
setVisible(e) {
|
|
@@ -1065,7 +1065,7 @@ class ni {
|
|
|
1065
1065
|
t && (t.show = e);
|
|
1066
1066
|
}), this.primitives.forEach((t) => {
|
|
1067
1067
|
t && (t.show = e);
|
|
1068
|
-
}), this.aggregator && Array.isArray(this.dataItem.billboard) && this.dataItem.billboard.map((i,
|
|
1068
|
+
}), this.aggregator && Array.isArray(this.dataItem.billboard) && this.dataItem.billboard.map((i, r) => ({
|
|
1069
1069
|
id: this.dataItem.id,
|
|
1070
1070
|
data: {
|
|
1071
1071
|
...this.dataItem,
|
|
@@ -1092,8 +1092,8 @@ class oi {
|
|
|
1092
1092
|
materialManager;
|
|
1093
1093
|
aggregator;
|
|
1094
1094
|
cardPool;
|
|
1095
|
-
constructor(e, t, i,
|
|
1096
|
-
this.id = e, this.Cesium = t, this.viewer = i, this.materialManager =
|
|
1095
|
+
constructor(e, t, i, r, n, o) {
|
|
1096
|
+
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
1097
|
name: "BufferedHierarchicalAggregator_maker_click",
|
|
1098
1098
|
fn: (h, g) => {
|
|
1099
1099
|
this.cardPool.showByIds([h.data.id]);
|
|
@@ -1109,14 +1109,14 @@ class oi {
|
|
|
1109
1109
|
themeKey: e.theme,
|
|
1110
1110
|
category: "polyline",
|
|
1111
1111
|
options: e
|
|
1112
|
-
}),
|
|
1112
|
+
}), r = Array.isArray(e.positions[0]) ? e.positions.flat() : e.positions;
|
|
1113
1113
|
let n = {
|
|
1114
1114
|
...e
|
|
1115
1115
|
};
|
|
1116
1116
|
return i && (n.material = i), this.viewer.entities.add({
|
|
1117
1117
|
polyline: {
|
|
1118
1118
|
...n,
|
|
1119
|
-
positions: this.Cesium.Cartesian3.fromDegreesArrayHeights(
|
|
1119
|
+
positions: this.Cesium.Cartesian3.fromDegreesArrayHeights(r)
|
|
1120
1120
|
},
|
|
1121
1121
|
show: (e.show ?? !0) && t
|
|
1122
1122
|
});
|
|
@@ -1127,10 +1127,10 @@ class oi {
|
|
|
1127
1127
|
themeKey: e.theme,
|
|
1128
1128
|
category: "wall",
|
|
1129
1129
|
options: e
|
|
1130
|
-
}),
|
|
1130
|
+
}), r = (y, p = 0) => {
|
|
1131
1131
|
const S = Number(y);
|
|
1132
1132
|
return Number.isFinite(S) ? S : p;
|
|
1133
|
-
}, n = e.positions.map((y) =>
|
|
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((p) => Math.abs(r(p, 0)) < 1e-6), g = n.some((y) => Math.abs(y) > 1e-6), d = (Array.isArray(e.minimumHeights) && e.minimumHeights.length === e.positions.length && !(h(e.minimumHeights) && g) ? e.minimumHeights.map((y) => r(y, 0)) : n).map((y) => y - o), m = (Array.isArray(e.maximumHeights) && e.maximumHeights.length === e.positions.length && !(h(e.maximumHeights) && g) ? e.maximumHeights.map((y) => r(y, 0)) : n).map((y) => y + s), b = e.positions.map(
|
|
1134
1134
|
(y) => this.Cesium.Cartesian3.fromDegrees(y[0], y[1], y[2] || 0)
|
|
1135
1135
|
);
|
|
1136
1136
|
let _ = {
|
|
@@ -1152,7 +1152,7 @@ class oi {
|
|
|
1152
1152
|
themeKey: e.theme,
|
|
1153
1153
|
category: "polygon",
|
|
1154
1154
|
options: e
|
|
1155
|
-
}),
|
|
1155
|
+
}), r = Array.isArray(e.hierarchy[0]) ? e.hierarchy.flat() : e.hierarchy, n = this.Cesium.Cartesian3.fromDegreesArrayHeights(r), o = e.holes?.map((g) => {
|
|
1156
1156
|
let l = Array.isArray(g[0]) ? e.hierarchy.flat() : e.hole;
|
|
1157
1157
|
return this.Cesium.Cartesian3.fromDegreesArrayHeights(l.flat());
|
|
1158
1158
|
}) || [], s = new this.Cesium.PolygonHierarchy(n, o);
|
|
@@ -1170,11 +1170,11 @@ class oi {
|
|
|
1170
1170
|
}
|
|
1171
1171
|
createBillboardPoints(e) {
|
|
1172
1172
|
return !e.billboard?.length || !this.aggregator ? [] : e.billboard.map((t) => {
|
|
1173
|
-
const [i,
|
|
1173
|
+
const [i, r, n = 0] = t.position || [0, 0, 0];
|
|
1174
1174
|
return {
|
|
1175
1175
|
id: e.id,
|
|
1176
1176
|
lon: i,
|
|
1177
|
-
lat:
|
|
1177
|
+
lat: r,
|
|
1178
1178
|
height: n,
|
|
1179
1179
|
name: t.options?.text || "",
|
|
1180
1180
|
data: e,
|
|
@@ -1198,22 +1198,22 @@ class oi {
|
|
|
1198
1198
|
addGroup(e, t = !0) {
|
|
1199
1199
|
const i = e.id || `${Date.now()}`;
|
|
1200
1200
|
this.removeGroup(i);
|
|
1201
|
-
const
|
|
1201
|
+
const r = [], n = e.show !== !1;
|
|
1202
1202
|
(e.polyline || []).forEach((h) => {
|
|
1203
1203
|
const g = this.createPolyline(h, n);
|
|
1204
|
-
g &&
|
|
1204
|
+
g && r.push(g);
|
|
1205
1205
|
}), (e.wall || []).forEach((h) => {
|
|
1206
1206
|
const g = this.createWall(h, n);
|
|
1207
|
-
g &&
|
|
1207
|
+
g && r.push(g);
|
|
1208
1208
|
}), (e.polygon || []).forEach((h) => {
|
|
1209
1209
|
const g = this.createPolygon(h, n);
|
|
1210
|
-
g &&
|
|
1210
|
+
g && r.push(g);
|
|
1211
1211
|
});
|
|
1212
1212
|
const o = this.createBillboardPoints(e);
|
|
1213
1213
|
o.length && t && this.aggregator.appendPoints(o, !1), this.createCard(e);
|
|
1214
1214
|
const s = new ni({
|
|
1215
1215
|
id: i,
|
|
1216
|
-
entities:
|
|
1216
|
+
entities: r,
|
|
1217
1217
|
primitives: [],
|
|
1218
1218
|
dataItem: e,
|
|
1219
1219
|
aggregator: this.aggregator,
|
|
@@ -1222,7 +1222,7 @@ class oi {
|
|
|
1222
1222
|
return this.groupMap.set(i, s), o;
|
|
1223
1223
|
}
|
|
1224
1224
|
async addGroups(e) {
|
|
1225
|
-
const i = e.map((
|
|
1225
|
+
const i = e.map((r) => this.addGroup(r, !1)).flat();
|
|
1226
1226
|
i.length > 0 && this.aggregator && this.aggregator.appendPoints(i, !1);
|
|
1227
1227
|
}
|
|
1228
1228
|
removeGroup(e) {
|
|
@@ -1232,9 +1232,9 @@ class oi {
|
|
|
1232
1232
|
removeGroups(e) {
|
|
1233
1233
|
let t = [];
|
|
1234
1234
|
for (const i of e) {
|
|
1235
|
-
const
|
|
1236
|
-
if (
|
|
1237
|
-
let n =
|
|
1235
|
+
const r = this.groupMap.get(i);
|
|
1236
|
+
if (r) {
|
|
1237
|
+
let n = r.removeAll(this.viewer, !1);
|
|
1238
1238
|
this.groupMap.delete(i), t.push(n);
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
@@ -1245,10 +1245,10 @@ class oi {
|
|
|
1245
1245
|
t && (t.removeAll(this.viewer), this.groupMap.delete(e.id)), this.addGroup(e);
|
|
1246
1246
|
}
|
|
1247
1247
|
async updateGroups(e) {
|
|
1248
|
-
this.aggregator.removePointsById(e.map((
|
|
1249
|
-
const i = e.map((
|
|
1250
|
-
const n = this.groupMap.get(
|
|
1251
|
-
return n && (n.removeAll(this.viewer, !1), this.groupMap.delete(
|
|
1248
|
+
this.aggregator.removePointsById(e.map((r) => r.id)), this.cardPool.removeByIds(e.map((r) => r.id));
|
|
1249
|
+
const i = e.map((r) => {
|
|
1250
|
+
const n = this.groupMap.get(r.id);
|
|
1251
|
+
return n && (n.removeAll(this.viewer, !1), this.groupMap.delete(r.id)), this.addGroup(r, !1);
|
|
1252
1252
|
}).flat();
|
|
1253
1253
|
i.length > 0 && this.aggregator && this.aggregator.appendPoints(i, !1);
|
|
1254
1254
|
}
|
|
@@ -1266,8 +1266,8 @@ class si {
|
|
|
1266
1266
|
materialManager;
|
|
1267
1267
|
aggregator;
|
|
1268
1268
|
cardPool;
|
|
1269
|
-
constructor(e, t, i,
|
|
1270
|
-
this.Cesium = e, this.viewer = t, this.materialManager = i, this.aggregator =
|
|
1269
|
+
constructor(e, t, i, r, n) {
|
|
1270
|
+
this.Cesium = e, this.viewer = t, this.materialManager = i, this.aggregator = r, this.cardPool = n;
|
|
1271
1271
|
}
|
|
1272
1272
|
addLayer(e) {
|
|
1273
1273
|
this.layerMap.has(e) || this.layerMap.set(
|
|
@@ -1315,15 +1315,15 @@ class li {
|
|
|
1315
1315
|
MaterialManager;
|
|
1316
1316
|
instance;
|
|
1317
1317
|
constructor(e) {
|
|
1318
|
-
this.labelId = e.labelId, this.cardId = e.cardId, this.opt = e, this.MaterialManager = e.MaterialManager || new
|
|
1318
|
+
this.labelId = e.labelId, this.cardId = e.cardId, this.opt = e, this.MaterialManager = e.MaterialManager || new we(), this.instance = this.initCore(e, e.eventBus, e.cardEventBus);
|
|
1319
1319
|
}
|
|
1320
1320
|
//初始化标记管理
|
|
1321
1321
|
initCore(e, t, i) {
|
|
1322
|
-
let { Cesium:
|
|
1322
|
+
let { Cesium: r, viewer: n, aggregatorOptions: o } = e;
|
|
1323
1323
|
t || (t = new V()), i || (i = new V());
|
|
1324
|
-
const s = new ie(
|
|
1324
|
+
const s = new ie(r, n, this.labelId, t);
|
|
1325
1325
|
s.setOcclusionOptions({ distanceEpsilon: 1 }), s.setOcclusionEnabled(!1);
|
|
1326
|
-
const h = new ie(
|
|
1326
|
+
const h = new ie(r, n, this.cardId, i, !1), g = new lt(r, n, {
|
|
1327
1327
|
//聚合
|
|
1328
1328
|
threshold: o?.threshold || 16,
|
|
1329
1329
|
displayLimit: o?.displayLimit || 300,
|
|
@@ -1339,7 +1339,7 @@ class li {
|
|
|
1339
1339
|
labelPool: s
|
|
1340
1340
|
}), l = this.MaterialManager, c = new si(
|
|
1341
1341
|
//实体图层管理
|
|
1342
|
-
|
|
1342
|
+
r,
|
|
1343
1343
|
n,
|
|
1344
1344
|
l,
|
|
1345
1345
|
g,
|
|
@@ -1359,21 +1359,21 @@ class li {
|
|
|
1359
1359
|
//添加
|
|
1360
1360
|
add(e) {
|
|
1361
1361
|
let t = [];
|
|
1362
|
-
|
|
1362
|
+
P(e) ? t = e : t.push(e), t.forEach((i) => {
|
|
1363
1363
|
this.entityList.set(i.id, i);
|
|
1364
1364
|
}), this.instance.entityLayerManager.getLayer("Layer_default") || this.instance.entityLayerManager.addLayer("Layer_default"), this.instance.entityLayerManager.addGroupsToLayer("Layer_default", t);
|
|
1365
1365
|
}
|
|
1366
1366
|
//更新标记
|
|
1367
1367
|
update(e, t = !0) {
|
|
1368
1368
|
let i = [];
|
|
1369
|
-
|
|
1370
|
-
const
|
|
1369
|
+
P(e) ? i = e : i.push(e);
|
|
1370
|
+
const r = i.map((n) => {
|
|
1371
1371
|
const o = this.entityList.get(n.id);
|
|
1372
1372
|
if (!o) return;
|
|
1373
1373
|
let s = Ut({}, o, n);
|
|
1374
1374
|
return this.entityList.set(n.id, s), s;
|
|
1375
1375
|
}).filter(Boolean);
|
|
1376
|
-
t && this.instance.entityLayerManager.updateGroupToLayer("Layer_default",
|
|
1376
|
+
t && this.instance.entityLayerManager.updateGroupToLayer("Layer_default", r);
|
|
1377
1377
|
}
|
|
1378
1378
|
//获取标记
|
|
1379
1379
|
getById(e) {
|
|
@@ -1389,7 +1389,7 @@ class li {
|
|
|
1389
1389
|
//删除标记
|
|
1390
1390
|
delete(e) {
|
|
1391
1391
|
let t = [];
|
|
1392
|
-
|
|
1392
|
+
P(e) ? t = e : t.push(e), t.forEach((i) => {
|
|
1393
1393
|
this.entityList.delete(i);
|
|
1394
1394
|
}), this.instance.entityLayerManager.removeGroups("Layer_default", t);
|
|
1395
1395
|
}
|
|
@@ -1416,24 +1416,24 @@ class li {
|
|
|
1416
1416
|
return this.instance?.labelPool?.getOcclusionOptions?.() || null;
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
|
-
const
|
|
1419
|
+
const w = {
|
|
1420
1420
|
wallTileWidth: 2,
|
|
1421
1421
|
wallTileHeight: 1,
|
|
1422
1422
|
polygonTileWidth: 2,
|
|
1423
1423
|
polygonTileHeight: 2
|
|
1424
1424
|
};
|
|
1425
|
-
function v(
|
|
1426
|
-
const t = Number(
|
|
1425
|
+
function v(a, e) {
|
|
1426
|
+
const t = Number(a);
|
|
1427
1427
|
return Number.isFinite(t) ? t : e;
|
|
1428
1428
|
}
|
|
1429
|
-
function C(
|
|
1430
|
-
return Number.isFinite(
|
|
1429
|
+
function C(a) {
|
|
1430
|
+
return Number.isFinite(a) ? Math.max(1, a) : 1;
|
|
1431
1431
|
}
|
|
1432
|
-
function hi(
|
|
1433
|
-
return Number.isFinite(
|
|
1432
|
+
function hi(a, e) {
|
|
1433
|
+
return Number.isFinite(a) ? Math.min(1, Math.max(0, a)) : e;
|
|
1434
1434
|
}
|
|
1435
|
-
function ci(
|
|
1436
|
-
const e =
|
|
1435
|
+
function ci(a) {
|
|
1436
|
+
const e = a?.repeat;
|
|
1437
1437
|
if (Array.isArray(e) && e.length >= 2)
|
|
1438
1438
|
return {
|
|
1439
1439
|
x: C(v(e[0], 1)),
|
|
@@ -1444,34 +1444,34 @@ function ci(r) {
|
|
|
1444
1444
|
x: C(v(e.x, 1)),
|
|
1445
1445
|
y: C(v(e.y, 1))
|
|
1446
1446
|
};
|
|
1447
|
-
const t = Number(
|
|
1447
|
+
const t = Number(a?.repeatX), i = Number(a?.repeatY);
|
|
1448
1448
|
return Number.isFinite(t) && Number.isFinite(i) ? {
|
|
1449
1449
|
x: C(t),
|
|
1450
1450
|
y: C(i)
|
|
1451
1451
|
} : null;
|
|
1452
1452
|
}
|
|
1453
|
-
function xe(
|
|
1453
|
+
function xe(a, e) {
|
|
1454
1454
|
const t = Array.isArray(e?.positions) ? e.positions : [];
|
|
1455
1455
|
if (t.length < 2) return 1;
|
|
1456
1456
|
let i = 0;
|
|
1457
|
-
for (let
|
|
1458
|
-
const n = t[
|
|
1457
|
+
for (let r = 1; r < t.length; r++) {
|
|
1458
|
+
const n = t[r - 1], o = t[r];
|
|
1459
1459
|
if (!Array.isArray(n) || !Array.isArray(o)) continue;
|
|
1460
|
-
const s =
|
|
1460
|
+
const s = a.Cartesian3.fromDegrees(
|
|
1461
1461
|
v(n[0], 0),
|
|
1462
1462
|
v(n[1], 0),
|
|
1463
1463
|
v(n[2], 0)
|
|
1464
|
-
), h =
|
|
1464
|
+
), h = a.Cartesian3.fromDegrees(
|
|
1465
1465
|
v(o[0], 0),
|
|
1466
1466
|
v(o[1], 0),
|
|
1467
1467
|
v(o[2], 0)
|
|
1468
1468
|
);
|
|
1469
|
-
i +=
|
|
1469
|
+
i += a.Cartesian3.distance(s, h);
|
|
1470
1470
|
}
|
|
1471
1471
|
return i > 0 ? i : 1;
|
|
1472
1472
|
}
|
|
1473
|
-
function Ie(
|
|
1474
|
-
const e =
|
|
1473
|
+
function Ie(a) {
|
|
1474
|
+
const e = a?.maximumHeights, t = a?.minimumHeights;
|
|
1475
1475
|
if (Array.isArray(e) && Array.isArray(t) && e.length > 0 && e.length === t.length) {
|
|
1476
1476
|
let n = 0, o = 0;
|
|
1477
1477
|
for (let s = 0; s < e.length; s++) {
|
|
@@ -1480,57 +1480,57 @@ function Ie(r) {
|
|
|
1480
1480
|
}
|
|
1481
1481
|
if (o > 0) return n / o;
|
|
1482
1482
|
}
|
|
1483
|
-
const i = Math.abs(v(
|
|
1484
|
-
return i > 0 ||
|
|
1483
|
+
const i = Math.abs(v(a?.minHeight, 0)), r = Math.abs(v(a?.maxHeight, 0));
|
|
1484
|
+
return i > 0 || r > 0 ? i + r : 3;
|
|
1485
1485
|
}
|
|
1486
|
-
function Se(
|
|
1486
|
+
function Se(a, e) {
|
|
1487
1487
|
const t = e?.hierarchy;
|
|
1488
1488
|
if (!Array.isArray(t) || t.length < 3)
|
|
1489
1489
|
return { width: 1, height: 1 };
|
|
1490
1490
|
const i = Array.isArray(t[0]) ? t.flat() : t;
|
|
1491
1491
|
if (!Array.isArray(i) || i.length < 3) return { width: 1, height: 1 };
|
|
1492
|
-
let
|
|
1492
|
+
let r = Number.POSITIVE_INFINITY, n = Number.NEGATIVE_INFINITY, o = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY;
|
|
1493
1493
|
for (let u = 0; u < i.length; u += 3) {
|
|
1494
1494
|
const m = Number(i[u]), b = Number(i[u + 1]);
|
|
1495
|
-
!Number.isFinite(m) || !Number.isFinite(b) || (
|
|
1495
|
+
!Number.isFinite(m) || !Number.isFinite(b) || (r = Math.min(r, m), n = Math.max(n, m), o = Math.min(o, b), s = Math.max(s, b));
|
|
1496
1496
|
}
|
|
1497
|
-
if (!Number.isFinite(
|
|
1497
|
+
if (!Number.isFinite(r) || !Number.isFinite(o))
|
|
1498
1498
|
return { width: 1, height: 1 };
|
|
1499
|
-
const h = (o + s) / 2, g =
|
|
1499
|
+
const h = (o + s) / 2, g = a.Ellipsoid.WGS84.maximumRadius, l = a.Math.toRadians(Math.abs(n - r)), c = a.Math.toRadians(Math.abs(s - o)), d = l * g * Math.cos(a.Math.toRadians(h)), f = c * g;
|
|
1500
1500
|
return {
|
|
1501
1501
|
width: d > 0 ? d : 1,
|
|
1502
1502
|
height: f > 0 ? f : 1
|
|
1503
1503
|
};
|
|
1504
1504
|
}
|
|
1505
1505
|
function Ee({
|
|
1506
|
-
Cesium:
|
|
1506
|
+
Cesium: a,
|
|
1507
1507
|
themeOptions: e,
|
|
1508
1508
|
entityOptions: t,
|
|
1509
1509
|
category: i
|
|
1510
1510
|
}) {
|
|
1511
|
-
const
|
|
1512
|
-
if (
|
|
1511
|
+
const r = ci(e);
|
|
1512
|
+
if (r) return r;
|
|
1513
1513
|
if (e?.autoRepeat === !1)
|
|
1514
1514
|
return { x: 1, y: 1 };
|
|
1515
1515
|
if (i === "wall") {
|
|
1516
|
-
const h = xe(
|
|
1516
|
+
const h = xe(a, t), g = Ie(t), l = v(
|
|
1517
1517
|
e?.tileWidth ?? e?.textureWidth,
|
|
1518
|
-
|
|
1518
|
+
w.wallTileWidth
|
|
1519
1519
|
), c = v(
|
|
1520
1520
|
e?.tileHeight ?? e?.textureHeight,
|
|
1521
|
-
|
|
1521
|
+
w.wallTileHeight
|
|
1522
1522
|
);
|
|
1523
1523
|
return {
|
|
1524
1524
|
x: C(h / Math.max(l, 0.01)),
|
|
1525
1525
|
y: C(g / Math.max(c, 0.01))
|
|
1526
1526
|
};
|
|
1527
1527
|
}
|
|
1528
|
-
const n = Se(
|
|
1528
|
+
const n = Se(a, t), o = v(
|
|
1529
1529
|
e?.tileWidth ?? e?.textureWidth,
|
|
1530
|
-
|
|
1530
|
+
w.polygonTileWidth
|
|
1531
1531
|
), s = v(
|
|
1532
1532
|
e?.tileHeight ?? e?.textureHeight,
|
|
1533
|
-
|
|
1533
|
+
w.polygonTileHeight
|
|
1534
1534
|
);
|
|
1535
1535
|
return {
|
|
1536
1536
|
x: C(n.width / Math.max(o, 0.01)),
|
|
@@ -1538,60 +1538,60 @@ function Ee({
|
|
|
1538
1538
|
};
|
|
1539
1539
|
}
|
|
1540
1540
|
function De({
|
|
1541
|
-
Cesium:
|
|
1541
|
+
Cesium: a,
|
|
1542
1542
|
themeOptions: e,
|
|
1543
1543
|
entityOptions: t,
|
|
1544
1544
|
category: i,
|
|
1545
|
-
freely:
|
|
1545
|
+
freely: r
|
|
1546
1546
|
}) {
|
|
1547
1547
|
const n = Number(e?.count);
|
|
1548
1548
|
if (Number.isFinite(n) && n > 0) return n;
|
|
1549
1549
|
if (e?.autoRepeat === !1)
|
|
1550
1550
|
return 1;
|
|
1551
1551
|
if (i === "wall") {
|
|
1552
|
-
const l = xe(
|
|
1552
|
+
const l = xe(a, t), c = Ie(t), d = v(
|
|
1553
1553
|
e?.tileWidth ?? e?.textureWidth,
|
|
1554
|
-
|
|
1554
|
+
w.wallTileWidth
|
|
1555
1555
|
), f = v(
|
|
1556
1556
|
e?.tileHeight ?? e?.textureHeight,
|
|
1557
|
-
|
|
1558
|
-
), u =
|
|
1557
|
+
w.wallTileHeight
|
|
1558
|
+
), u = r === "vertical" ? c / Math.max(f, 0.01) : l / Math.max(d, 0.01);
|
|
1559
1559
|
return C(Number(u.toFixed(2)));
|
|
1560
1560
|
}
|
|
1561
|
-
const o = Se(
|
|
1561
|
+
const o = Se(a, t), s = v(
|
|
1562
1562
|
e?.tileWidth ?? e?.textureWidth,
|
|
1563
|
-
|
|
1563
|
+
w.polygonTileWidth
|
|
1564
1564
|
), h = v(
|
|
1565
1565
|
e?.tileHeight ?? e?.textureHeight,
|
|
1566
|
-
|
|
1567
|
-
), g =
|
|
1566
|
+
w.polygonTileHeight
|
|
1567
|
+
), g = r === "vertical" ? o.height / Math.max(h, 0.01) : o.width / Math.max(s, 0.01);
|
|
1568
1568
|
return C(Number(g.toFixed(2)));
|
|
1569
1569
|
}
|
|
1570
|
-
function N(
|
|
1571
|
-
const e =
|
|
1570
|
+
function N(a) {
|
|
1571
|
+
const e = a;
|
|
1572
1572
|
return e.__materialFactory = !0, e;
|
|
1573
1573
|
}
|
|
1574
|
-
function Ae(
|
|
1575
|
-
const e = String(
|
|
1574
|
+
function Ae(a) {
|
|
1575
|
+
const e = String(a?.wallVerticalMode ?? a?.verticalMode ?? "stretch");
|
|
1576
1576
|
return e === "repeat" || e === "bottom" || e === "stretch" ? e : "stretch";
|
|
1577
1577
|
}
|
|
1578
1578
|
function gi({
|
|
1579
|
-
Cesium:
|
|
1579
|
+
Cesium: a,
|
|
1580
1580
|
themeOptions: e,
|
|
1581
1581
|
entityOptions: t
|
|
1582
1582
|
}) {
|
|
1583
1583
|
const i = Ee({
|
|
1584
|
-
Cesium:
|
|
1584
|
+
Cesium: a,
|
|
1585
1585
|
themeOptions: e,
|
|
1586
1586
|
entityOptions: t,
|
|
1587
1587
|
category: "wall"
|
|
1588
1588
|
});
|
|
1589
1589
|
return Ae(e) === "repeat" ? i : { x: i.x, y: 1 };
|
|
1590
1590
|
}
|
|
1591
|
-
function di(
|
|
1591
|
+
function di(a, e) {
|
|
1592
1592
|
const t = "WallBottomImageMaterial_" + Date.now() + "_" + Math.floor(Math.random() * 1e3);
|
|
1593
|
-
function i(
|
|
1594
|
-
this._definitionChanged = new
|
|
1593
|
+
function i(r) {
|
|
1594
|
+
this._definitionChanged = new a.Event(), this._color = r.color, this.color = r.color;
|
|
1595
1595
|
}
|
|
1596
1596
|
return Object.defineProperties(i.prototype, {
|
|
1597
1597
|
isConstant: {
|
|
@@ -1604,26 +1604,26 @@ function di(r, e) {
|
|
|
1604
1604
|
return this._definitionChanged;
|
|
1605
1605
|
}
|
|
1606
1606
|
},
|
|
1607
|
-
color:
|
|
1607
|
+
color: a.createPropertyDescriptor("color")
|
|
1608
1608
|
}), i.prototype.getType = function() {
|
|
1609
1609
|
return t;
|
|
1610
|
-
}, i.prototype.getValue = function(
|
|
1611
|
-
return
|
|
1610
|
+
}, i.prototype.getValue = function(r, n) {
|
|
1611
|
+
return a.defined(n) || (n = {}), n.image = e.image, n.repeatX = e.repeatX, n.bottomHeightRatio = e.bottomHeightRatio, n.color = a.Property.getValueOrClonedDefault(
|
|
1612
1612
|
this._color,
|
|
1613
|
-
|
|
1614
|
-
|
|
1613
|
+
r,
|
|
1614
|
+
a.Color.WHITE,
|
|
1615
1615
|
n.color
|
|
1616
1616
|
), n;
|
|
1617
|
-
}, i.prototype.equals = function(
|
|
1618
|
-
return this ===
|
|
1619
|
-
},
|
|
1617
|
+
}, i.prototype.equals = function(r) {
|
|
1618
|
+
return this === r || r instanceof i && a.Property.equals(this._color, r._color);
|
|
1619
|
+
}, a.Material._materialCache.addMaterial(t, {
|
|
1620
1620
|
fabric: {
|
|
1621
1621
|
type: t,
|
|
1622
1622
|
uniforms: {
|
|
1623
1623
|
image: e.image,
|
|
1624
1624
|
repeatX: e.repeatX,
|
|
1625
1625
|
bottomHeightRatio: e.bottomHeightRatio,
|
|
1626
|
-
color: e.color ||
|
|
1626
|
+
color: e.color || a.Color.WHITE
|
|
1627
1627
|
},
|
|
1628
1628
|
source: `
|
|
1629
1629
|
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
@@ -1648,117 +1648,127 @@ function di(r, e) {
|
|
|
1648
1648
|
}), new i(e);
|
|
1649
1649
|
}
|
|
1650
1650
|
function ui({
|
|
1651
|
-
Cesium:
|
|
1651
|
+
Cesium: a,
|
|
1652
1652
|
options: e,
|
|
1653
|
-
MaterialManager: t
|
|
1653
|
+
MaterialManager: t,
|
|
1654
|
+
force: i = !1
|
|
1654
1655
|
}) {
|
|
1655
1656
|
if (e.data?.theme) {
|
|
1656
1657
|
if (e.data?.lineType == "1") {
|
|
1657
|
-
let
|
|
1658
|
-
color: new
|
|
1658
|
+
let r = ai(a, {
|
|
1659
|
+
color: new a.Color.fromCssColorString(e?.options?.color || "#ffffff"),
|
|
1659
1660
|
duration: 100
|
|
1660
1661
|
});
|
|
1661
1662
|
t.register({
|
|
1662
1663
|
themeKey: e.data?.theme,
|
|
1663
|
-
material:
|
|
1664
|
+
material: r,
|
|
1665
|
+
force: i,
|
|
1664
1666
|
category: "polyline"
|
|
1665
1667
|
});
|
|
1666
1668
|
} else if (e.data?.lineType == "2") {
|
|
1667
|
-
let
|
|
1668
|
-
|
|
1669
|
+
let r = new a.PolylineArrowMaterialProperty(
|
|
1670
|
+
a.Color.fromCssColorString(e?.options?.color || "red")
|
|
1669
1671
|
);
|
|
1670
1672
|
t.register({
|
|
1671
1673
|
themeKey: e.data?.theme,
|
|
1672
|
-
material:
|
|
1674
|
+
material: r,
|
|
1675
|
+
force: i,
|
|
1673
1676
|
category: "polyline"
|
|
1674
1677
|
});
|
|
1675
1678
|
} else if (e.data?.lineType == "3") {
|
|
1676
|
-
let
|
|
1677
|
-
color:
|
|
1679
|
+
let r = new a.PolylineOutlineMaterialProperty({
|
|
1680
|
+
color: a.Color.fromCssColorString(e?.options?.color || "red"),
|
|
1678
1681
|
outlineWidth: 0
|
|
1679
1682
|
});
|
|
1680
1683
|
t.register({
|
|
1681
1684
|
themeKey: e.data?.theme,
|
|
1682
|
-
material:
|
|
1685
|
+
material: r,
|
|
1686
|
+
force: i,
|
|
1683
1687
|
category: "polyline"
|
|
1684
1688
|
});
|
|
1685
1689
|
} else if (e.data?.lineType == "4") {
|
|
1686
|
-
let
|
|
1687
|
-
color:
|
|
1690
|
+
let r = new a.PolylineDashMaterialProperty({
|
|
1691
|
+
color: a.Color.fromCssColorString(e?.options?.color || "red"),
|
|
1688
1692
|
dashLength: Number(e?.options?.dashLength || 30)
|
|
1689
1693
|
});
|
|
1690
1694
|
t.register({
|
|
1691
1695
|
themeKey: e.data?.theme,
|
|
1692
|
-
material:
|
|
1696
|
+
material: r,
|
|
1697
|
+
force: i,
|
|
1693
1698
|
category: "polyline"
|
|
1694
1699
|
});
|
|
1695
1700
|
} else if (e.data?.lineType == "5") {
|
|
1696
|
-
let
|
|
1701
|
+
let r = ri(a, {
|
|
1697
1702
|
image: e.img,
|
|
1698
|
-
color: new
|
|
1703
|
+
color: new a.Color.fromCssColorString(e?.options?.color || "#ffffff"),
|
|
1699
1704
|
duration: 5e3,
|
|
1700
1705
|
direction: "-",
|
|
1701
1706
|
count: 1
|
|
1702
1707
|
});
|
|
1703
1708
|
t.register({
|
|
1704
1709
|
themeKey: e.data?.theme,
|
|
1705
|
-
material:
|
|
1710
|
+
material: r,
|
|
1711
|
+
force: i,
|
|
1706
1712
|
category: "polyline"
|
|
1707
1713
|
});
|
|
1708
1714
|
}
|
|
1709
1715
|
}
|
|
1710
1716
|
}
|
|
1711
1717
|
function fi({
|
|
1712
|
-
Cesium:
|
|
1718
|
+
Cesium: a,
|
|
1713
1719
|
options: e,
|
|
1714
|
-
MaterialManager: t
|
|
1720
|
+
MaterialManager: t,
|
|
1721
|
+
force: i = !1
|
|
1715
1722
|
}) {
|
|
1716
1723
|
if (e.data?.theme) {
|
|
1717
1724
|
if (e.data?.polygonType == "colorMode") {
|
|
1718
|
-
let
|
|
1725
|
+
let r = new a.Color.fromCssColorString(e?.options?.color || "#ffffff");
|
|
1719
1726
|
t.register({
|
|
1720
1727
|
themeKey: e.data?.theme,
|
|
1721
|
-
material:
|
|
1728
|
+
material: r,
|
|
1729
|
+
force: i,
|
|
1722
1730
|
category: "polygon"
|
|
1723
1731
|
});
|
|
1724
1732
|
} else if (e.data?.polygonType == "img") {
|
|
1725
|
-
const
|
|
1733
|
+
const r = e?.options || {};
|
|
1726
1734
|
t.register({
|
|
1727
1735
|
themeKey: e.data?.theme,
|
|
1728
1736
|
category: "polygon",
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1737
|
+
force: i,
|
|
1738
|
+
material: N((n = {}) => {
|
|
1739
|
+
const o = Ee({
|
|
1740
|
+
Cesium: a,
|
|
1741
|
+
themeOptions: r,
|
|
1742
|
+
entityOptions: n,
|
|
1734
1743
|
category: "polygon"
|
|
1735
1744
|
});
|
|
1736
|
-
return new
|
|
1745
|
+
return new a.ImageMaterialProperty({
|
|
1737
1746
|
image: e.img,
|
|
1738
|
-
repeat: new
|
|
1747
|
+
repeat: new a.Cartesian2(o.x, o.y)
|
|
1739
1748
|
});
|
|
1740
1749
|
})
|
|
1741
1750
|
});
|
|
1742
1751
|
} else if (e.data?.polygonType == "DynamicImgMaterial") {
|
|
1743
|
-
const
|
|
1752
|
+
const r = e?.options || {};
|
|
1744
1753
|
t.register({
|
|
1745
1754
|
themeKey: e.data?.theme,
|
|
1746
1755
|
category: "polygon",
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1756
|
+
force: i,
|
|
1757
|
+
material: N((n = {}) => {
|
|
1758
|
+
const o = e.data?.freely || "vertical", s = De({
|
|
1759
|
+
Cesium: a,
|
|
1760
|
+
themeOptions: r,
|
|
1761
|
+
entityOptions: n,
|
|
1752
1762
|
category: "polygon",
|
|
1753
|
-
freely:
|
|
1763
|
+
freely: o
|
|
1754
1764
|
});
|
|
1755
|
-
return
|
|
1765
|
+
return Pe(a, {
|
|
1756
1766
|
image: e.img,
|
|
1757
|
-
color: new
|
|
1758
|
-
duration: v(
|
|
1759
|
-
freely:
|
|
1760
|
-
direction:
|
|
1761
|
-
count:
|
|
1767
|
+
color: new a.Color.fromCssColorString(r?.color || "#ffffff"),
|
|
1768
|
+
duration: v(r?.duration, 5e3),
|
|
1769
|
+
freely: o,
|
|
1770
|
+
direction: r?.direction || "+",
|
|
1771
|
+
count: s
|
|
1762
1772
|
});
|
|
1763
1773
|
})
|
|
1764
1774
|
});
|
|
@@ -1766,61 +1776,64 @@ function fi({
|
|
|
1766
1776
|
}
|
|
1767
1777
|
}
|
|
1768
1778
|
function mi({
|
|
1769
|
-
Cesium:
|
|
1779
|
+
Cesium: a,
|
|
1770
1780
|
options: e,
|
|
1771
|
-
MaterialManager: t
|
|
1781
|
+
MaterialManager: t,
|
|
1782
|
+
force: i = !1
|
|
1772
1783
|
}) {
|
|
1773
1784
|
if (e.data?.theme) {
|
|
1774
1785
|
if (e.data?.wallType == "img") {
|
|
1775
|
-
const
|
|
1786
|
+
const r = e?.options || {};
|
|
1776
1787
|
t.register({
|
|
1777
1788
|
themeKey: e.data?.theme,
|
|
1778
1789
|
category: "wall",
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1790
|
+
force: i,
|
|
1791
|
+
material: N((n = {}) => {
|
|
1792
|
+
const o = Ae(r), s = gi({
|
|
1793
|
+
Cesium: a,
|
|
1794
|
+
themeOptions: r,
|
|
1795
|
+
entityOptions: n
|
|
1784
1796
|
});
|
|
1785
|
-
if (
|
|
1786
|
-
const
|
|
1787
|
-
v(
|
|
1797
|
+
if (o === "bottom") {
|
|
1798
|
+
const h = hi(
|
|
1799
|
+
v(r?.bottomHeightRatio, 0.3),
|
|
1788
1800
|
0.3
|
|
1789
1801
|
);
|
|
1790
|
-
return di(
|
|
1802
|
+
return di(a, {
|
|
1791
1803
|
image: e.img,
|
|
1792
|
-
repeatX:
|
|
1793
|
-
bottomHeightRatio:
|
|
1794
|
-
color: new
|
|
1804
|
+
repeatX: s.x,
|
|
1805
|
+
bottomHeightRatio: h,
|
|
1806
|
+
color: new a.Color.fromCssColorString(r?.color || "#ffffff")
|
|
1795
1807
|
});
|
|
1796
1808
|
}
|
|
1797
|
-
return new
|
|
1809
|
+
return new a.ImageMaterialProperty({
|
|
1798
1810
|
image: e.img,
|
|
1799
|
-
repeat: new
|
|
1811
|
+
repeat: new a.Cartesian2(s.x, s.y),
|
|
1800
1812
|
transparent: !0
|
|
1801
1813
|
});
|
|
1802
1814
|
})
|
|
1803
1815
|
});
|
|
1804
1816
|
} else if (e.data?.wallType == "DynamicImgMaterial") {
|
|
1805
|
-
const
|
|
1817
|
+
const r = e?.options || {};
|
|
1806
1818
|
t.register({
|
|
1807
1819
|
themeKey: e.data?.theme,
|
|
1808
1820
|
category: "wall",
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1821
|
+
force: i,
|
|
1822
|
+
material: N((n = {}) => {
|
|
1823
|
+
const o = e.data?.freely || "vertical", s = De({
|
|
1824
|
+
Cesium: a,
|
|
1825
|
+
themeOptions: r,
|
|
1826
|
+
entityOptions: n,
|
|
1814
1827
|
category: "wall",
|
|
1815
|
-
freely:
|
|
1828
|
+
freely: o
|
|
1816
1829
|
});
|
|
1817
|
-
return
|
|
1830
|
+
return Pe(a, {
|
|
1818
1831
|
image: e.img,
|
|
1819
|
-
color: new
|
|
1820
|
-
duration: v(
|
|
1821
|
-
freely:
|
|
1822
|
-
direction:
|
|
1823
|
-
count:
|
|
1832
|
+
color: new a.Color.fromCssColorString(r?.color || "#ffffff"),
|
|
1833
|
+
duration: v(r?.duration, 5e3),
|
|
1834
|
+
freely: o,
|
|
1835
|
+
direction: r?.direction || "+",
|
|
1836
|
+
count: s
|
|
1824
1837
|
});
|
|
1825
1838
|
})
|
|
1826
1839
|
});
|
|
@@ -1832,14 +1845,14 @@ class pi extends li {
|
|
|
1832
1845
|
const {
|
|
1833
1846
|
labelId: t = "report-marker",
|
|
1834
1847
|
cardId: i = "report-marker",
|
|
1835
|
-
tagThemeConfig:
|
|
1848
|
+
tagThemeConfig: r = [],
|
|
1836
1849
|
lineThemeConfig: n = [],
|
|
1837
1850
|
cardThemeConfig: o = [],
|
|
1838
1851
|
runListener: s = () => {
|
|
1839
1852
|
},
|
|
1840
|
-
MaterialManager: h = new
|
|
1853
|
+
MaterialManager: h = new we(),
|
|
1841
1854
|
aggregatorOptions: g
|
|
1842
|
-
} = e, l = [...
|
|
1855
|
+
} = e, l = [...r], c = [...n], d = [...o], f = {
|
|
1843
1856
|
clusterTheme: "Tag1007",
|
|
1844
1857
|
pointTheme: "Tag1001",
|
|
1845
1858
|
centralPointMode: "firstPoint",
|
|
@@ -1951,40 +1964,44 @@ class pi extends li {
|
|
|
1951
1964
|
})
|
|
1952
1965
|
}
|
|
1953
1966
|
};
|
|
1954
|
-
Object.entries(t).forEach(([i,
|
|
1967
|
+
Object.entries(t).forEach(([i, r]) => {
|
|
1955
1968
|
this.MaterialManager.has(i, "polyline") || this.MaterialManager.register({
|
|
1956
1969
|
themeKey: i,
|
|
1957
|
-
material:
|
|
1970
|
+
material: r.material,
|
|
1958
1971
|
category: "polyline"
|
|
1959
1972
|
});
|
|
1960
1973
|
});
|
|
1961
1974
|
}
|
|
1962
1975
|
// Initialize dynamic themes from data
|
|
1963
|
-
initThemes(e) {
|
|
1976
|
+
initThemes(e, t = !1) {
|
|
1964
1977
|
if (!e) return;
|
|
1965
1978
|
e.tag && this.loadTabThemeConfig(e.tag), e.card && this.loadCardThemeConfig(e.card);
|
|
1966
|
-
const
|
|
1979
|
+
const i = this.opt.Cesium, r = this.instance.materialManager || this.opt.MaterialManager;
|
|
1967
1980
|
if (e.line?.length > 0)
|
|
1968
|
-
for (let
|
|
1981
|
+
for (let n of e.line)
|
|
1969
1982
|
ui({
|
|
1970
|
-
options:
|
|
1971
|
-
Cesium:
|
|
1972
|
-
MaterialManager:
|
|
1983
|
+
options: n,
|
|
1984
|
+
Cesium: i,
|
|
1985
|
+
MaterialManager: r,
|
|
1986
|
+
force: t
|
|
1973
1987
|
});
|
|
1974
1988
|
if (e.polygon?.length > 0)
|
|
1975
|
-
for (let
|
|
1989
|
+
for (let n of e.polygon)
|
|
1976
1990
|
fi({
|
|
1977
|
-
options:
|
|
1978
|
-
Cesium:
|
|
1979
|
-
MaterialManager:
|
|
1991
|
+
options: n,
|
|
1992
|
+
Cesium: i,
|
|
1993
|
+
MaterialManager: r,
|
|
1994
|
+
force: t
|
|
1980
1995
|
});
|
|
1981
1996
|
if (e.wall?.length > 0)
|
|
1982
|
-
for (let
|
|
1997
|
+
for (let n of e.wall)
|
|
1983
1998
|
mi({
|
|
1984
|
-
options:
|
|
1985
|
-
Cesium:
|
|
1986
|
-
MaterialManager:
|
|
1999
|
+
options: n,
|
|
2000
|
+
Cesium: i,
|
|
2001
|
+
MaterialManager: r,
|
|
2002
|
+
force: t
|
|
1987
2003
|
});
|
|
2004
|
+
t && this.entityList.size > 0 && this.set(Array.from(this.entityList.values()));
|
|
1988
2005
|
}
|
|
1989
2006
|
extractOnEvents(e) {
|
|
1990
2007
|
const t = {};
|
|
@@ -1999,11 +2016,12 @@ class pi extends li {
|
|
|
1999
2016
|
});
|
|
2000
2017
|
}
|
|
2001
2018
|
//注册默认的线配置
|
|
2002
|
-
loadLineThemeConfig(e) {
|
|
2003
|
-
e.forEach((
|
|
2004
|
-
this.MaterialManager.has(
|
|
2005
|
-
themeKey:
|
|
2006
|
-
material:
|
|
2019
|
+
loadLineThemeConfig(e, t = !1) {
|
|
2020
|
+
e.forEach((i) => {
|
|
2021
|
+
!t && this.MaterialManager.has(i.data.theme, "polyline") || i.material && this.MaterialManager.register({
|
|
2022
|
+
themeKey: i.data.theme,
|
|
2023
|
+
material: i.material,
|
|
2024
|
+
force: t,
|
|
2007
2025
|
category: "polyline"
|
|
2008
2026
|
});
|
|
2009
2027
|
});
|
|
@@ -2012,7 +2030,7 @@ class pi extends li {
|
|
|
2012
2030
|
let t = this.instance.cardPool;
|
|
2013
2031
|
e.forEach((i) => {
|
|
2014
2032
|
t.registerTheme(i.data.theme, {
|
|
2015
|
-
createElement(
|
|
2033
|
+
createElement(r, n) {
|
|
2016
2034
|
let o = n.data.data, s;
|
|
2017
2035
|
return i.comType == 1 ? s = x(I(re), {
|
|
2018
2036
|
data: o || {},
|
|
@@ -2058,7 +2076,7 @@ class pi extends li {
|
|
|
2058
2076
|
bgClass: [i.data.theme]
|
|
2059
2077
|
// titleConfig: themeOptions.options.titleConfig,
|
|
2060
2078
|
// pageInfoConfig: themeOptions.options.pageInfoConfig,
|
|
2061
|
-
})), O(s,
|
|
2079
|
+
})), O(s, r), () => O(null, r);
|
|
2062
2080
|
},
|
|
2063
2081
|
options: {
|
|
2064
2082
|
offset: i.data.pixelOffset,
|
|
@@ -2071,8 +2089,8 @@ class pi extends li {
|
|
|
2071
2089
|
setTagTheme(e) {
|
|
2072
2090
|
let { labelPool: t } = this.instance;
|
|
2073
2091
|
t.registerTheme(e.data.theme, {
|
|
2074
|
-
createElement(i,
|
|
2075
|
-
let n =
|
|
2092
|
+
createElement(i, r) {
|
|
2093
|
+
let n = r.data?.billboard?.[0];
|
|
2076
2094
|
const o = ii(n, ["position", "options"]);
|
|
2077
2095
|
let s, h = {
|
|
2078
2096
|
...o,
|
|
@@ -2082,9 +2100,9 @@ class pi extends li {
|
|
|
2082
2100
|
textStyle: e?.data?.options?.textStyle,
|
|
2083
2101
|
imgStyle: e?.data?.options?.imgStyle
|
|
2084
2102
|
};
|
|
2085
|
-
if (
|
|
2103
|
+
if (r.data?.gridKey)
|
|
2086
2104
|
s = x(I(ae), {
|
|
2087
|
-
text:
|
|
2105
|
+
text: r.data?.count,
|
|
2088
2106
|
isFullLink: e.isFullLink ?? !1,
|
|
2089
2107
|
img: e?.data.options.img,
|
|
2090
2108
|
imgStyle: e?.data.options?.imgStyle,
|
|
@@ -2117,10 +2135,10 @@ class pi extends li {
|
|
|
2117
2135
|
isCanDraggable: f,
|
|
2118
2136
|
onCanDraggable: g.onCanDraggable || e?.onCanDraggable,
|
|
2119
2137
|
onSetOtherOffset: (m) => {
|
|
2120
|
-
|
|
2138
|
+
r.data?.billboard?.[0]?.options && (r.data.billboard[0].options.otherOffset = m), g.onSetOtherOffset?.(m), e?.onSetOtherOffset?.(r.data, m);
|
|
2121
2139
|
},
|
|
2122
2140
|
onSetLineStake: (m) => {
|
|
2123
|
-
|
|
2141
|
+
r.data?.billboard?.[0]?.options && (r.data.billboard[0].options.lineStake = m), g.onSetLineStake?.(m), e?.onSetLineStake?.(r.data, m);
|
|
2124
2142
|
}
|
|
2125
2143
|
});
|
|
2126
2144
|
} else e.comType == 6 || e.comType == 7 ? s = x(I(Ye), {
|
|
@@ -2136,7 +2154,7 @@ class pi extends li {
|
|
|
2136
2154
|
}
|
|
2137
2155
|
//标记监听事件
|
|
2138
2156
|
initTagListener(e, t) {
|
|
2139
|
-
let { viewer: i, tagListeningOptions:
|
|
2157
|
+
let { viewer: i, tagListeningOptions: r } = t;
|
|
2140
2158
|
e.addListener(G.Click, {
|
|
2141
2159
|
name: "marker:click",
|
|
2142
2160
|
fn: (n) => {
|
|
@@ -2173,15 +2191,15 @@ class pi extends li {
|
|
|
2173
2191
|
}
|
|
2174
2192
|
t.runListener?.(H.标记移出, n.data, s);
|
|
2175
2193
|
}
|
|
2176
|
-
}),
|
|
2194
|
+
}), r?.forEach((n) => {
|
|
2177
2195
|
e.addListener(n.key, n.ListenerItem, n.overwrite);
|
|
2178
2196
|
});
|
|
2179
2197
|
}
|
|
2180
2198
|
// 兼容旧模式的材质注册
|
|
2181
2199
|
setMaterial(e) {
|
|
2182
|
-
const { type: t, material: i, materialKey:
|
|
2200
|
+
const { type: t, material: i, materialKey: r, cover: n } = e, o = t ? t.toLowerCase() : "default";
|
|
2183
2201
|
this.MaterialManager.register({
|
|
2184
|
-
themeKey:
|
|
2202
|
+
themeKey: r,
|
|
2185
2203
|
// 兼容传入的是 { material: ... } 结构或者直接是材质对象
|
|
2186
2204
|
material: i?.material || i,
|
|
2187
2205
|
force: n,
|
|
@@ -2193,8 +2211,8 @@ const yi = /* @__PURE__ */ ke({
|
|
|
2193
2211
|
__name: "MarkerManage",
|
|
2194
2212
|
props: st,
|
|
2195
2213
|
emits: ["register", "load", "marker-event"],
|
|
2196
|
-
setup(
|
|
2197
|
-
const i =
|
|
2214
|
+
setup(a, { expose: e, emit: t }) {
|
|
2215
|
+
const i = a, r = t, n = Be("leitingMethods");
|
|
2198
2216
|
let o = null;
|
|
2199
2217
|
const s = (l = {}) => {
|
|
2200
2218
|
if (o) return o;
|
|
@@ -2204,10 +2222,10 @@ const yi = /* @__PURE__ */ ke({
|
|
|
2204
2222
|
Cesium: l.Cesium || i.Cesium,
|
|
2205
2223
|
viewer: l.viewer || i.viewer,
|
|
2206
2224
|
runListener: (d, f, ...u) => {
|
|
2207
|
-
|
|
2225
|
+
r("marker-event", { key: d, data: f, args: u });
|
|
2208
2226
|
}
|
|
2209
2227
|
};
|
|
2210
|
-
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)),
|
|
2228
|
+
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);
|
|
2211
2229
|
}, h = {
|
|
2212
2230
|
init: s,
|
|
2213
2231
|
set: (l) => o?.set(l),
|
|
@@ -2226,7 +2244,7 @@ const yi = /* @__PURE__ */ ke({
|
|
|
2226
2244
|
setTagTheme: (l) => o?.setTagTheme(l),
|
|
2227
2245
|
setMaterial: (l) => o?.setMaterial(l)
|
|
2228
2246
|
};
|
|
2229
|
-
e(h),
|
|
2247
|
+
e(h), r("register", h);
|
|
2230
2248
|
function g() {
|
|
2231
2249
|
if (o) return o;
|
|
2232
2250
|
const l = ze(n), c = l?.getCesium?.(), d = l?.getViewer?.();
|