leiting-bim 2.1.157 → 2.1.159
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/leiting-bim.es.js +1 -1
- package/package.json +1 -1
- package/plugins/cesium-core/dist/cesium-core.mjs +49 -44
- package/plugins/cesium-core/dist/cesium-core.mjs.map +1 -1
- package/plugins/cesium-core/dist/cesium-core.umd.js +6 -6
- package/plugins/cesium-core/dist/cesium-core.umd.js.map +1 -1
- package/plugins/cesium-core/package.json +1 -1
- package/plugins/cesium-vue/dist/components/basic-audio.js.map +1 -1
- package/plugins/cesium-vue/dist/components/marker-manage.js +795 -512
- package/plugins/cesium-vue/dist/components/marker-manage.js.map +1 -1
- package/plugins/cesium-vue/dist/index-Kqi_S6KA.js.map +1 -1
- package/plugins/cesium-vue/package.json +1 -1
- package/plugins/theme-chalk/package.json +1 -1
- package/plugins/utils/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
import { h as
|
|
3
|
-
import { M as
|
|
4
|
-
import { CxCardCarousel as
|
|
5
|
-
import { CxMarkerBubbleLine as
|
|
6
|
-
import { CxMarkerDefault as
|
|
7
|
-
import { CxMarkerHtml as
|
|
8
|
-
import { CxMarkerText as
|
|
9
|
-
import { i as
|
|
10
|
-
const
|
|
1
|
+
import { w as Ne } from "../create-DynflqE1.js";
|
|
2
|
+
import { h as x, markRaw as I, render as O, defineComponent as ke, inject as Be, onMounted as We, watch as te, onUnmounted as Fe, renderSlot as $e, unref as ze } from "vue";
|
|
3
|
+
import { M as G, H as ie, a as V } from "../HtmlOverlayLabelPool-CbiNlyAM.js";
|
|
4
|
+
import { CxCardCarousel as re } from "./card-carousel.js";
|
|
5
|
+
import { CxMarkerBubbleLine as Ve, CxMarkerBubble as Ke } from "./marker-bubble.js";
|
|
6
|
+
import { CxMarkerDefault as ae } from "./marker-default.js";
|
|
7
|
+
import { CxMarkerHtml as Xe } from "./marker-html.js";
|
|
8
|
+
import { CxMarkerText as Ye } from "./marker-text.js";
|
|
9
|
+
import { i as q, b as ce, a as w, 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
|
+
const st = {
|
|
11
11
|
id: { type: String, default: "marker" },
|
|
12
12
|
Cesium: { type: Object },
|
|
13
13
|
viewer: { type: Object },
|
|
@@ -18,8 +18,8 @@ const Ze = {
|
|
|
18
18
|
themeConfig: { type: Object }
|
|
19
19
|
// Optional override
|
|
20
20
|
};
|
|
21
|
-
var
|
|
22
|
-
class
|
|
21
|
+
var H = /* @__PURE__ */ ((r) => (r.左建选中模型 = "MODEL_LEFT_CLICK", r.标记左键点击 = "TAG_LEFT_CLICK", r.标记移入 = "TAG_MOUSEENTER", r.标记移出 = "TAG_MOUSELEAVE", r.模型位置保存 = "SAVE_REGION", r.模型加载完成 = "MODEL_READY", r))(H || {});
|
|
22
|
+
class lt {
|
|
23
23
|
Cesium;
|
|
24
24
|
viewer;
|
|
25
25
|
labelPool;
|
|
@@ -56,10 +56,10 @@ class Je {
|
|
|
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 a = this.viewer.scene && this.viewer.scene.globe, n = a && a._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(), a && (this._tileLoadListener = (h) => {
|
|
61
61
|
h === 0 && this._cameraDirty && (this._cameraDirty = !1, this._scheduleUpdate());
|
|
62
|
-
},
|
|
62
|
+
}, a.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 Je {
|
|
|
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
|
-
!
|
|
83
|
+
const e = this.viewer.scene && this.viewer.scene.globe, t = e && e._surface, i = t && t._tileProvider, a = i?.tilingScheme || new this.Cesium.GeographicTilingScheme(), n = i !== this._lastTileProvider, o = this.tilingScheme !== a;
|
|
84
|
+
!n && !o && this.levels && this.levels.length > 0 || (this._lastTileProvider = i, this.tilingScheme = a, 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
|
|
92
|
-
const o = 360 / Math.pow(2,
|
|
90
|
+
let a = 0;
|
|
91
|
+
for (let n = t; n <= i; n++, a++) {
|
|
92
|
+
const o = 360 / Math.pow(2, n);
|
|
93
93
|
e.push({
|
|
94
|
-
level:
|
|
94
|
+
level: n,
|
|
95
95
|
size: o,
|
|
96
96
|
minViewWidth: o * 4
|
|
97
|
-
}), this.levelIndexByTileLevel.set(
|
|
97
|
+
}), this.levelIndexByTileLevel.set(n, a);
|
|
98
98
|
}
|
|
99
99
|
return e;
|
|
100
100
|
}
|
|
@@ -114,49 +114,49 @@ class Je {
|
|
|
114
114
|
}, this._updateDelay);
|
|
115
115
|
}
|
|
116
116
|
updatePoint(e) {
|
|
117
|
-
const t = this.points.findIndex((
|
|
117
|
+
const t = this.points.findIndex((n) => n.id === e.id);
|
|
118
118
|
if (t === -1) return;
|
|
119
119
|
const i = this.points[t];
|
|
120
|
-
for (const
|
|
121
|
-
const o =
|
|
120
|
+
for (const n of this.levels) {
|
|
121
|
+
const o = n.level, s = this.gridLayers.get(o);
|
|
122
122
|
if (!s) continue;
|
|
123
|
-
const h = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat),
|
|
123
|
+
const h = this.Cesium.Cartographic.fromDegrees(i.lon, i.lat), g = this.tilingScheme.positionToTileXY(
|
|
124
124
|
h,
|
|
125
125
|
o,
|
|
126
126
|
new this.Cesium.Cartesian2()
|
|
127
127
|
);
|
|
128
|
-
if (!
|
|
129
|
-
const l = `${
|
|
128
|
+
if (!g) continue;
|
|
129
|
+
const l = `${g.x}_${g.y}`, c = s.get(l);
|
|
130
130
|
if (c) {
|
|
131
|
-
const
|
|
132
|
-
if (
|
|
131
|
+
const d = c.allPoints.findIndex((f) => f.id === e.id);
|
|
132
|
+
if (d !== -1 && c.allPoints.splice(d, 1), i.data?.billboard?.[0]?.skipAggregation) {
|
|
133
133
|
const f = c.skipPoints.findIndex((u) => u.id === e.id);
|
|
134
134
|
f !== -1 && c.skipPoints.splice(f, 1);
|
|
135
135
|
} else {
|
|
136
136
|
const f = this.groupByTheme ? i.data?.theme : this.clusterTheme, u = c.groups.get(f);
|
|
137
137
|
if (u) {
|
|
138
|
-
const m = u.findIndex((
|
|
138
|
+
const m = u.findIndex((b) => b.id === e.id);
|
|
139
139
|
m !== -1 && u.splice(m, 1), u.length === 0 && c.groups.delete(f);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
const
|
|
145
|
-
this.points[t] =
|
|
144
|
+
const a = { ...i, ...e };
|
|
145
|
+
this.points[t] = a, this._addPointToGrid(a), 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 [
|
|
151
|
+
const a = this.gridLayers.get(i.level);
|
|
152
|
+
if (a)
|
|
153
|
+
for (const [n, o] of a.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
|
-
const
|
|
157
|
-
|
|
156
|
+
const g = h.filter((l) => !t.has(l.id));
|
|
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 && a.delete(n);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
this._update();
|
|
@@ -170,52 +170,52 @@ class Je {
|
|
|
170
170
|
}
|
|
171
171
|
_addPointToGrid(e) {
|
|
172
172
|
for (const t of this.levels) {
|
|
173
|
-
const i = t.level,
|
|
174
|
-
if (!
|
|
175
|
-
const
|
|
176
|
-
|
|
173
|
+
const i = t.level, a = this.gridLayers.get(i);
|
|
174
|
+
if (!a) continue;
|
|
175
|
+
const n = this.Cesium.Cartographic.fromDegrees(e.lon, e.lat), o = this.tilingScheme.positionToTileXY(
|
|
176
|
+
n,
|
|
177
177
|
i,
|
|
178
178
|
new this.Cesium.Cartesian2()
|
|
179
179
|
);
|
|
180
180
|
if (!o) continue;
|
|
181
181
|
const s = `${o.x}_${o.y}`;
|
|
182
|
-
let h =
|
|
182
|
+
let h = a.get(s);
|
|
183
183
|
if (h || (h = {
|
|
184
184
|
allPoints: [],
|
|
185
185
|
groups: /* @__PURE__ */ new Map(),
|
|
186
186
|
skipPoints: []
|
|
187
|
-
},
|
|
187
|
+
}, a.set(s, h)), h.allPoints.push(e), e.data?.billboard?.[0]?.skipAggregation)
|
|
188
188
|
h.skipPoints.push(e);
|
|
189
189
|
else {
|
|
190
|
-
const
|
|
191
|
-
h.groups.has(
|
|
190
|
+
const g = this.groupByTheme ? e.data?.billboard?.[0]?.theme : this.clusterTheme;
|
|
191
|
+
h.groups.has(g) || h.groups.set(g, []), h.groups.get(g).push(e);
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
// 在添加/更新点时预计算并缓存地图层级区间
|
|
196
196
|
_preparePointLevelRange(e) {
|
|
197
197
|
const t = e.data || {};
|
|
198
|
-
let i = t.minLevel,
|
|
199
|
-
const
|
|
200
|
-
Array.isArray(
|
|
201
|
-
const o = i == null ? this.defaultMinLevel : Number(i) || this.defaultMinLevel, s =
|
|
198
|
+
let i = t.minLevel, a = t.maxLevel;
|
|
199
|
+
const n = t.levelRange;
|
|
200
|
+
Array.isArray(n) ? (n.length > 0 && i == null && (i = n[0]), n.length > 1 && a == null && (a = n[1])) : n && typeof n == "object" && (i == null && typeof n.min == "number" && (i = n.min), a == null && typeof n.max == "number" && (a = n.max));
|
|
201
|
+
const o = i == null ? this.defaultMinLevel : Number(i) || this.defaultMinLevel, s = a == null ? this.defaultMaxLevel : Number(a) || 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, a = e.__maxLevel ?? this.defaultMaxLevel;
|
|
208
|
+
return t >= i && t <= a;
|
|
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 = (a, n, o, s) => {
|
|
216
216
|
t = this._processCell(
|
|
217
|
-
n,
|
|
218
217
|
a,
|
|
218
|
+
n,
|
|
219
219
|
o,
|
|
220
220
|
s,
|
|
221
221
|
e,
|
|
@@ -223,12 +223,12 @@ class Je {
|
|
|
223
223
|
);
|
|
224
224
|
};
|
|
225
225
|
try {
|
|
226
|
-
const
|
|
227
|
-
if (!
|
|
226
|
+
const a = this._getSurfaceTiles();
|
|
227
|
+
if (!a || a.length === 0) {
|
|
228
228
|
this._handleNoSurfaceTiles(t);
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
|
-
this._tilesRetryCount = 0, this._processTiles(
|
|
231
|
+
this._tilesRetryCount = 0, this._processTiles(a, i);
|
|
232
232
|
} catch {
|
|
233
233
|
this.labelPool.cleanup();
|
|
234
234
|
return;
|
|
@@ -258,21 +258,21 @@ class Je {
|
|
|
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, a = this.levels[this.levels.length - 1].level;
|
|
262
|
+
if (e > a)
|
|
263
263
|
return this.levels.length - 1;
|
|
264
264
|
if (e < i)
|
|
265
265
|
return 0;
|
|
266
|
-
let
|
|
266
|
+
let n = 0, o = 1 / 0;
|
|
267
267
|
for (let s = 0; s < this.levels.length; s++) {
|
|
268
268
|
const h = Math.abs(this.levels[s].level - e);
|
|
269
|
-
h < o && (o = h,
|
|
269
|
+
h < o && (o = h, n = s);
|
|
270
270
|
}
|
|
271
|
-
return
|
|
271
|
+
return n;
|
|
272
272
|
}
|
|
273
273
|
_isTerrainEnabled() {
|
|
274
|
-
const e = this.viewer.terrainProvider, t = this.viewer.scene, i = t && t.globe,
|
|
275
|
-
return
|
|
274
|
+
const e = this.viewer.terrainProvider, t = this.viewer.scene, i = t && t.globe, a = i && i.terrainProvider, n = e || a;
|
|
275
|
+
return n ? !(n instanceof this.Cesium.EllipsoidTerrainProvider) : !1;
|
|
276
276
|
}
|
|
277
277
|
_getGridRefLevel(e) {
|
|
278
278
|
let t = e;
|
|
@@ -283,79 +283,79 @@ class Je {
|
|
|
283
283
|
return t;
|
|
284
284
|
}
|
|
285
285
|
_processTiles(e, t) {
|
|
286
|
-
const i = /* @__PURE__ */ new Set(),
|
|
287
|
-
if (!
|
|
288
|
-
const f = this.tilingScheme.tileXYToRectangle(l, c,
|
|
286
|
+
const i = /* @__PURE__ */ new Set(), a = !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 (!a || !h) return !0;
|
|
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
|
};
|
|
291
291
|
for (const l of e) {
|
|
292
|
-
const c = l.rectangle,
|
|
293
|
-
if (!c || typeof
|
|
294
|
-
const f = this._getGridRefLevel(
|
|
292
|
+
const c = l.rectangle, d = l._level ?? l.level;
|
|
293
|
+
if (!c || typeof d != "number") continue;
|
|
294
|
+
const f = this._getGridRefLevel(d), u = this._resolveLevelIndex(f);
|
|
295
295
|
if (u === void 0) continue;
|
|
296
|
-
const m = this.levels[u].level,
|
|
297
|
-
if (typeof
|
|
298
|
-
const
|
|
299
|
-
if (
|
|
300
|
-
const
|
|
301
|
-
if (i.has(
|
|
302
|
-
i.add(
|
|
296
|
+
const m = this.levels[u].level, b = l._x ?? l.x, _ = l._y ?? l.y;
|
|
297
|
+
if (typeof b == "number" && typeof _ == "number") {
|
|
298
|
+
const L = d - m;
|
|
299
|
+
if (L >= 0) {
|
|
300
|
+
const T = 1 << L, M = Math.floor(b / T), D = Math.floor(_ / T), A = `${m}_${M}_${D}`;
|
|
301
|
+
if (i.has(A)) continue;
|
|
302
|
+
i.add(A), t(u, M, D, d);
|
|
303
303
|
} else {
|
|
304
|
-
const
|
|
305
|
-
for (let
|
|
306
|
-
for (let
|
|
307
|
-
const
|
|
308
|
-
if (!
|
|
309
|
-
const
|
|
310
|
-
i.has(
|
|
304
|
+
const M = 1 << Math.min(-L, this.maxRefineLevels), D = b * M, A = _ * M;
|
|
305
|
+
for (let W = 0; W < M; W++)
|
|
306
|
+
for (let F = 0; F < M; F++) {
|
|
307
|
+
const $ = D + W, z = A + F;
|
|
308
|
+
if (!g($, z, m)) continue;
|
|
309
|
+
const ee = `${m}_${$}_${z}`;
|
|
310
|
+
i.has(ee) || (i.add(ee), t(u, $, z, d));
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
continue;
|
|
314
314
|
}
|
|
315
|
-
const p = this.levels[u].size,
|
|
316
|
-
for (let
|
|
317
|
-
for (let
|
|
318
|
-
if (!
|
|
319
|
-
const
|
|
320
|
-
i.has(
|
|
315
|
+
const p = this.levels[u].size, S = this.Cesium.Math.toDegrees(c.west), k = this.Cesium.Math.toDegrees(c.east), E = this.Cesium.Math.toDegrees(c.south), B = this.Cesium.Math.toDegrees(c.north), Oe = Math.floor((S - -180) / p), Ge = Math.floor((k - -180) / p), He = Math.floor((E - -90) / p), Re = Math.floor((B - -90) / p);
|
|
316
|
+
for (let L = Oe; L <= Ge; L++)
|
|
317
|
+
for (let T = He; T <= Re; T++) {
|
|
318
|
+
if (!g(L, T, m)) continue;
|
|
319
|
+
const M = `${m}_${L}_${T}`;
|
|
320
|
+
i.has(M) || (i.add(M), t(u, L, T, d));
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
|
-
_processCell(e, t, i,
|
|
324
|
+
_processCell(e, t, i, a, 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,
|
|
328
|
-
return s ? (o = this._processCellSkipPoints(s, o), o >= this.displayLimit ? (this._debugDrawCell(s), o) : (o = this._processCellGroups(s,
|
|
327
|
+
const s = this._getCellContext(e, t, i, a);
|
|
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, a) {
|
|
331
331
|
const o = this.levels[e].level, s = this.gridLayers.get(o);
|
|
332
332
|
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),
|
|
333
|
+
const h = `${t}_${i}`, g = s.get(h);
|
|
334
|
+
if (!g) return null;
|
|
335
|
+
const l = this.tilingScheme.tileXYToRectangle(t, i, o), c = this.Cesium.Math.toDegrees(l.west), d = this.Cesium.Math.toDegrees(l.south), f = this.Cesium.Math.toDegrees(l.east), u = this.Cesium.Math.toDegrees(l.north), m = (c + f) / 2, b = (d + u) / 2;
|
|
336
336
|
return {
|
|
337
337
|
levelIdx: e,
|
|
338
338
|
tileLevel: o,
|
|
339
339
|
lonIdx: t,
|
|
340
340
|
latIdx: i,
|
|
341
341
|
key: h,
|
|
342
|
-
cell:
|
|
342
|
+
cell: g,
|
|
343
343
|
rect: l,
|
|
344
344
|
west: c,
|
|
345
|
-
south:
|
|
345
|
+
south: d,
|
|
346
346
|
east: f,
|
|
347
347
|
north: u,
|
|
348
348
|
centerLon: m,
|
|
349
|
-
centerLat:
|
|
350
|
-
viewTileLevel:
|
|
349
|
+
centerLat: b,
|
|
350
|
+
viewTileLevel: a
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
353
|
_processCellSkipPoints(e, t) {
|
|
354
|
-
const { cell: i, viewTileLevel:
|
|
354
|
+
const { cell: i, viewTileLevel: a } = e, n = a;
|
|
355
355
|
for (const o of i.skipPoints)
|
|
356
356
|
if (o.data?.show !== !1) {
|
|
357
357
|
if (t >= this.displayLimit) break;
|
|
358
|
-
this._isVisibleAtLevel(o,
|
|
358
|
+
this._isVisibleAtLevel(o, n) && (this.labelPool.add(o.data, {
|
|
359
359
|
id: `point-${o.id}`,
|
|
360
360
|
lon: o.lon,
|
|
361
361
|
lat: o.lat,
|
|
@@ -368,19 +368,19 @@ class Je {
|
|
|
368
368
|
}
|
|
369
369
|
_processCellGroups(e, t, i) {
|
|
370
370
|
const {
|
|
371
|
-
levelIdx:
|
|
372
|
-
lonIdx:
|
|
371
|
+
levelIdx: a,
|
|
372
|
+
lonIdx: n,
|
|
373
373
|
latIdx: o,
|
|
374
374
|
cell: s,
|
|
375
375
|
centerLon: h,
|
|
376
|
-
centerLat:
|
|
376
|
+
centerLat: g,
|
|
377
377
|
viewTileLevel: l
|
|
378
378
|
} = e, c = l;
|
|
379
|
-
for (const [
|
|
379
|
+
for (const [d, f] of s.groups) {
|
|
380
380
|
const u = f.filter((p) => p.data?.show !== !1);
|
|
381
381
|
if (u.length === 0) continue;
|
|
382
|
-
let m = h,
|
|
383
|
-
if (this.centralPointMode == "firstPoint" && (m = u[0]?.lon || 0,
|
|
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), a === 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, {
|
|
@@ -395,24 +395,24 @@ class Je {
|
|
|
395
395
|
else {
|
|
396
396
|
if (i >= this.displayLimit)
|
|
397
397
|
return i;
|
|
398
|
-
const p = c == null ? u : u.filter((
|
|
398
|
+
const p = c == null ? u : u.filter((B) => this._isVisibleAtLevel(B, c));
|
|
399
399
|
if (!p.length) return i;
|
|
400
|
-
const
|
|
400
|
+
const k = p[0]?.data?.billboard?.[0]?.theme || this.clusterTheme, E = this.groupByTheme ? `cluster-${a}-${n}-${o}-${d}` : `cluster-${a}-${n}-${o}`;
|
|
401
401
|
this.labelPool.add(
|
|
402
402
|
{
|
|
403
|
-
id:
|
|
403
|
+
id: E,
|
|
404
404
|
billboard: p[0]?.data?.billboard || [],
|
|
405
405
|
count: p.length,
|
|
406
|
-
gridKey: `${
|
|
406
|
+
gridKey: `${n}_${o}`,
|
|
407
407
|
points: p,
|
|
408
|
-
aggregationGroup:
|
|
408
|
+
aggregationGroup: d
|
|
409
409
|
},
|
|
410
410
|
{
|
|
411
|
-
id:
|
|
411
|
+
id: E,
|
|
412
412
|
lon: m,
|
|
413
|
-
lat:
|
|
414
|
-
height:
|
|
415
|
-
theme:
|
|
413
|
+
lat: b,
|
|
414
|
+
height: _,
|
|
415
|
+
theme: k
|
|
416
416
|
}
|
|
417
417
|
), i++;
|
|
418
418
|
}
|
|
@@ -421,28 +421,28 @@ class Je {
|
|
|
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: a, east: n, north: o, lonIdx: s, latIdx: h } = e, g = this.levels[t].level;
|
|
425
425
|
this._drawDebugGrid(
|
|
426
426
|
i,
|
|
427
|
-
n,
|
|
428
427
|
a,
|
|
428
|
+
n,
|
|
429
429
|
o,
|
|
430
|
-
`L:${
|
|
430
|
+
`L:${g} X:${s} Y:${h}`
|
|
431
431
|
);
|
|
432
432
|
}
|
|
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, a, n) {
|
|
437
|
+
const o = this.Cesium.Rectangle.fromDegrees(e, t, i, a), s = this.Cesium.Cartesian3.fromDegreesArray([
|
|
438
438
|
e,
|
|
439
439
|
t,
|
|
440
440
|
i,
|
|
441
441
|
t,
|
|
442
442
|
i,
|
|
443
|
-
|
|
443
|
+
a,
|
|
444
444
|
e,
|
|
445
|
-
|
|
445
|
+
a,
|
|
446
446
|
e,
|
|
447
447
|
t
|
|
448
448
|
]), h = this.viewer.entities.add({
|
|
@@ -463,7 +463,7 @@ class Je {
|
|
|
463
463
|
clampToGround: !0
|
|
464
464
|
},
|
|
465
465
|
label: {
|
|
466
|
-
text:
|
|
466
|
+
text: n,
|
|
467
467
|
font: "14px sans-serif",
|
|
468
468
|
fillColor: this.Cesium.Color.BLACK,
|
|
469
469
|
outlineColor: this.Cesium.Color.WHITE,
|
|
@@ -504,30 +504,30 @@ class Je {
|
|
|
504
504
|
t && this._tileLoadListener && (t.tileLoadProgressEvent.removeEventListener(this._tileLoadListener), this._tileLoadListener = null), this._updateTimer !== null && (clearTimeout(this._updateTimer), this._updateTimer = null), this.labelPool.reset(), this._clearDebugGrids(), this._removeDebugImageryLayer();
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
var
|
|
508
|
-
function
|
|
509
|
-
return typeof r == "symbol" ||
|
|
507
|
+
var ht = "[object Symbol]";
|
|
508
|
+
function Z(r) {
|
|
509
|
+
return typeof r == "symbol" || q(r) && ce(r) == ht;
|
|
510
510
|
}
|
|
511
|
-
function
|
|
512
|
-
for (var t = -1, i = r == null ? 0 : r.length,
|
|
513
|
-
|
|
514
|
-
return
|
|
511
|
+
function ye(r, e) {
|
|
512
|
+
for (var t = -1, i = r == null ? 0 : r.length, a = Array(i); ++t < i; )
|
|
513
|
+
a[t] = e(r[t], t, r);
|
|
514
|
+
return a;
|
|
515
515
|
}
|
|
516
|
-
var
|
|
517
|
-
function
|
|
516
|
+
var oe = R ? R.prototype : void 0, se = oe ? oe.toString : void 0;
|
|
517
|
+
function ve(r) {
|
|
518
518
|
if (typeof r == "string")
|
|
519
519
|
return r;
|
|
520
|
-
if (
|
|
521
|
-
return
|
|
522
|
-
if (
|
|
523
|
-
return
|
|
520
|
+
if (w(r))
|
|
521
|
+
return ye(r, ve) + "";
|
|
522
|
+
if (Z(r))
|
|
523
|
+
return se ? se.call(r) : "";
|
|
524
524
|
var e = r + "";
|
|
525
525
|
return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function be(r) {
|
|
528
528
|
return r;
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function ct(r, e, t) {
|
|
531
531
|
switch (t.length) {
|
|
532
532
|
case 0:
|
|
533
533
|
return r.call(e);
|
|
@@ -540,238 +540,238 @@ function et(r, e, t) {
|
|
|
540
540
|
}
|
|
541
541
|
return r.apply(e, t);
|
|
542
542
|
}
|
|
543
|
-
var
|
|
544
|
-
function
|
|
543
|
+
var gt = 800, dt = 16, ut = Date.now;
|
|
544
|
+
function ft(r) {
|
|
545
545
|
var e = 0, t = 0;
|
|
546
546
|
return function() {
|
|
547
|
-
var i =
|
|
548
|
-
if (t = i,
|
|
549
|
-
if (++e >=
|
|
547
|
+
var i = ut(), a = dt - (i - t);
|
|
548
|
+
if (t = i, a > 0) {
|
|
549
|
+
if (++e >= gt)
|
|
550
550
|
return arguments[0];
|
|
551
551
|
} else
|
|
552
552
|
e = 0;
|
|
553
553
|
return r.apply(void 0, arguments);
|
|
554
554
|
};
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function mt(r) {
|
|
557
557
|
return function() {
|
|
558
558
|
return r;
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
|
-
var
|
|
562
|
-
return
|
|
561
|
+
var pt = ne ? function(r, e) {
|
|
562
|
+
return ne(r, "toString", {
|
|
563
563
|
configurable: !0,
|
|
564
564
|
enumerable: !1,
|
|
565
|
-
value:
|
|
565
|
+
value: mt(e),
|
|
566
566
|
writable: !0
|
|
567
567
|
});
|
|
568
|
-
} :
|
|
569
|
-
function
|
|
570
|
-
return e =
|
|
571
|
-
for (var i = arguments,
|
|
572
|
-
o[
|
|
573
|
-
|
|
574
|
-
for (var s = Array(e + 1); ++
|
|
575
|
-
s[
|
|
576
|
-
return s[e] = t(o),
|
|
568
|
+
} : be, Ce = ft(pt), le = Math.max;
|
|
569
|
+
function Me(r, e, t) {
|
|
570
|
+
return e = le(e === void 0 ? r.length - 1 : e, 0), function() {
|
|
571
|
+
for (var i = arguments, a = -1, n = le(i.length - e, 0), o = Array(n); ++a < n; )
|
|
572
|
+
o[a] = i[e + a];
|
|
573
|
+
a = -1;
|
|
574
|
+
for (var s = Array(e + 1); ++a < e; )
|
|
575
|
+
s[a] = i[a];
|
|
576
|
+
return s[e] = t(o), ct(r, this, s);
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
function
|
|
580
|
-
return
|
|
579
|
+
function yt(r, e) {
|
|
580
|
+
return Ce(Me(r, e, be), r + "");
|
|
581
581
|
}
|
|
582
|
-
function
|
|
583
|
-
if (!
|
|
582
|
+
function vt(r, e, t) {
|
|
583
|
+
if (!j(t))
|
|
584
584
|
return !1;
|
|
585
585
|
var i = typeof e;
|
|
586
|
-
return (i == "number" ?
|
|
586
|
+
return (i == "number" ? ge(t) && Ue(e, t.length) : i == "string" && e in t) ? de(t[e], r) : !1;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
return
|
|
590
|
-
var i = -1,
|
|
591
|
-
for (
|
|
588
|
+
function bt(r) {
|
|
589
|
+
return yt(function(e, t) {
|
|
590
|
+
var i = -1, a = t.length, n = a > 1 ? t[a - 1] : void 0, o = a > 2 ? t[2] : void 0;
|
|
591
|
+
for (n = r.length > 3 && typeof n == "function" ? (a--, n) : void 0, o && vt(t[0], t[1], o) && (n = a < 3 ? void 0 : n, a = 1), e = Object(e); ++i < a; ) {
|
|
592
592
|
var s = t[i];
|
|
593
|
-
s && r(e, s, i,
|
|
593
|
+
s && r(e, s, i, n);
|
|
594
594
|
}
|
|
595
595
|
return e;
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
|
-
var
|
|
599
|
-
function
|
|
600
|
-
if (
|
|
598
|
+
var Ct = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Mt = /^\w*$/;
|
|
599
|
+
function _t(r, e) {
|
|
600
|
+
if (w(r))
|
|
601
601
|
return !1;
|
|
602
602
|
var t = typeof r;
|
|
603
|
-
return t == "number" || t == "symbol" || t == "boolean" || r == null ||
|
|
603
|
+
return t == "number" || t == "symbol" || t == "boolean" || r == null || Z(r) ? !0 : Mt.test(r) || !Ct.test(r) || e != null && r in Object(e);
|
|
604
604
|
}
|
|
605
|
-
var
|
|
606
|
-
function
|
|
605
|
+
var Lt = "Expected a function";
|
|
606
|
+
function J(r, e) {
|
|
607
607
|
if (typeof r != "function" || e != null && typeof e != "function")
|
|
608
|
-
throw new TypeError(
|
|
608
|
+
throw new TypeError(Lt);
|
|
609
609
|
var t = function() {
|
|
610
|
-
var i = arguments,
|
|
611
|
-
if (
|
|
612
|
-
return
|
|
610
|
+
var i = arguments, a = e ? e.apply(this, i) : i[0], n = t.cache;
|
|
611
|
+
if (n.has(a))
|
|
612
|
+
return n.get(a);
|
|
613
613
|
var o = r.apply(this, i);
|
|
614
|
-
return t.cache =
|
|
614
|
+
return t.cache = n.set(a, o) || n, o;
|
|
615
615
|
};
|
|
616
|
-
return t.cache = new (
|
|
616
|
+
return t.cache = new (J.Cache || ue)(), t;
|
|
617
617
|
}
|
|
618
|
-
|
|
619
|
-
var
|
|
620
|
-
function
|
|
621
|
-
var e =
|
|
622
|
-
return t.size ===
|
|
618
|
+
J.Cache = ue;
|
|
619
|
+
var Tt = 500;
|
|
620
|
+
function wt(r) {
|
|
621
|
+
var e = J(r, function(i) {
|
|
622
|
+
return t.size === Tt && t.clear(), i;
|
|
623
623
|
}), t = e.cache;
|
|
624
624
|
return e;
|
|
625
625
|
}
|
|
626
|
-
var
|
|
626
|
+
var Pt = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, xt = /\\(\\)?/g, It = wt(function(r) {
|
|
627
627
|
var e = [];
|
|
628
|
-
return r.charCodeAt(0) === 46 && e.push(""), r.replace(
|
|
629
|
-
e.push(
|
|
628
|
+
return r.charCodeAt(0) === 46 && e.push(""), r.replace(Pt, function(t, i, a, n) {
|
|
629
|
+
e.push(a ? n.replace(xt, "$1") : i || t);
|
|
630
630
|
}), e;
|
|
631
631
|
});
|
|
632
|
-
function
|
|
633
|
-
return r == null ? "" :
|
|
632
|
+
function St(r) {
|
|
633
|
+
return r == null ? "" : ve(r);
|
|
634
634
|
}
|
|
635
|
-
function
|
|
636
|
-
return
|
|
635
|
+
function Q(r, e) {
|
|
636
|
+
return w(r) ? r : _t(r, e) ? [r] : It(St(r));
|
|
637
637
|
}
|
|
638
|
-
function
|
|
639
|
-
if (typeof r == "string" ||
|
|
638
|
+
function X(r) {
|
|
639
|
+
if (typeof r == "string" || Z(r))
|
|
640
640
|
return r;
|
|
641
641
|
var e = r + "";
|
|
642
642
|
return e == "0" && 1 / r == -1 / 0 ? "-0" : e;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
e =
|
|
644
|
+
function Et(r, e) {
|
|
645
|
+
e = Q(e, r);
|
|
646
646
|
for (var t = 0, i = e.length; r != null && t < i; )
|
|
647
|
-
r = r[
|
|
647
|
+
r = r[X(e[t++])];
|
|
648
648
|
return t && t == i ? r : void 0;
|
|
649
649
|
}
|
|
650
|
-
var
|
|
651
|
-
function
|
|
652
|
-
return
|
|
650
|
+
var he = R ? R.isConcatSpreadable : void 0;
|
|
651
|
+
function Dt(r) {
|
|
652
|
+
return w(r) || K(r) || !!(he && r && r[he]);
|
|
653
653
|
}
|
|
654
|
-
function
|
|
655
|
-
var
|
|
656
|
-
for (t || (t =
|
|
657
|
-
var s = r[
|
|
658
|
-
t(s) ?
|
|
654
|
+
function At(r, e, t, i, a) {
|
|
655
|
+
var n = -1, o = r.length;
|
|
656
|
+
for (t || (t = Dt), a || (a = []); ++n < o; ) {
|
|
657
|
+
var s = r[n];
|
|
658
|
+
t(s) ? qe(a, s) : a[a.length] = s;
|
|
659
659
|
}
|
|
660
|
-
return
|
|
660
|
+
return a;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
662
|
+
function Ot(r) {
|
|
663
663
|
var e = r == null ? 0 : r.length;
|
|
664
|
-
return e ?
|
|
664
|
+
return e ? At(r) : [];
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
return
|
|
666
|
+
function Gt(r) {
|
|
667
|
+
return Ce(Me(r, void 0, Ot), r + "");
|
|
668
668
|
}
|
|
669
|
-
var
|
|
670
|
-
function
|
|
671
|
-
if (!
|
|
669
|
+
var Ht = "[object Object]", Rt = Function.prototype, Nt = Object.prototype, _e = Rt.toString, kt = Nt.hasOwnProperty, Bt = _e.call(Object);
|
|
670
|
+
function Le(r) {
|
|
671
|
+
if (!q(r) || ce(r) != Ht)
|
|
672
672
|
return !1;
|
|
673
|
-
var e =
|
|
673
|
+
var e = je(r);
|
|
674
674
|
if (e === null)
|
|
675
675
|
return !0;
|
|
676
|
-
var t =
|
|
677
|
-
return typeof t == "function" && t instanceof t &&
|
|
676
|
+
var t = kt.call(e, "constructor") && e.constructor;
|
|
677
|
+
return typeof t == "function" && t instanceof t && _e.call(t) == Bt;
|
|
678
678
|
}
|
|
679
|
-
function
|
|
680
|
-
var i = -1,
|
|
681
|
-
e < 0 && (e = -e >
|
|
682
|
-
for (var
|
|
683
|
-
|
|
684
|
-
return
|
|
679
|
+
function Wt(r, e, t) {
|
|
680
|
+
var i = -1, a = r.length;
|
|
681
|
+
e < 0 && (e = -e > a ? 0 : a + e), t = t > a ? a : t, t < 0 && (t += a), a = e > t ? 0 : t - e >>> 0, e >>>= 0;
|
|
682
|
+
for (var n = Array(a); ++i < a; )
|
|
683
|
+
n[i] = r[i + e];
|
|
684
|
+
return n;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
686
|
+
function Ft(r) {
|
|
687
687
|
return function(e, t, i) {
|
|
688
|
-
for (var
|
|
689
|
-
var h = o[++
|
|
690
|
-
if (t(
|
|
688
|
+
for (var a = -1, n = Object(e), o = i(e), s = o.length; s--; ) {
|
|
689
|
+
var h = o[++a];
|
|
690
|
+
if (t(n[h], h, n) === !1)
|
|
691
691
|
break;
|
|
692
692
|
}
|
|
693
693
|
return e;
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
var
|
|
697
|
-
function
|
|
698
|
-
(t !== void 0 && !
|
|
696
|
+
var $t = Ft();
|
|
697
|
+
function Y(r, e, t) {
|
|
698
|
+
(t !== void 0 && !de(r[e], t) || t === void 0 && !(e in r)) && Ze(r, e, t);
|
|
699
699
|
}
|
|
700
|
-
function
|
|
701
|
-
return
|
|
700
|
+
function zt(r) {
|
|
701
|
+
return q(r) && ge(r);
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function U(r, e) {
|
|
704
704
|
if (!(e === "constructor" && typeof r[e] == "function") && e != "__proto__")
|
|
705
705
|
return r[e];
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
return
|
|
707
|
+
function Vt(r) {
|
|
708
|
+
return fe(r, me(r));
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
var s =
|
|
712
|
-
if (
|
|
713
|
-
|
|
710
|
+
function Kt(r, e, t, i, a, n, o) {
|
|
711
|
+
var s = U(r, t), h = U(e, t), g = o.get(h);
|
|
712
|
+
if (g) {
|
|
713
|
+
Y(r, t, g);
|
|
714
714
|
return;
|
|
715
715
|
}
|
|
716
|
-
var l =
|
|
716
|
+
var l = n ? n(s, h, t + "", r, e, o) : void 0, c = l === void 0;
|
|
717
717
|
if (c) {
|
|
718
|
-
var
|
|
719
|
-
l = h,
|
|
718
|
+
var d = w(h), f = !d && Je(h), u = !d && !f && Qe(h);
|
|
719
|
+
l = h, d || f || u ? w(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), a(l, h, i, n, o), o.delete(h)), Y(r, t, l);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
r !== e &&
|
|
725
|
-
if (
|
|
726
|
-
|
|
723
|
+
function Te(r, e, t, i, a) {
|
|
724
|
+
r !== e && $t(e, function(n, o) {
|
|
725
|
+
if (a || (a = new at()), j(n))
|
|
726
|
+
Kt(r, e, o, t, Te, i, a);
|
|
727
727
|
else {
|
|
728
|
-
var s = i ? i(
|
|
729
|
-
s === void 0 && (s =
|
|
728
|
+
var s = i ? i(U(r, o), n, o + "", r, e, a) : void 0;
|
|
729
|
+
s === void 0 && (s = n), Y(r, o, s);
|
|
730
730
|
}
|
|
731
|
-
},
|
|
731
|
+
}, me);
|
|
732
732
|
}
|
|
733
|
-
function
|
|
733
|
+
function Xt(r) {
|
|
734
734
|
var e = r == null ? 0 : r.length;
|
|
735
735
|
return e ? r[e - 1] : void 0;
|
|
736
736
|
}
|
|
737
|
-
function
|
|
738
|
-
return e.length < 2 ? r :
|
|
737
|
+
function Yt(r, e) {
|
|
738
|
+
return e.length < 2 ? r : Et(r, Wt(e, 0, -1));
|
|
739
739
|
}
|
|
740
|
-
var
|
|
741
|
-
|
|
742
|
-
}),
|
|
743
|
-
function
|
|
744
|
-
e =
|
|
740
|
+
var Ut = bt(function(r, e, t) {
|
|
741
|
+
Te(r, e, t);
|
|
742
|
+
}), qt = Object.prototype, jt = qt.hasOwnProperty;
|
|
743
|
+
function Zt(r, e) {
|
|
744
|
+
e = Q(e, r);
|
|
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 a = X(e[t]);
|
|
750
|
+
if (a === "__proto__" && !jt.call(r, "__proto__") || (a === "constructor" || a === "prototype") && t < i - 1)
|
|
751
751
|
return !1;
|
|
752
752
|
}
|
|
753
|
-
var
|
|
754
|
-
return
|
|
753
|
+
var n = Yt(r, e);
|
|
754
|
+
return n == null || delete n[X(Xt(e))];
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
return
|
|
756
|
+
function Jt(r) {
|
|
757
|
+
return Le(r) ? void 0 : r;
|
|
758
758
|
}
|
|
759
|
-
var
|
|
759
|
+
var Qt = 1, ei = 2, ti = 4, ii = Gt(function(r, e) {
|
|
760
760
|
var t = {};
|
|
761
761
|
if (r == null)
|
|
762
762
|
return t;
|
|
763
763
|
var i = !1;
|
|
764
|
-
e =
|
|
765
|
-
return
|
|
766
|
-
}),
|
|
767
|
-
for (var
|
|
768
|
-
|
|
764
|
+
e = ye(e, function(n) {
|
|
765
|
+
return n = Q(n, r), i || (i = n.length > 1), n;
|
|
766
|
+
}), fe(r, nt(r), t), i && (t = ot(t, Qt | ei | ti, Jt));
|
|
767
|
+
for (var a = e.length; a--; )
|
|
768
|
+
Zt(t, e[a]);
|
|
769
769
|
return t;
|
|
770
770
|
});
|
|
771
|
-
function
|
|
771
|
+
function ri(r, e) {
|
|
772
772
|
const t = e.materialType || "DynamicImgMaterial" + Date.now() + Math.floor(Math.random() * 1e3);
|
|
773
|
-
function i(
|
|
774
|
-
this._definitionChanged = new r.Event(), this._color =
|
|
773
|
+
function i(n) {
|
|
774
|
+
this._definitionChanged = new r.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: {
|
|
@@ -787,24 +787,24 @@ function Ut(r, e) {
|
|
|
787
787
|
color: r.createPropertyDescriptor("color")
|
|
788
788
|
}), i.prototype.getType = function() {
|
|
789
789
|
return t;
|
|
790
|
-
}, i.prototype.getValue = function(
|
|
790
|
+
}, i.prototype.getValue = function(n, o) {
|
|
791
791
|
return r.defined(o) || (o = {}), o.color = r.Property.getValueOrClonedDefault(
|
|
792
792
|
this._color,
|
|
793
|
-
|
|
793
|
+
n,
|
|
794
794
|
r.Color.WHITE,
|
|
795
795
|
o.color
|
|
796
796
|
), o.image = e.image, o;
|
|
797
|
-
}, i.prototype.equals = function(
|
|
798
|
-
return this ===
|
|
797
|
+
}, i.prototype.equals = function(n) {
|
|
798
|
+
return this === n || n instanceof i && r.Property.equals(this._color, n._color);
|
|
799
799
|
};
|
|
800
|
-
const
|
|
800
|
+
const a = function(n) {
|
|
801
801
|
return `
|
|
802
802
|
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
803
803
|
{
|
|
804
804
|
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
805
805
|
vec2 st = materialInput.st;
|
|
806
|
-
float time = fract(mod(float(czm_frameNumber * 33.0) , float(${
|
|
807
|
-
${
|
|
806
|
+
float time = fract(mod(float(czm_frameNumber * 33.0) , float(${n.duration})) / float(${n.duration}));
|
|
807
|
+
${n.freely === "vertical" ? `vec4 colorImage = texture(image, vec2(fract(float(${n.count}) *st.t ${n.direction} time), fract(st.s)));` : `vec4 colorImage = texture(image, vec2(fract(float(${n.count}) *st.s ${n.direction} time), fract(st.t)));`}
|
|
808
808
|
material.diffuse = color.rgb;
|
|
809
809
|
material.alpha = colorImage.a;
|
|
810
810
|
return material;
|
|
@@ -818,7 +818,7 @@ function Ut(r, e) {
|
|
|
818
818
|
image: e.image,
|
|
819
819
|
time: 1e3
|
|
820
820
|
},
|
|
821
|
-
source:
|
|
821
|
+
source: a({
|
|
822
822
|
count: e.count,
|
|
823
823
|
freely: e.freely || "",
|
|
824
824
|
direction: e.direction,
|
|
@@ -830,10 +830,10 @@ function Ut(r, e) {
|
|
|
830
830
|
}
|
|
831
831
|
}), new i(e);
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function we(r, e) {
|
|
834
834
|
const t = e.MaterialType || "wallType" + (/* @__PURE__ */ new Date()).getTime() + parseInt(Math.random() * 1e3 + "");
|
|
835
|
-
function i(
|
|
836
|
-
this._definitionChanged = new r.Event(), this._color = void 0, this._colorSubscription = void 0, this.color =
|
|
835
|
+
function i(n) {
|
|
836
|
+
this._definitionChanged = new r.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: {
|
|
@@ -849,20 +849,20 @@ function be(r, e) {
|
|
|
849
849
|
color: r.createPropertyDescriptor("color")
|
|
850
850
|
}), i.prototype.getType = function() {
|
|
851
851
|
return t;
|
|
852
|
-
}, i.prototype.getValue = function(
|
|
852
|
+
}, i.prototype.getValue = function(n, o) {
|
|
853
853
|
return r.defined(o) || (o = {}), o.image = e.image, this.duration && (o.time = ((/* @__PURE__ */ new Date()).getTime() - this._time) % this.duration / this.duration), o;
|
|
854
|
-
}, i.prototype.equals = function(
|
|
855
|
-
return this ===
|
|
854
|
+
}, i.prototype.equals = function(n) {
|
|
855
|
+
return this === n || n instanceof i && r.Property.equals(this._color, n._color);
|
|
856
856
|
};
|
|
857
|
-
const
|
|
857
|
+
const a = function(n) {
|
|
858
858
|
let o = `czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
859
859
|
{
|
|
860
860
|
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
861
861
|
vec2 st = materialInput.st;
|
|
862
862
|
|
|
863
863
|
`;
|
|
864
|
-
return
|
|
865
|
-
` : o += "vec4 colorImage = texture(image, vec2(fract(float(" +
|
|
864
|
+
return n.freely == "vertical" ? o += "vec4 colorImage = texture(image, vec2(fract(float(" + n.count + ")*st.t " + n.direction + ` time), fract(st.s)));
|
|
865
|
+
` : o += "vec4 colorImage = texture(image, vec2(fract(float(" + n.count + ")*st.s " + n.direction + ` time), fract(st.t)));
|
|
866
866
|
`, o += `vec4 fragColor;
|
|
867
867
|
fragColor.rgb = (color.rgb) / 1.0;
|
|
868
868
|
fragColor = czm_gammaCorrect(fragColor);
|
|
@@ -882,7 +882,7 @@ function be(r, e) {
|
|
|
882
882
|
image: e.image,
|
|
883
883
|
time: 0
|
|
884
884
|
},
|
|
885
|
-
source:
|
|
885
|
+
source: a({
|
|
886
886
|
count: e.count,
|
|
887
887
|
freely: e.freely,
|
|
888
888
|
direction: e.direction
|
|
@@ -893,11 +893,11 @@ function be(r, e) {
|
|
|
893
893
|
}
|
|
894
894
|
}), new i(e);
|
|
895
895
|
}
|
|
896
|
-
function
|
|
897
|
-
const t = r.Color, i = Object.defineProperties,
|
|
898
|
-
let
|
|
896
|
+
function ai(r, e) {
|
|
897
|
+
const t = r.Color, i = Object.defineProperties, a = r.Event, n = r.createPropertyDescriptor, o = r.Property, s = (c, d) => c === void 0 ? d : c, h = {};
|
|
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 a(), 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: {
|
|
@@ -911,22 +911,22 @@ function Xt(r, e) {
|
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
913
|
}), l.prototype.getType = function(c) {
|
|
914
|
-
return
|
|
915
|
-
}, l.prototype.getValue = function(c,
|
|
916
|
-
return
|
|
914
|
+
return g;
|
|
915
|
+
}, l.prototype.getValue = function(c, d) {
|
|
916
|
+
return d || (d = {}), d.color = o.getValueOrClonedDefault(
|
|
917
917
|
this._color,
|
|
918
918
|
c,
|
|
919
919
|
r.Color.WHITE,
|
|
920
|
-
|
|
921
|
-
),
|
|
920
|
+
d.color
|
|
921
|
+
), d.duration = this._duration, d;
|
|
922
922
|
}, l.prototype.equals = function(c) {
|
|
923
923
|
return this === c || c instanceof l && o.equals(this._color, c._color);
|
|
924
924
|
}, i(l.prototype, {
|
|
925
|
-
color:
|
|
926
|
-
duration:
|
|
927
|
-
}), r.PolylineFlowMaterialProperty = l, r.Material._materialCache.addMaterial(
|
|
925
|
+
color: n("color"),
|
|
926
|
+
duration: n("duration")
|
|
927
|
+
}), r.PolylineFlowMaterialProperty = l, r.Material._materialCache.addMaterial(g, {
|
|
928
928
|
fabric: {
|
|
929
|
-
type:
|
|
929
|
+
type: g,
|
|
930
930
|
uniforms: {
|
|
931
931
|
color: new t(1, 1, 1, 1),
|
|
932
932
|
duration: 45
|
|
@@ -956,7 +956,7 @@ function Xt(r, e) {
|
|
|
956
956
|
}
|
|
957
957
|
}), new l(e);
|
|
958
958
|
}
|
|
959
|
-
class
|
|
959
|
+
class Pe {
|
|
960
960
|
categoryMap = /* @__PURE__ */ new Map();
|
|
961
961
|
CategoryGet = {};
|
|
962
962
|
constructor() {
|
|
@@ -969,15 +969,15 @@ class Le {
|
|
|
969
969
|
* 注册材质
|
|
970
970
|
*/
|
|
971
971
|
register(e) {
|
|
972
|
-
const { themeKey: t, material: i, force:
|
|
973
|
-
this.categoryMap.has(
|
|
974
|
-
const o = this.categoryMap.get(
|
|
972
|
+
const { themeKey: t, material: i, force: a = !1, category: n = "default" } = e;
|
|
973
|
+
this.categoryMap.has(n) || this.categoryMap.set(n, /* @__PURE__ */ new Map());
|
|
974
|
+
const o = this.categoryMap.get(n);
|
|
975
975
|
if (o.has(t))
|
|
976
|
-
if (
|
|
977
|
-
console.info(`[MaterialManager] themeKey '${t}' 在分类 '${
|
|
976
|
+
if (a)
|
|
977
|
+
console.info(`[MaterialManager] themeKey '${t}' 在分类 '${n}' 已被覆盖`);
|
|
978
978
|
else {
|
|
979
979
|
console.warn(
|
|
980
|
-
`[MaterialManager] 已存在 themeKey '${t}' 在分类 '${
|
|
980
|
+
`[MaterialManager] 已存在 themeKey '${t}' 在分类 '${n}',如需覆盖请设置 force = true`
|
|
981
981
|
);
|
|
982
982
|
return;
|
|
983
983
|
}
|
|
@@ -991,11 +991,14 @@ class Le {
|
|
|
991
991
|
category: t,
|
|
992
992
|
options: i
|
|
993
993
|
}) {
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
994
|
+
if (t = t || "default", this.CategoryGet[t])
|
|
995
|
+
return this.CategoryGet[t]({
|
|
996
|
+
themeKey: e,
|
|
997
|
+
materialMap: this.categoryMap,
|
|
998
|
+
options: i || {}
|
|
999
|
+
});
|
|
1000
|
+
const a = this.categoryMap.get(t)?.get(e);
|
|
1001
|
+
return typeof a == "function" && a.__materialFactory === !0 ? a(i || {}) : a;
|
|
999
1002
|
}
|
|
1000
1003
|
/**
|
|
1001
1004
|
* 是否存在
|
|
@@ -1009,8 +1012,8 @@ class Le {
|
|
|
1009
1012
|
remove(e, t = "default") {
|
|
1010
1013
|
const i = this.categoryMap.get(t);
|
|
1011
1014
|
if (!i) return;
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1015
|
+
const a = i.get(e);
|
|
1016
|
+
a?.destroy && a.destroy(), i.delete(e), i.size === 0 && this.categoryMap.delete(t);
|
|
1014
1017
|
}
|
|
1015
1018
|
/**
|
|
1016
1019
|
* 获取某分类下的所有 keys
|
|
@@ -1045,7 +1048,7 @@ class Le {
|
|
|
1045
1048
|
return [...this.categoryMap.keys()];
|
|
1046
1049
|
}
|
|
1047
1050
|
}
|
|
1048
|
-
class
|
|
1051
|
+
class ni {
|
|
1049
1052
|
id;
|
|
1050
1053
|
entities = [];
|
|
1051
1054
|
primitives = [];
|
|
@@ -1053,8 +1056,8 @@ class qt {
|
|
|
1053
1056
|
aggregator;
|
|
1054
1057
|
cardPool;
|
|
1055
1058
|
constructor(e) {
|
|
1056
|
-
const { id: t, entities: i = [], primitives:
|
|
1057
|
-
this.id = t, this.entities = i, this.primitives =
|
|
1059
|
+
const { id: t, entities: i = [], primitives: a = [], dataItem: n = {}, aggregator: o, cardPool: s } = e;
|
|
1060
|
+
this.id = t, this.entities = i, this.primitives = a, this.dataItem = n, this.aggregator = o, this.cardPool = s;
|
|
1058
1061
|
}
|
|
1059
1062
|
// 改造 setVisible 方法,支持 Entity 和 Primitive 的可见性控制
|
|
1060
1063
|
setVisible(e) {
|
|
@@ -1062,7 +1065,7 @@ class qt {
|
|
|
1062
1065
|
t && (t.show = e);
|
|
1063
1066
|
}), this.primitives.forEach((t) => {
|
|
1064
1067
|
t && (t.show = e);
|
|
1065
|
-
}), 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, a) => ({
|
|
1066
1069
|
id: this.dataItem.id,
|
|
1067
1070
|
data: {
|
|
1068
1071
|
...this.dataItem,
|
|
@@ -1081,7 +1084,7 @@ class qt {
|
|
|
1081
1084
|
}), this.primitives = [], t && this.aggregator && Array.isArray(this.dataItem.billboard) && this.aggregator.removePointsById([this.dataItem.id]), t && this.cardPool && this.dataItem.card && this.cardPool.removeByIds([this.dataItem.id]), this.dataItem.id;
|
|
1082
1085
|
}
|
|
1083
1086
|
}
|
|
1084
|
-
class
|
|
1087
|
+
class oi {
|
|
1085
1088
|
id;
|
|
1086
1089
|
groupMap = /* @__PURE__ */ new Map();
|
|
1087
1090
|
Cesium;
|
|
@@ -1089,10 +1092,10 @@ class jt {
|
|
|
1089
1092
|
materialManager;
|
|
1090
1093
|
aggregator;
|
|
1091
1094
|
cardPool;
|
|
1092
|
-
constructor(e, t, i,
|
|
1093
|
-
this.id = e, this.Cesium = t, this.viewer = i, this.materialManager =
|
|
1095
|
+
constructor(e, t, i, a, n, o) {
|
|
1096
|
+
this.id = e, this.Cesium = t, this.viewer = i, this.materialManager = a, this.aggregator = n, this.cardPool = o, this.aggregator.labelPool.eventBus.addListener(G.Click, {
|
|
1094
1097
|
name: "BufferedHierarchicalAggregator_maker_click",
|
|
1095
|
-
fn: (h,
|
|
1098
|
+
fn: (h, g) => {
|
|
1096
1099
|
this.cardPool.showByIds([h.data.id]);
|
|
1097
1100
|
}
|
|
1098
1101
|
}), new t.ScreenSpaceEventHandler(i.scene.canvas).setInputAction(() => {
|
|
@@ -1106,14 +1109,14 @@ class jt {
|
|
|
1106
1109
|
themeKey: e.theme,
|
|
1107
1110
|
category: "polyline",
|
|
1108
1111
|
options: e
|
|
1109
|
-
}),
|
|
1110
|
-
let
|
|
1112
|
+
}), a = Array.isArray(e.positions[0]) ? e.positions.flat() : e.positions;
|
|
1113
|
+
let n = {
|
|
1111
1114
|
...e
|
|
1112
1115
|
};
|
|
1113
|
-
return i && (
|
|
1116
|
+
return i && (n.material = i), this.viewer.entities.add({
|
|
1114
1117
|
polyline: {
|
|
1115
|
-
...
|
|
1116
|
-
positions: this.Cesium.Cartesian3.fromDegreesArrayHeights(
|
|
1118
|
+
...n,
|
|
1119
|
+
positions: this.Cesium.Cartesian3.fromDegreesArrayHeights(a)
|
|
1117
1120
|
},
|
|
1118
1121
|
show: (e.show ?? !0) && t
|
|
1119
1122
|
});
|
|
@@ -1124,18 +1127,21 @@ class jt {
|
|
|
1124
1127
|
themeKey: e.theme,
|
|
1125
1128
|
category: "wall",
|
|
1126
1129
|
options: e
|
|
1127
|
-
}),
|
|
1128
|
-
|
|
1130
|
+
}), a = (y, p = 0) => {
|
|
1131
|
+
const S = Number(y);
|
|
1132
|
+
return Number.isFinite(S) ? S : p;
|
|
1133
|
+
}, n = e.positions.map((y) => a(y?.[2], 0)), o = a(e.minHeight, 0), s = a(e.maxHeight, 0), h = (y) => Array.isArray(y) && y.length === e.positions.length && y.every((p) => Math.abs(a(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) => a(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) => a(y, 0)) : n).map((y) => y + s), b = e.positions.map(
|
|
1134
|
+
(y) => this.Cesium.Cartesian3.fromDegrees(y[0], y[1], y[2] || 0)
|
|
1129
1135
|
);
|
|
1130
|
-
let
|
|
1136
|
+
let _ = {
|
|
1131
1137
|
...e
|
|
1132
1138
|
};
|
|
1133
|
-
return i && (
|
|
1139
|
+
return i && (_.material = i), this.viewer.entities.add({
|
|
1134
1140
|
wall: {
|
|
1135
|
-
...
|
|
1136
|
-
positions:
|
|
1137
|
-
minimumHeights:
|
|
1138
|
-
maximumHeights:
|
|
1141
|
+
..._,
|
|
1142
|
+
positions: b,
|
|
1143
|
+
minimumHeights: d,
|
|
1144
|
+
maximumHeights: m
|
|
1139
1145
|
},
|
|
1140
1146
|
show: (e.show ?? !0) && t
|
|
1141
1147
|
});
|
|
@@ -1146,10 +1152,10 @@ class jt {
|
|
|
1146
1152
|
themeKey: e.theme,
|
|
1147
1153
|
category: "polygon",
|
|
1148
1154
|
options: e
|
|
1149
|
-
}),
|
|
1150
|
-
let l = Array.isArray(
|
|
1155
|
+
}), a = Array.isArray(e.hierarchy[0]) ? e.hierarchy.flat() : e.hierarchy, n = this.Cesium.Cartesian3.fromDegreesArrayHeights(a), o = e.holes?.map((g) => {
|
|
1156
|
+
let l = Array.isArray(g[0]) ? e.hierarchy.flat() : e.hole;
|
|
1151
1157
|
return this.Cesium.Cartesian3.fromDegreesArrayHeights(l.flat());
|
|
1152
|
-
}) || [], s = new this.Cesium.PolygonHierarchy(
|
|
1158
|
+
}) || [], s = new this.Cesium.PolygonHierarchy(n, o);
|
|
1153
1159
|
let h = {
|
|
1154
1160
|
...e
|
|
1155
1161
|
};
|
|
@@ -1164,12 +1170,12 @@ class jt {
|
|
|
1164
1170
|
}
|
|
1165
1171
|
createBillboardPoints(e) {
|
|
1166
1172
|
return !e.billboard?.length || !this.aggregator ? [] : e.billboard.map((t) => {
|
|
1167
|
-
const [i,
|
|
1173
|
+
const [i, a, n = 0] = t.position || [0, 0, 0];
|
|
1168
1174
|
return {
|
|
1169
1175
|
id: e.id,
|
|
1170
1176
|
lon: i,
|
|
1171
|
-
lat:
|
|
1172
|
-
height:
|
|
1177
|
+
lat: a,
|
|
1178
|
+
height: n,
|
|
1173
1179
|
name: t.options?.text || "",
|
|
1174
1180
|
data: e,
|
|
1175
1181
|
style: { zIndex: e.zIndex || "1" }
|
|
@@ -1192,22 +1198,22 @@ class jt {
|
|
|
1192
1198
|
addGroup(e, t = !0) {
|
|
1193
1199
|
const i = e.id || `${Date.now()}`;
|
|
1194
1200
|
this.removeGroup(i);
|
|
1195
|
-
const
|
|
1201
|
+
const a = [], n = e.show !== !1;
|
|
1196
1202
|
(e.polyline || []).forEach((h) => {
|
|
1197
|
-
const
|
|
1198
|
-
|
|
1203
|
+
const g = this.createPolyline(h, n);
|
|
1204
|
+
g && a.push(g);
|
|
1199
1205
|
}), (e.wall || []).forEach((h) => {
|
|
1200
|
-
const
|
|
1201
|
-
|
|
1206
|
+
const g = this.createWall(h, n);
|
|
1207
|
+
g && a.push(g);
|
|
1202
1208
|
}), (e.polygon || []).forEach((h) => {
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1209
|
+
const g = this.createPolygon(h, n);
|
|
1210
|
+
g && a.push(g);
|
|
1205
1211
|
});
|
|
1206
1212
|
const o = this.createBillboardPoints(e);
|
|
1207
1213
|
o.length && t && this.aggregator.appendPoints(o, !1), this.createCard(e);
|
|
1208
|
-
const s = new
|
|
1214
|
+
const s = new ni({
|
|
1209
1215
|
id: i,
|
|
1210
|
-
entities:
|
|
1216
|
+
entities: a,
|
|
1211
1217
|
primitives: [],
|
|
1212
1218
|
dataItem: e,
|
|
1213
1219
|
aggregator: this.aggregator,
|
|
@@ -1216,7 +1222,7 @@ class jt {
|
|
|
1216
1222
|
return this.groupMap.set(i, s), o;
|
|
1217
1223
|
}
|
|
1218
1224
|
async addGroups(e) {
|
|
1219
|
-
const i = e.map((
|
|
1225
|
+
const i = e.map((a) => this.addGroup(a, !1)).flat();
|
|
1220
1226
|
i.length > 0 && this.aggregator && this.aggregator.appendPoints(i, !1);
|
|
1221
1227
|
}
|
|
1222
1228
|
removeGroup(e) {
|
|
@@ -1226,10 +1232,10 @@ class jt {
|
|
|
1226
1232
|
removeGroups(e) {
|
|
1227
1233
|
let t = [];
|
|
1228
1234
|
for (const i of e) {
|
|
1229
|
-
const
|
|
1230
|
-
if (
|
|
1231
|
-
let
|
|
1232
|
-
this.groupMap.delete(i), t.push(
|
|
1235
|
+
const a = this.groupMap.get(i);
|
|
1236
|
+
if (a) {
|
|
1237
|
+
let n = a.removeAll(this.viewer, !1);
|
|
1238
|
+
this.groupMap.delete(i), t.push(n);
|
|
1233
1239
|
}
|
|
1234
1240
|
}
|
|
1235
1241
|
this.aggregator.removePointsById(t), this.cardPool.removeByIds(t);
|
|
@@ -1239,10 +1245,10 @@ class jt {
|
|
|
1239
1245
|
t && (t.removeAll(this.viewer), this.groupMap.delete(e.id)), this.addGroup(e);
|
|
1240
1246
|
}
|
|
1241
1247
|
async updateGroups(e) {
|
|
1242
|
-
this.aggregator.removePointsById(e.map((
|
|
1243
|
-
const i = e.map((
|
|
1244
|
-
const
|
|
1245
|
-
return
|
|
1248
|
+
this.aggregator.removePointsById(e.map((a) => a.id)), this.cardPool.removeByIds(e.map((a) => a.id));
|
|
1249
|
+
const i = e.map((a) => {
|
|
1250
|
+
const n = this.groupMap.get(a.id);
|
|
1251
|
+
return n && (n.removeAll(this.viewer, !1), this.groupMap.delete(a.id)), this.addGroup(a, !1);
|
|
1246
1252
|
}).flat();
|
|
1247
1253
|
i.length > 0 && this.aggregator && this.aggregator.appendPoints(i, !1);
|
|
1248
1254
|
}
|
|
@@ -1253,20 +1259,20 @@ class jt {
|
|
|
1253
1259
|
this.groupMap.forEach((e) => e.removeAll(this.viewer)), this.groupMap.clear();
|
|
1254
1260
|
}
|
|
1255
1261
|
}
|
|
1256
|
-
class
|
|
1262
|
+
class si {
|
|
1257
1263
|
Cesium;
|
|
1258
1264
|
viewer;
|
|
1259
1265
|
layerMap = /* @__PURE__ */ new Map();
|
|
1260
1266
|
materialManager;
|
|
1261
1267
|
aggregator;
|
|
1262
1268
|
cardPool;
|
|
1263
|
-
constructor(e, t, i,
|
|
1264
|
-
this.Cesium = e, this.viewer = t, this.materialManager = i, this.aggregator =
|
|
1269
|
+
constructor(e, t, i, a, n) {
|
|
1270
|
+
this.Cesium = e, this.viewer = t, this.materialManager = i, this.aggregator = a, this.cardPool = n;
|
|
1265
1271
|
}
|
|
1266
1272
|
addLayer(e) {
|
|
1267
1273
|
this.layerMap.has(e) || this.layerMap.set(
|
|
1268
1274
|
e,
|
|
1269
|
-
new
|
|
1275
|
+
new oi(
|
|
1270
1276
|
e,
|
|
1271
1277
|
this.Cesium,
|
|
1272
1278
|
this.viewer,
|
|
@@ -1301,7 +1307,7 @@ class Zt {
|
|
|
1301
1307
|
this.layerMap.get(e)?.removeGroups(t);
|
|
1302
1308
|
}
|
|
1303
1309
|
}
|
|
1304
|
-
class
|
|
1310
|
+
class li {
|
|
1305
1311
|
labelId;
|
|
1306
1312
|
cardId;
|
|
1307
1313
|
opt;
|
|
@@ -1309,15 +1315,15 @@ class Jt {
|
|
|
1309
1315
|
MaterialManager;
|
|
1310
1316
|
instance;
|
|
1311
1317
|
constructor(e) {
|
|
1312
|
-
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 Pe(), this.instance = this.initCore(e, e.eventBus, e.cardEventBus);
|
|
1313
1319
|
}
|
|
1314
1320
|
//初始化标记管理
|
|
1315
1321
|
initCore(e, t, i) {
|
|
1316
|
-
let { Cesium:
|
|
1317
|
-
t || (t = new
|
|
1318
|
-
const s = new
|
|
1322
|
+
let { Cesium: a, viewer: n, aggregatorOptions: o } = e;
|
|
1323
|
+
t || (t = new V()), i || (i = new V());
|
|
1324
|
+
const s = new ie(a, n, this.labelId, t);
|
|
1319
1325
|
s.setOcclusionOptions({ distanceEpsilon: 1 }), s.setOcclusionEnabled(!1);
|
|
1320
|
-
const h = new
|
|
1326
|
+
const h = new ie(a, n, this.cardId, i, !1), g = new lt(a, n, {
|
|
1321
1327
|
//聚合
|
|
1322
1328
|
threshold: o?.threshold || 16,
|
|
1323
1329
|
displayLimit: o?.displayLimit || 300,
|
|
@@ -1331,15 +1337,15 @@ class Jt {
|
|
|
1331
1337
|
// 普通点的默认主题
|
|
1332
1338
|
...o,
|
|
1333
1339
|
labelPool: s
|
|
1334
|
-
}), l = this.MaterialManager, c = new
|
|
1340
|
+
}), l = this.MaterialManager, c = new si(
|
|
1335
1341
|
//实体图层管理
|
|
1336
|
-
n,
|
|
1337
1342
|
a,
|
|
1343
|
+
n,
|
|
1338
1344
|
l,
|
|
1339
|
-
|
|
1345
|
+
g,
|
|
1340
1346
|
h
|
|
1341
1347
|
);
|
|
1342
|
-
return { materialManager: l, entityLayerManager: c, cardPool: h, labelPool: s, aggregator:
|
|
1348
|
+
return { materialManager: l, entityLayerManager: c, cardPool: h, labelPool: s, aggregator: g, eventBus: t, cardEventBus: i };
|
|
1343
1349
|
}
|
|
1344
1350
|
//添加标记
|
|
1345
1351
|
set(e) {
|
|
@@ -1353,21 +1359,21 @@ class Jt {
|
|
|
1353
1359
|
//添加
|
|
1354
1360
|
add(e) {
|
|
1355
1361
|
let t = [];
|
|
1356
|
-
|
|
1362
|
+
w(e) ? t = e : t.push(e), t.forEach((i) => {
|
|
1357
1363
|
this.entityList.set(i.id, i);
|
|
1358
1364
|
}), this.instance.entityLayerManager.getLayer("Layer_default") || this.instance.entityLayerManager.addLayer("Layer_default"), this.instance.entityLayerManager.addGroupsToLayer("Layer_default", t);
|
|
1359
1365
|
}
|
|
1360
1366
|
//更新标记
|
|
1361
1367
|
update(e, t = !0) {
|
|
1362
1368
|
let i = [];
|
|
1363
|
-
|
|
1364
|
-
const
|
|
1365
|
-
const o = this.entityList.get(
|
|
1369
|
+
w(e) ? i = e : i.push(e);
|
|
1370
|
+
const a = i.map((n) => {
|
|
1371
|
+
const o = this.entityList.get(n.id);
|
|
1366
1372
|
if (!o) return;
|
|
1367
|
-
let s =
|
|
1368
|
-
return this.entityList.set(
|
|
1373
|
+
let s = Ut({}, o, n);
|
|
1374
|
+
return this.entityList.set(n.id, s), s;
|
|
1369
1375
|
}).filter(Boolean);
|
|
1370
|
-
t && this.instance.entityLayerManager.updateGroupToLayer("Layer_default",
|
|
1376
|
+
t && this.instance.entityLayerManager.updateGroupToLayer("Layer_default", a);
|
|
1371
1377
|
}
|
|
1372
1378
|
//获取标记
|
|
1373
1379
|
getById(e) {
|
|
@@ -1383,7 +1389,7 @@ class Jt {
|
|
|
1383
1389
|
//删除标记
|
|
1384
1390
|
delete(e) {
|
|
1385
1391
|
let t = [];
|
|
1386
|
-
|
|
1392
|
+
w(e) ? t = e : t.push(e), t.forEach((i) => {
|
|
1387
1393
|
this.entityList.delete(i);
|
|
1388
1394
|
}), this.instance.entityLayerManager.removeGroups("Layer_default", t);
|
|
1389
1395
|
}
|
|
@@ -1410,14 +1416,245 @@ class Jt {
|
|
|
1410
1416
|
return this.instance?.labelPool?.getOcclusionOptions?.() || null;
|
|
1411
1417
|
}
|
|
1412
1418
|
}
|
|
1413
|
-
|
|
1419
|
+
const P = {
|
|
1420
|
+
wallTileWidth: 2,
|
|
1421
|
+
wallTileHeight: 1,
|
|
1422
|
+
polygonTileWidth: 2,
|
|
1423
|
+
polygonTileHeight: 2
|
|
1424
|
+
};
|
|
1425
|
+
function v(r, e) {
|
|
1426
|
+
const t = Number(r);
|
|
1427
|
+
return Number.isFinite(t) ? t : e;
|
|
1428
|
+
}
|
|
1429
|
+
function C(r) {
|
|
1430
|
+
return Number.isFinite(r) ? Math.max(1, r) : 1;
|
|
1431
|
+
}
|
|
1432
|
+
function hi(r, e) {
|
|
1433
|
+
return Number.isFinite(r) ? Math.min(1, Math.max(0, r)) : e;
|
|
1434
|
+
}
|
|
1435
|
+
function ci(r) {
|
|
1436
|
+
const e = r?.repeat;
|
|
1437
|
+
if (Array.isArray(e) && e.length >= 2)
|
|
1438
|
+
return {
|
|
1439
|
+
x: C(v(e[0], 1)),
|
|
1440
|
+
y: C(v(e[1], 1))
|
|
1441
|
+
};
|
|
1442
|
+
if (e && typeof e == "object")
|
|
1443
|
+
return {
|
|
1444
|
+
x: C(v(e.x, 1)),
|
|
1445
|
+
y: C(v(e.y, 1))
|
|
1446
|
+
};
|
|
1447
|
+
const t = Number(r?.repeatX), i = Number(r?.repeatY);
|
|
1448
|
+
return Number.isFinite(t) && Number.isFinite(i) ? {
|
|
1449
|
+
x: C(t),
|
|
1450
|
+
y: C(i)
|
|
1451
|
+
} : null;
|
|
1452
|
+
}
|
|
1453
|
+
function xe(r, e) {
|
|
1454
|
+
const t = Array.isArray(e?.positions) ? e.positions : [];
|
|
1455
|
+
if (t.length < 2) return 1;
|
|
1456
|
+
let i = 0;
|
|
1457
|
+
for (let a = 1; a < t.length; a++) {
|
|
1458
|
+
const n = t[a - 1], o = t[a];
|
|
1459
|
+
if (!Array.isArray(n) || !Array.isArray(o)) continue;
|
|
1460
|
+
const s = r.Cartesian3.fromDegrees(
|
|
1461
|
+
v(n[0], 0),
|
|
1462
|
+
v(n[1], 0),
|
|
1463
|
+
v(n[2], 0)
|
|
1464
|
+
), h = r.Cartesian3.fromDegrees(
|
|
1465
|
+
v(o[0], 0),
|
|
1466
|
+
v(o[1], 0),
|
|
1467
|
+
v(o[2], 0)
|
|
1468
|
+
);
|
|
1469
|
+
i += r.Cartesian3.distance(s, h);
|
|
1470
|
+
}
|
|
1471
|
+
return i > 0 ? i : 1;
|
|
1472
|
+
}
|
|
1473
|
+
function Ie(r) {
|
|
1474
|
+
const e = r?.maximumHeights, t = r?.minimumHeights;
|
|
1475
|
+
if (Array.isArray(e) && Array.isArray(t) && e.length > 0 && e.length === t.length) {
|
|
1476
|
+
let n = 0, o = 0;
|
|
1477
|
+
for (let s = 0; s < e.length; s++) {
|
|
1478
|
+
const h = Number(e[s]) - Number(t[s]);
|
|
1479
|
+
Number.isFinite(h) && h > 0 && (n += h, o++);
|
|
1480
|
+
}
|
|
1481
|
+
if (o > 0) return n / o;
|
|
1482
|
+
}
|
|
1483
|
+
const i = Math.abs(v(r?.minHeight, 0)), a = Math.abs(v(r?.maxHeight, 0));
|
|
1484
|
+
return i > 0 || a > 0 ? i + a : 3;
|
|
1485
|
+
}
|
|
1486
|
+
function Se(r, e) {
|
|
1487
|
+
const t = e?.hierarchy;
|
|
1488
|
+
if (!Array.isArray(t) || t.length < 3)
|
|
1489
|
+
return { width: 1, height: 1 };
|
|
1490
|
+
const i = Array.isArray(t[0]) ? t.flat() : t;
|
|
1491
|
+
if (!Array.isArray(i) || i.length < 3) return { width: 1, height: 1 };
|
|
1492
|
+
let a = Number.POSITIVE_INFINITY, n = Number.NEGATIVE_INFINITY, o = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY;
|
|
1493
|
+
for (let u = 0; u < i.length; u += 3) {
|
|
1494
|
+
const m = Number(i[u]), b = Number(i[u + 1]);
|
|
1495
|
+
!Number.isFinite(m) || !Number.isFinite(b) || (a = Math.min(a, m), n = Math.max(n, m), o = Math.min(o, b), s = Math.max(s, b));
|
|
1496
|
+
}
|
|
1497
|
+
if (!Number.isFinite(a) || !Number.isFinite(o))
|
|
1498
|
+
return { width: 1, height: 1 };
|
|
1499
|
+
const h = (o + s) / 2, g = r.Ellipsoid.WGS84.maximumRadius, l = r.Math.toRadians(Math.abs(n - a)), c = r.Math.toRadians(Math.abs(s - o)), d = l * g * Math.cos(r.Math.toRadians(h)), f = c * g;
|
|
1500
|
+
return {
|
|
1501
|
+
width: d > 0 ? d : 1,
|
|
1502
|
+
height: f > 0 ? f : 1
|
|
1503
|
+
};
|
|
1504
|
+
}
|
|
1505
|
+
function Ee({
|
|
1506
|
+
Cesium: r,
|
|
1507
|
+
themeOptions: e,
|
|
1508
|
+
entityOptions: t,
|
|
1509
|
+
category: i
|
|
1510
|
+
}) {
|
|
1511
|
+
const a = ci(e);
|
|
1512
|
+
if (a) return a;
|
|
1513
|
+
if (e?.autoRepeat === !1)
|
|
1514
|
+
return { x: 1, y: 1 };
|
|
1515
|
+
if (i === "wall") {
|
|
1516
|
+
const h = xe(r, t), g = Ie(t), l = v(
|
|
1517
|
+
e?.tileWidth ?? e?.textureWidth,
|
|
1518
|
+
P.wallTileWidth
|
|
1519
|
+
), c = v(
|
|
1520
|
+
e?.tileHeight ?? e?.textureHeight,
|
|
1521
|
+
P.wallTileHeight
|
|
1522
|
+
);
|
|
1523
|
+
return {
|
|
1524
|
+
x: C(h / Math.max(l, 0.01)),
|
|
1525
|
+
y: C(g / Math.max(c, 0.01))
|
|
1526
|
+
};
|
|
1527
|
+
}
|
|
1528
|
+
const n = Se(r, t), o = v(
|
|
1529
|
+
e?.tileWidth ?? e?.textureWidth,
|
|
1530
|
+
P.polygonTileWidth
|
|
1531
|
+
), s = v(
|
|
1532
|
+
e?.tileHeight ?? e?.textureHeight,
|
|
1533
|
+
P.polygonTileHeight
|
|
1534
|
+
);
|
|
1535
|
+
return {
|
|
1536
|
+
x: C(n.width / Math.max(o, 0.01)),
|
|
1537
|
+
y: C(n.height / Math.max(s, 0.01))
|
|
1538
|
+
};
|
|
1539
|
+
}
|
|
1540
|
+
function De({
|
|
1541
|
+
Cesium: r,
|
|
1542
|
+
themeOptions: e,
|
|
1543
|
+
entityOptions: t,
|
|
1544
|
+
category: i,
|
|
1545
|
+
freely: a
|
|
1546
|
+
}) {
|
|
1547
|
+
const n = Number(e?.count);
|
|
1548
|
+
if (Number.isFinite(n) && n > 0) return n;
|
|
1549
|
+
if (e?.autoRepeat === !1)
|
|
1550
|
+
return 1;
|
|
1551
|
+
if (i === "wall") {
|
|
1552
|
+
const l = xe(r, t), c = Ie(t), d = v(
|
|
1553
|
+
e?.tileWidth ?? e?.textureWidth,
|
|
1554
|
+
P.wallTileWidth
|
|
1555
|
+
), f = v(
|
|
1556
|
+
e?.tileHeight ?? e?.textureHeight,
|
|
1557
|
+
P.wallTileHeight
|
|
1558
|
+
), u = a === "vertical" ? c / Math.max(f, 0.01) : l / Math.max(d, 0.01);
|
|
1559
|
+
return C(Number(u.toFixed(2)));
|
|
1560
|
+
}
|
|
1561
|
+
const o = Se(r, t), s = v(
|
|
1562
|
+
e?.tileWidth ?? e?.textureWidth,
|
|
1563
|
+
P.polygonTileWidth
|
|
1564
|
+
), h = v(
|
|
1565
|
+
e?.tileHeight ?? e?.textureHeight,
|
|
1566
|
+
P.polygonTileHeight
|
|
1567
|
+
), g = a === "vertical" ? o.height / Math.max(h, 0.01) : o.width / Math.max(s, 0.01);
|
|
1568
|
+
return C(Number(g.toFixed(2)));
|
|
1569
|
+
}
|
|
1570
|
+
function N(r) {
|
|
1571
|
+
const e = r;
|
|
1572
|
+
return e.__materialFactory = !0, e;
|
|
1573
|
+
}
|
|
1574
|
+
function Ae(r) {
|
|
1575
|
+
const e = String(r?.wallVerticalMode ?? r?.verticalMode ?? "stretch");
|
|
1576
|
+
return e === "repeat" || e === "bottom" || e === "stretch" ? e : "stretch";
|
|
1577
|
+
}
|
|
1578
|
+
function gi({
|
|
1579
|
+
Cesium: r,
|
|
1580
|
+
themeOptions: e,
|
|
1581
|
+
entityOptions: t
|
|
1582
|
+
}) {
|
|
1583
|
+
const i = Ee({
|
|
1584
|
+
Cesium: r,
|
|
1585
|
+
themeOptions: e,
|
|
1586
|
+
entityOptions: t,
|
|
1587
|
+
category: "wall"
|
|
1588
|
+
});
|
|
1589
|
+
return Ae(e) === "repeat" ? i : { x: i.x, y: 1 };
|
|
1590
|
+
}
|
|
1591
|
+
function di(r, e) {
|
|
1592
|
+
const t = "WallBottomImageMaterial_" + Date.now() + "_" + Math.floor(Math.random() * 1e3);
|
|
1593
|
+
function i(a) {
|
|
1594
|
+
this._definitionChanged = new r.Event(), this._color = a.color, this.color = a.color;
|
|
1595
|
+
}
|
|
1596
|
+
return Object.defineProperties(i.prototype, {
|
|
1597
|
+
isConstant: {
|
|
1598
|
+
get() {
|
|
1599
|
+
return !1;
|
|
1600
|
+
}
|
|
1601
|
+
},
|
|
1602
|
+
definitionChanged: {
|
|
1603
|
+
get() {
|
|
1604
|
+
return this._definitionChanged;
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1607
|
+
color: r.createPropertyDescriptor("color")
|
|
1608
|
+
}), i.prototype.getType = function() {
|
|
1609
|
+
return t;
|
|
1610
|
+
}, i.prototype.getValue = function(a, n) {
|
|
1611
|
+
return r.defined(n) || (n = {}), n.image = e.image, n.repeatX = e.repeatX, n.bottomHeightRatio = e.bottomHeightRatio, n.color = r.Property.getValueOrClonedDefault(
|
|
1612
|
+
this._color,
|
|
1613
|
+
a,
|
|
1614
|
+
r.Color.WHITE,
|
|
1615
|
+
n.color
|
|
1616
|
+
), n;
|
|
1617
|
+
}, i.prototype.equals = function(a) {
|
|
1618
|
+
return this === a || a instanceof i && r.Property.equals(this._color, a._color);
|
|
1619
|
+
}, r.Material._materialCache.addMaterial(t, {
|
|
1620
|
+
fabric: {
|
|
1621
|
+
type: t,
|
|
1622
|
+
uniforms: {
|
|
1623
|
+
image: e.image,
|
|
1624
|
+
repeatX: e.repeatX,
|
|
1625
|
+
bottomHeightRatio: e.bottomHeightRatio,
|
|
1626
|
+
color: e.color || r.Color.WHITE
|
|
1627
|
+
},
|
|
1628
|
+
source: `
|
|
1629
|
+
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
1630
|
+
{
|
|
1631
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
1632
|
+
vec2 st = materialInput.st;
|
|
1633
|
+
float ratio = max(bottomHeightRatio, 0.0001);
|
|
1634
|
+
if (st.t > ratio) {
|
|
1635
|
+
material.alpha = 0.0;
|
|
1636
|
+
return material;
|
|
1637
|
+
}
|
|
1638
|
+
vec2 uv = vec2(fract(st.s * repeatX), clamp(st.t / ratio, 0.0, 1.0));
|
|
1639
|
+
vec4 colorImage = texture(image, uv);
|
|
1640
|
+
material.diffuse = colorImage.rgb * color.rgb;
|
|
1641
|
+
material.alpha = colorImage.a * color.a;
|
|
1642
|
+
return material;
|
|
1643
|
+
}`
|
|
1644
|
+
},
|
|
1645
|
+
translucent: function() {
|
|
1646
|
+
return !0;
|
|
1647
|
+
}
|
|
1648
|
+
}), new i(e);
|
|
1649
|
+
}
|
|
1650
|
+
function ui({
|
|
1414
1651
|
Cesium: r,
|
|
1415
1652
|
options: e,
|
|
1416
1653
|
MaterialManager: t
|
|
1417
1654
|
}) {
|
|
1418
1655
|
if (e.data?.theme) {
|
|
1419
1656
|
if (e.data?.lineType == "1") {
|
|
1420
|
-
let i =
|
|
1657
|
+
let i = ai(r, {
|
|
1421
1658
|
color: new r.Color.fromCssColorString(e?.options?.color || "#ffffff"),
|
|
1422
1659
|
duration: 100
|
|
1423
1660
|
});
|
|
@@ -1449,7 +1686,6 @@ function Qt({
|
|
|
1449
1686
|
let i = new r.PolylineDashMaterialProperty({
|
|
1450
1687
|
color: r.Color.fromCssColorString(e?.options?.color || "red"),
|
|
1451
1688
|
dashLength: Number(e?.options?.dashLength || 30)
|
|
1452
|
-
//短划线长度
|
|
1453
1689
|
});
|
|
1454
1690
|
t.register({
|
|
1455
1691
|
themeKey: e.data?.theme,
|
|
@@ -1457,11 +1693,10 @@ function Qt({
|
|
|
1457
1693
|
category: "polyline"
|
|
1458
1694
|
});
|
|
1459
1695
|
} else if (e.data?.lineType == "5") {
|
|
1460
|
-
let i =
|
|
1696
|
+
let i = ri(r, {
|
|
1461
1697
|
image: e.img,
|
|
1462
1698
|
color: new r.Color.fromCssColorString(e?.options?.color || "#ffffff"),
|
|
1463
1699
|
duration: 5e3,
|
|
1464
|
-
// freely: 'vertical',
|
|
1465
1700
|
direction: "-",
|
|
1466
1701
|
count: 1
|
|
1467
1702
|
});
|
|
@@ -1473,7 +1708,7 @@ function Qt({
|
|
|
1473
1708
|
}
|
|
1474
1709
|
}
|
|
1475
1710
|
}
|
|
1476
|
-
function
|
|
1711
|
+
function fi({
|
|
1477
1712
|
Cesium: r,
|
|
1478
1713
|
options: e,
|
|
1479
1714
|
MaterialManager: t
|
|
@@ -1487,90 +1722,138 @@ function ei({
|
|
|
1487
1722
|
category: "polygon"
|
|
1488
1723
|
});
|
|
1489
1724
|
} else if (e.data?.polygonType == "img") {
|
|
1490
|
-
|
|
1491
|
-
image: e.img
|
|
1492
|
-
});
|
|
1725
|
+
const i = e?.options || {};
|
|
1493
1726
|
t.register({
|
|
1494
1727
|
themeKey: e.data?.theme,
|
|
1495
|
-
|
|
1496
|
-
|
|
1728
|
+
category: "polygon",
|
|
1729
|
+
material: N((a = {}) => {
|
|
1730
|
+
const n = Ee({
|
|
1731
|
+
Cesium: r,
|
|
1732
|
+
themeOptions: i,
|
|
1733
|
+
entityOptions: a,
|
|
1734
|
+
category: "polygon"
|
|
1735
|
+
});
|
|
1736
|
+
return new r.ImageMaterialProperty({
|
|
1737
|
+
image: e.img,
|
|
1738
|
+
repeat: new r.Cartesian2(n.x, n.y)
|
|
1739
|
+
});
|
|
1740
|
+
})
|
|
1497
1741
|
});
|
|
1498
1742
|
} else if (e.data?.polygonType == "DynamicImgMaterial") {
|
|
1499
|
-
|
|
1500
|
-
image: e.img,
|
|
1501
|
-
color: new r.Color.fromCssColorString(e?.options?.color),
|
|
1502
|
-
duration: 5e3,
|
|
1503
|
-
freely: e.data?.freely || "vertical",
|
|
1504
|
-
direction: "+",
|
|
1505
|
-
count: 1
|
|
1506
|
-
});
|
|
1743
|
+
const i = e?.options || {};
|
|
1507
1744
|
t.register({
|
|
1508
1745
|
themeKey: e.data?.theme,
|
|
1509
|
-
|
|
1510
|
-
|
|
1746
|
+
category: "polygon",
|
|
1747
|
+
material: N((a = {}) => {
|
|
1748
|
+
const n = e.data?.freely || "vertical", o = De({
|
|
1749
|
+
Cesium: r,
|
|
1750
|
+
themeOptions: i,
|
|
1751
|
+
entityOptions: a,
|
|
1752
|
+
category: "polygon",
|
|
1753
|
+
freely: n
|
|
1754
|
+
});
|
|
1755
|
+
return we(r, {
|
|
1756
|
+
image: e.img,
|
|
1757
|
+
color: new r.Color.fromCssColorString(i?.color || "#ffffff"),
|
|
1758
|
+
duration: v(i?.duration, 5e3),
|
|
1759
|
+
freely: n,
|
|
1760
|
+
direction: i?.direction || "+",
|
|
1761
|
+
count: o
|
|
1762
|
+
});
|
|
1763
|
+
})
|
|
1511
1764
|
});
|
|
1512
1765
|
}
|
|
1513
1766
|
}
|
|
1514
1767
|
}
|
|
1515
|
-
function
|
|
1768
|
+
function mi({
|
|
1516
1769
|
Cesium: r,
|
|
1517
1770
|
options: e,
|
|
1518
1771
|
MaterialManager: t
|
|
1519
1772
|
}) {
|
|
1520
1773
|
if (e.data?.theme) {
|
|
1521
1774
|
if (e.data?.wallType == "img") {
|
|
1522
|
-
|
|
1523
|
-
image: e.img
|
|
1524
|
-
});
|
|
1775
|
+
const i = e?.options || {};
|
|
1525
1776
|
t.register({
|
|
1526
1777
|
themeKey: e.data?.theme,
|
|
1527
|
-
|
|
1528
|
-
|
|
1778
|
+
category: "wall",
|
|
1779
|
+
material: N((a = {}) => {
|
|
1780
|
+
const n = Ae(i), o = gi({
|
|
1781
|
+
Cesium: r,
|
|
1782
|
+
themeOptions: i,
|
|
1783
|
+
entityOptions: a
|
|
1784
|
+
});
|
|
1785
|
+
if (n === "bottom") {
|
|
1786
|
+
const s = hi(
|
|
1787
|
+
v(i?.bottomHeightRatio, 0.3),
|
|
1788
|
+
0.3
|
|
1789
|
+
);
|
|
1790
|
+
return di(r, {
|
|
1791
|
+
image: e.img,
|
|
1792
|
+
repeatX: o.x,
|
|
1793
|
+
bottomHeightRatio: s,
|
|
1794
|
+
color: new r.Color.fromCssColorString(i?.color || "#ffffff")
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
return new r.ImageMaterialProperty({
|
|
1798
|
+
image: e.img,
|
|
1799
|
+
repeat: new r.Cartesian2(o.x, o.y),
|
|
1800
|
+
transparent: !0
|
|
1801
|
+
});
|
|
1802
|
+
})
|
|
1529
1803
|
});
|
|
1530
1804
|
} else if (e.data?.wallType == "DynamicImgMaterial") {
|
|
1531
|
-
|
|
1532
|
-
image: e.img,
|
|
1533
|
-
color: new r.Color.fromCssColorString(e?.options?.color),
|
|
1534
|
-
duration: 5e3,
|
|
1535
|
-
freely: e.data?.freely || "vertical",
|
|
1536
|
-
direction: "+",
|
|
1537
|
-
count: 1
|
|
1538
|
-
});
|
|
1805
|
+
const i = e?.options || {};
|
|
1539
1806
|
t.register({
|
|
1540
1807
|
themeKey: e.data?.theme,
|
|
1541
|
-
|
|
1542
|
-
|
|
1808
|
+
category: "wall",
|
|
1809
|
+
material: N((a = {}) => {
|
|
1810
|
+
const n = e.data?.freely || "vertical", o = De({
|
|
1811
|
+
Cesium: r,
|
|
1812
|
+
themeOptions: i,
|
|
1813
|
+
entityOptions: a,
|
|
1814
|
+
category: "wall",
|
|
1815
|
+
freely: n
|
|
1816
|
+
});
|
|
1817
|
+
return we(r, {
|
|
1818
|
+
image: e.img,
|
|
1819
|
+
color: new r.Color.fromCssColorString(i?.color || "#ffffff"),
|
|
1820
|
+
duration: v(i?.duration, 5e3),
|
|
1821
|
+
freely: n,
|
|
1822
|
+
direction: i?.direction || "+",
|
|
1823
|
+
count: o
|
|
1824
|
+
});
|
|
1825
|
+
})
|
|
1543
1826
|
});
|
|
1544
1827
|
}
|
|
1545
1828
|
}
|
|
1546
1829
|
}
|
|
1547
|
-
class
|
|
1830
|
+
class pi extends li {
|
|
1548
1831
|
constructor(e) {
|
|
1549
1832
|
const {
|
|
1550
1833
|
labelId: t = "report-marker",
|
|
1551
1834
|
cardId: i = "report-marker",
|
|
1552
|
-
tagThemeConfig:
|
|
1553
|
-
lineThemeConfig:
|
|
1835
|
+
tagThemeConfig: a = [],
|
|
1836
|
+
lineThemeConfig: n = [],
|
|
1554
1837
|
cardThemeConfig: o = [],
|
|
1555
1838
|
runListener: s = () => {
|
|
1556
1839
|
},
|
|
1557
|
-
MaterialManager: h = new
|
|
1558
|
-
aggregatorOptions:
|
|
1559
|
-
} = e, l = [...
|
|
1840
|
+
MaterialManager: h = new Pe(),
|
|
1841
|
+
aggregatorOptions: g
|
|
1842
|
+
} = e, l = [...a], c = [...n], d = [...o], f = {
|
|
1560
1843
|
clusterTheme: "Tag1007",
|
|
1561
1844
|
pointTheme: "Tag1001",
|
|
1562
1845
|
centralPointMode: "firstPoint",
|
|
1563
1846
|
debugCurrentGrids: !1,
|
|
1564
|
-
...
|
|
1847
|
+
...g || {}
|
|
1565
1848
|
}, u = {
|
|
1566
1849
|
...e,
|
|
1567
1850
|
labelId: t,
|
|
1568
1851
|
cardId: i,
|
|
1569
1852
|
MaterialManager: h,
|
|
1570
1853
|
aggregatorOptions: f,
|
|
1571
|
-
eventBus: new
|
|
1854
|
+
eventBus: new V()
|
|
1572
1855
|
};
|
|
1573
|
-
super(u), this.opt = { ...this.opt, ...u }, this.initTagListener(this.instance.eventBus, this.opt), this.loadTabThemeConfig(l), this.loadLineThemeConfig(c), this.loadCardThemeConfig(
|
|
1856
|
+
super(u), this.opt = { ...this.opt, ...u }, this.initTagListener(this.instance.eventBus, this.opt), this.loadTabThemeConfig(l), this.loadLineThemeConfig(c), this.loadCardThemeConfig(d), this.initDefaultLineMaterials(), this.initDefaultTagTheme();
|
|
1574
1857
|
}
|
|
1575
1858
|
initDefaultTagTheme() {
|
|
1576
1859
|
this.setTagTheme({
|
|
@@ -1668,10 +1951,10 @@ class ii extends Jt {
|
|
|
1668
1951
|
})
|
|
1669
1952
|
}
|
|
1670
1953
|
};
|
|
1671
|
-
Object.entries(t).forEach(([i,
|
|
1954
|
+
Object.entries(t).forEach(([i, a]) => {
|
|
1672
1955
|
this.MaterialManager.has(i, "polyline") || this.MaterialManager.register({
|
|
1673
1956
|
themeKey: i,
|
|
1674
|
-
material:
|
|
1957
|
+
material: a.material,
|
|
1675
1958
|
category: "polyline"
|
|
1676
1959
|
});
|
|
1677
1960
|
});
|
|
@@ -1682,23 +1965,23 @@ class ii extends Jt {
|
|
|
1682
1965
|
e.tag && this.loadTabThemeConfig(e.tag), e.card && this.loadCardThemeConfig(e.card);
|
|
1683
1966
|
const t = this.opt.Cesium, i = this.instance.materialManager || this.opt.MaterialManager;
|
|
1684
1967
|
if (e.line?.length > 0)
|
|
1685
|
-
for (let
|
|
1686
|
-
|
|
1687
|
-
options:
|
|
1968
|
+
for (let a of e.line)
|
|
1969
|
+
ui({
|
|
1970
|
+
options: a,
|
|
1688
1971
|
Cesium: t,
|
|
1689
1972
|
MaterialManager: i
|
|
1690
1973
|
});
|
|
1691
1974
|
if (e.polygon?.length > 0)
|
|
1692
|
-
for (let
|
|
1693
|
-
|
|
1694
|
-
options:
|
|
1975
|
+
for (let a of e.polygon)
|
|
1976
|
+
fi({
|
|
1977
|
+
options: a,
|
|
1695
1978
|
Cesium: t,
|
|
1696
1979
|
MaterialManager: i
|
|
1697
1980
|
});
|
|
1698
1981
|
if (e.wall?.length > 0)
|
|
1699
|
-
for (let
|
|
1700
|
-
|
|
1701
|
-
options:
|
|
1982
|
+
for (let a of e.wall)
|
|
1983
|
+
mi({
|
|
1984
|
+
options: a,
|
|
1702
1985
|
Cesium: t,
|
|
1703
1986
|
MaterialManager: i
|
|
1704
1987
|
});
|
|
@@ -1729,9 +2012,9 @@ class ii extends Jt {
|
|
|
1729
2012
|
let t = this.instance.cardPool;
|
|
1730
2013
|
e.forEach((i) => {
|
|
1731
2014
|
t.registerTheme(i.data.theme, {
|
|
1732
|
-
createElement(
|
|
1733
|
-
let o =
|
|
1734
|
-
return i.comType == 1 ? s =
|
|
2015
|
+
createElement(a, n) {
|
|
2016
|
+
let o = n.data.data, s;
|
|
2017
|
+
return i.comType == 1 ? s = x(I(re), {
|
|
1735
2018
|
data: o || {},
|
|
1736
2019
|
imgSrc: i.data.img,
|
|
1737
2020
|
styleConfig: {
|
|
@@ -1752,7 +2035,7 @@ class ii extends Jt {
|
|
|
1752
2035
|
top: "0px"
|
|
1753
2036
|
},
|
|
1754
2037
|
bgClass: [i.data.theme]
|
|
1755
|
-
}) : i.comType == 3 && (s =
|
|
2038
|
+
}) : i.comType == 3 && (s = x(I(re), {
|
|
1756
2039
|
data: o || {},
|
|
1757
2040
|
imgSrc: i.data.img,
|
|
1758
2041
|
styleConfig: {
|
|
@@ -1775,7 +2058,7 @@ class ii extends Jt {
|
|
|
1775
2058
|
bgClass: [i.data.theme]
|
|
1776
2059
|
// titleConfig: themeOptions.options.titleConfig,
|
|
1777
2060
|
// pageInfoConfig: themeOptions.options.pageInfoConfig,
|
|
1778
|
-
})), O(s,
|
|
2061
|
+
})), O(s, a), () => O(null, a);
|
|
1779
2062
|
},
|
|
1780
2063
|
options: {
|
|
1781
2064
|
offset: i.data.pixelOffset,
|
|
@@ -1788,20 +2071,20 @@ class ii extends Jt {
|
|
|
1788
2071
|
setTagTheme(e) {
|
|
1789
2072
|
let { labelPool: t } = this.instance;
|
|
1790
2073
|
t.registerTheme(e.data.theme, {
|
|
1791
|
-
createElement(i,
|
|
1792
|
-
let
|
|
1793
|
-
const o =
|
|
2074
|
+
createElement(i, a) {
|
|
2075
|
+
let n = a.data?.billboard?.[0];
|
|
2076
|
+
const o = ii(n, ["position", "options"]);
|
|
1794
2077
|
let s, h = {
|
|
1795
2078
|
...o,
|
|
1796
|
-
text:
|
|
2079
|
+
text: n?.options?.text,
|
|
1797
2080
|
isFullLink: e?.isFullLink ?? !1,
|
|
1798
2081
|
img: e?.data?.options?.img,
|
|
1799
2082
|
textStyle: e?.data?.options?.textStyle,
|
|
1800
2083
|
imgStyle: e?.data?.options?.imgStyle
|
|
1801
2084
|
};
|
|
1802
|
-
if (
|
|
1803
|
-
s =
|
|
1804
|
-
text:
|
|
2085
|
+
if (a.data?.gridKey)
|
|
2086
|
+
s = x(I(ae), {
|
|
2087
|
+
text: a.data?.count,
|
|
1805
2088
|
isFullLink: e.isFullLink ?? !1,
|
|
1806
2089
|
img: e?.data.options.img,
|
|
1807
2090
|
imgStyle: e?.data.options?.imgStyle,
|
|
@@ -1822,28 +2105,28 @@ class ii extends Jt {
|
|
|
1822
2105
|
}
|
|
1823
2106
|
});
|
|
1824
2107
|
else if (e.comType == 4)
|
|
1825
|
-
s =
|
|
2108
|
+
s = x(I(Xe), h);
|
|
1826
2109
|
else if (e.comType == 5 || e.comType == 8) {
|
|
1827
|
-
const
|
|
1828
|
-
s =
|
|
2110
|
+
const g = n?.options || {}, l = e?.data?.options || {}, c = n?.pixelOffset || e?.data?.pixelOffset || { x: 0, y: 0 }, d = g.otherOffset ?? l.otherOffset ?? { x: 0, y: -0 }, f = g.isCanDraggable ?? l.isCanDraggable ?? e?.isCanDraggable ?? !1, u = e.comType == 8 ? Ve : Ke;
|
|
2111
|
+
s = x(I(u), {
|
|
1829
2112
|
...h,
|
|
1830
2113
|
pixelOffset: c,
|
|
1831
|
-
textStyle:
|
|
1832
|
-
lineStyle:
|
|
1833
|
-
otherOffset:
|
|
2114
|
+
textStyle: g.textStyle || l.textStyle,
|
|
2115
|
+
lineStyle: g.lineStyle || l.lineStyle,
|
|
2116
|
+
otherOffset: d,
|
|
1834
2117
|
isCanDraggable: f,
|
|
1835
|
-
onCanDraggable:
|
|
2118
|
+
onCanDraggable: g.onCanDraggable || e?.onCanDraggable,
|
|
1836
2119
|
onSetOtherOffset: (m) => {
|
|
1837
|
-
|
|
2120
|
+
a.data?.billboard?.[0]?.options && (a.data.billboard[0].options.otherOffset = m), g.onSetOtherOffset?.(m), e?.onSetOtherOffset?.(a.data, m);
|
|
1838
2121
|
},
|
|
1839
2122
|
onSetLineStake: (m) => {
|
|
1840
|
-
|
|
2123
|
+
a.data?.billboard?.[0]?.options && (a.data.billboard[0].options.lineStake = m), g.onSetLineStake?.(m), e?.onSetLineStake?.(a.data, m);
|
|
1841
2124
|
}
|
|
1842
2125
|
});
|
|
1843
|
-
} else e.comType == 6 || e.comType == 7 ? s =
|
|
2126
|
+
} else e.comType == 6 || e.comType == 7 ? s = x(I(Ye), {
|
|
1844
2127
|
text: h.text,
|
|
1845
2128
|
textStyle: h.textStyle
|
|
1846
|
-
}) : s =
|
|
2129
|
+
}) : s = x(I(ae), h);
|
|
1847
2130
|
return O(s, i), () => O(null, i);
|
|
1848
2131
|
},
|
|
1849
2132
|
options: {
|
|
@@ -1853,65 +2136,65 @@ class ii extends Jt {
|
|
|
1853
2136
|
}
|
|
1854
2137
|
//标记监听事件
|
|
1855
2138
|
initTagListener(e, t) {
|
|
1856
|
-
let { viewer: i, tagListeningOptions:
|
|
1857
|
-
e.addListener(
|
|
2139
|
+
let { viewer: i, tagListeningOptions: a } = t;
|
|
2140
|
+
e.addListener(G.Click, {
|
|
1858
2141
|
name: "marker:click",
|
|
1859
|
-
fn: (
|
|
1860
|
-
t.runListener?.(
|
|
2142
|
+
fn: (n) => {
|
|
2143
|
+
t.runListener?.(H.标记左键点击, n.data), pe(n.data?.onClick) && n.data?.onClick(n.data), n.data?.cameraPoint && n.data?.billboard[0]?.isFlyToCameraPoint && i?.camera?.flyTo({
|
|
1861
2144
|
duration: 1,
|
|
1862
|
-
...
|
|
2145
|
+
...n.data?.cameraPoint
|
|
1863
2146
|
});
|
|
1864
2147
|
}
|
|
1865
|
-
}), e.addListener(
|
|
2148
|
+
}), e.addListener(G.MouseEnter, {
|
|
1866
2149
|
name: "marker:mouseenter",
|
|
1867
|
-
fn: (
|
|
2150
|
+
fn: (n) => {
|
|
1868
2151
|
let o = this.opt.Cesium, s = { x: 0, y: 0 };
|
|
1869
2152
|
try {
|
|
1870
|
-
if (
|
|
1871
|
-
let h =
|
|
2153
|
+
if (n.data?.billboard?.[0]?.position?.length > 2) {
|
|
2154
|
+
let h = n.data?.billboard[0]?.position, g = o.Cartesian3.fromDegrees(h[0], h[1], h[3] || 0), l = this.instance.labelPool.toWindowCoordinates(g);
|
|
1872
2155
|
s.x = l.x, s.y = l.y;
|
|
1873
2156
|
}
|
|
1874
2157
|
} catch (h) {
|
|
1875
2158
|
console.log(h);
|
|
1876
2159
|
}
|
|
1877
|
-
t.runListener?.(
|
|
2160
|
+
t.runListener?.(H.标记移入, n.data, s);
|
|
1878
2161
|
}
|
|
1879
|
-
}), e.addListener(
|
|
2162
|
+
}), e.addListener(G.MouseLeave, {
|
|
1880
2163
|
name: "marker:mouseleave",
|
|
1881
|
-
fn: (
|
|
2164
|
+
fn: (n) => {
|
|
1882
2165
|
let o = this.opt.Cesium, s = { x: 0, y: 0 };
|
|
1883
2166
|
try {
|
|
1884
|
-
if (
|
|
1885
|
-
let h =
|
|
2167
|
+
if (n.data?.billboard?.[0]?.position?.length > 2) {
|
|
2168
|
+
let h = n.data?.billboard[0]?.position, g = o.Cartesian3.fromDegrees(h[0], h[1], h[3] || 0), l = this.instance.labelPool.toWindowCoordinates(g);
|
|
1886
2169
|
s.x = l.x, s.y = l.y;
|
|
1887
2170
|
}
|
|
1888
2171
|
} catch (h) {
|
|
1889
2172
|
console.log(h);
|
|
1890
2173
|
}
|
|
1891
|
-
t.runListener?.(
|
|
2174
|
+
t.runListener?.(H.标记移出, n.data, s);
|
|
1892
2175
|
}
|
|
1893
|
-
}),
|
|
1894
|
-
e.addListener(
|
|
2176
|
+
}), a?.forEach((n) => {
|
|
2177
|
+
e.addListener(n.key, n.ListenerItem, n.overwrite);
|
|
1895
2178
|
});
|
|
1896
2179
|
}
|
|
1897
2180
|
// 兼容旧模式的材质注册
|
|
1898
2181
|
setMaterial(e) {
|
|
1899
|
-
const { type: t, material: i, materialKey:
|
|
2182
|
+
const { type: t, material: i, materialKey: a, cover: n } = e, o = t ? t.toLowerCase() : "default";
|
|
1900
2183
|
this.MaterialManager.register({
|
|
1901
|
-
themeKey:
|
|
2184
|
+
themeKey: a,
|
|
1902
2185
|
// 兼容传入的是 { material: ... } 结构或者直接是材质对象
|
|
1903
2186
|
material: i?.material || i,
|
|
1904
|
-
force:
|
|
2187
|
+
force: n,
|
|
1905
2188
|
category: o
|
|
1906
2189
|
});
|
|
1907
2190
|
}
|
|
1908
2191
|
}
|
|
1909
|
-
const
|
|
2192
|
+
const yi = /* @__PURE__ */ ke({
|
|
1910
2193
|
__name: "MarkerManage",
|
|
1911
|
-
props:
|
|
2194
|
+
props: st,
|
|
1912
2195
|
emits: ["register", "load", "marker-event"],
|
|
1913
2196
|
setup(r, { expose: e, emit: t }) {
|
|
1914
|
-
const i = r,
|
|
2197
|
+
const i = r, a = t, n = Be("leitingMethods");
|
|
1915
2198
|
let o = null;
|
|
1916
2199
|
const s = (l = {}) => {
|
|
1917
2200
|
if (o) return o;
|
|
@@ -1920,11 +2203,11 @@ const ri = /* @__PURE__ */ Oe({
|
|
|
1920
2203
|
...l,
|
|
1921
2204
|
Cesium: l.Cesium || i.Cesium,
|
|
1922
2205
|
viewer: l.viewer || i.viewer,
|
|
1923
|
-
runListener: (
|
|
1924
|
-
|
|
2206
|
+
runListener: (d, f, ...u) => {
|
|
2207
|
+
a("marker-event", { key: d, data: f, args: u });
|
|
1925
2208
|
}
|
|
1926
2209
|
};
|
|
1927
|
-
return !c.Cesium || !c.viewer ? null : (o = new
|
|
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)), a("load", o), o);
|
|
1928
2211
|
}, h = {
|
|
1929
2212
|
init: s,
|
|
1930
2213
|
set: (l) => o?.set(l),
|
|
@@ -1943,35 +2226,35 @@ const ri = /* @__PURE__ */ Oe({
|
|
|
1943
2226
|
setTagTheme: (l) => o?.setTagTheme(l),
|
|
1944
2227
|
setMaterial: (l) => o?.setMaterial(l)
|
|
1945
2228
|
};
|
|
1946
|
-
e(h),
|
|
1947
|
-
function
|
|
2229
|
+
e(h), a("register", h);
|
|
2230
|
+
function g() {
|
|
1948
2231
|
if (o) return o;
|
|
1949
|
-
const l =
|
|
1950
|
-
c &&
|
|
2232
|
+
const l = ze(n), c = l?.getCesium?.(), d = l?.getViewer?.();
|
|
2233
|
+
c && d ? s({ Cesium: c, viewer: d, methods: l }) : i.Cesium && i.viewer && s({ methods: l });
|
|
1951
2234
|
}
|
|
1952
|
-
return
|
|
1953
|
-
|
|
1954
|
-
}),
|
|
2235
|
+
return We(() => {
|
|
2236
|
+
g();
|
|
2237
|
+
}), te(
|
|
1955
2238
|
() => [i.Cesium, i.viewer],
|
|
1956
2239
|
([l, c]) => {
|
|
1957
|
-
l && c && !o &&
|
|
2240
|
+
l && c && !o && g();
|
|
1958
2241
|
}
|
|
1959
|
-
),
|
|
1960
|
-
() =>
|
|
2242
|
+
), te(
|
|
2243
|
+
() => n?.value,
|
|
1961
2244
|
(l, c) => {
|
|
1962
|
-
|
|
2245
|
+
g();
|
|
1963
2246
|
},
|
|
1964
2247
|
{ deep: !1 }
|
|
1965
|
-
),
|
|
1966
|
-
}), (l, c) =>
|
|
2248
|
+
), Fe(() => {
|
|
2249
|
+
}), (l, c) => $e(l.$slots, "default");
|
|
1967
2250
|
}
|
|
1968
|
-
}),
|
|
2251
|
+
}), xi = Ne(yi);
|
|
1969
2252
|
export {
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
2253
|
+
xi as CxMarkerManage,
|
|
2254
|
+
pi as MarkerManage,
|
|
2255
|
+
li as MarkerManagerCore,
|
|
2256
|
+
H as ReportListenerKey,
|
|
2257
|
+
xi as default,
|
|
2258
|
+
st as markerManageProps
|
|
1976
2259
|
};
|
|
1977
2260
|
//# sourceMappingURL=marker-manage.js.map
|