@uavs/3d-model-map 0.1.0 → 0.1.1
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/README.md +13 -30
- package/dist/index.js +609 -598
- package/dist/types/components/RealModelClarityDialog.vue.d.ts +2 -2
- package/dist/types/runtime/cesiumRuntime.d.ts.map +1 -1
- package/dist/types/vite/cesium.d.ts +1 -1
- package/dist/types/vite/cesium.d.ts.map +1 -1
- package/dist/vite/cesium.js +22 -9
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,76 +1,87 @@
|
|
|
1
|
-
import { ref as fe, defineComponent as zt, computed as
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
a.provide(
|
|
1
|
+
import { ref as fe, defineComponent as zt, computed as O, watch as vt, openBlock as Z, createBlock as rn, Teleport as En, createElementBlock as oe, withKeys as _n, withModifiers as an, createElementVNode as v, toDisplayString as W, normalizeClass as $e, Fragment as on, renderList as ln, normalizeStyle as Tn, createCommentVNode as Te, inject as vn, onMounted as bn, onUnmounted as Cn, createTextVNode as Gt, createVNode as Ln, createStaticVNode as wn, nextTick as xn } from "vue";
|
|
2
|
+
const sn = Symbol("uavs-map-api");
|
|
3
|
+
function ca(a, l) {
|
|
4
|
+
a.provide(sn, l);
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
const Qt = "uavs-map3d-cesium-script", Xt = "uavs-map3d-cesium-widgets-style";
|
|
7
|
+
function qt() {
|
|
7
8
|
return globalThis.Cesium;
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
return
|
|
11
|
-
a == null ? void 0 : a.default,
|
|
12
|
-
a,
|
|
13
|
-
on()
|
|
14
|
-
].find((m) => !!m && typeof m == "object" && "Viewer" in m && "Cartesian3" in m);
|
|
10
|
+
function Rn() {
|
|
11
|
+
return "/".endsWith("/") ? "/" : "//";
|
|
15
12
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
function Dn() {
|
|
14
|
+
return `${Rn()}lib/Cesium/`;
|
|
15
|
+
}
|
|
16
|
+
function Nn(a) {
|
|
17
|
+
if (document.getElementById(Xt)) return;
|
|
18
|
+
const l = document.createElement("link");
|
|
19
|
+
l.id = Xt, l.rel = "stylesheet", l.href = a, document.head.appendChild(l);
|
|
20
|
+
}
|
|
21
|
+
function In(a) {
|
|
22
|
+
return new Promise((l, p) => {
|
|
23
|
+
const y = document.getElementById(Qt);
|
|
24
|
+
if (y) {
|
|
25
|
+
if (qt()) {
|
|
26
|
+
l();
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
y.addEventListener("load", () => l(), { once: !0 }), y.addEventListener("error", () => p(new Error(`Failed to load Cesium script: ${a}`)), { once: !0 });
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const N = document.createElement("script");
|
|
33
|
+
N.id = Qt, N.src = a, N.async = !0, N.onload = () => l(), N.onerror = () => p(new Error(`Failed to load Cesium script: ${a}`)), document.head.appendChild(N);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
async function Pn() {
|
|
37
|
+
if (typeof window > "u") return;
|
|
38
|
+
const a = globalThis, l = Dn();
|
|
39
|
+
if (a.CESIUM_BASE_URL = l, Nn(`${l}Widgets/widgets.css`), await In(`${l}Cesium.js`), !qt())
|
|
40
|
+
throw new Error(`Cesium.js loaded but window.Cesium is missing. Check static assets at: ${l}`);
|
|
30
41
|
}
|
|
31
42
|
let Vt = null;
|
|
32
|
-
function
|
|
33
|
-
return typeof window < "u" &&
|
|
43
|
+
function An() {
|
|
44
|
+
return typeof window < "u" && qt() ? Promise.resolve() : (Vt || (Vt = Pn()), Vt);
|
|
34
45
|
}
|
|
35
|
-
const
|
|
36
|
-
function
|
|
46
|
+
const On = "天地图影像", kn = "湖南江西";
|
|
47
|
+
function Bn(a) {
|
|
37
48
|
const l = a == null ? void 0 : a.basemaps;
|
|
38
49
|
if (Array.isArray(l))
|
|
39
|
-
for (const
|
|
40
|
-
const y =
|
|
41
|
-
typeof y == "string" && y.includes(
|
|
50
|
+
for (const p of l) {
|
|
51
|
+
const y = p == null ? void 0 : p.name;
|
|
52
|
+
typeof y == "string" && y.includes(kn) && (p.show = !1), typeof y == "string" && y === On && (p.show = !0);
|
|
42
53
|
}
|
|
43
54
|
}
|
|
44
|
-
function
|
|
55
|
+
function $n(a) {
|
|
45
56
|
return !1;
|
|
46
57
|
}
|
|
47
|
-
const
|
|
48
|
-
function
|
|
58
|
+
const Fn = "//data.mars3d.cn/terrain";
|
|
59
|
+
function Un() {
|
|
49
60
|
return null;
|
|
50
61
|
}
|
|
51
|
-
function
|
|
62
|
+
function Gn(a) {
|
|
52
63
|
const l = a == null ? void 0 : a.terrain;
|
|
53
64
|
if (!(!l || typeof l != "object")) {
|
|
54
|
-
l.url =
|
|
65
|
+
l.url = Fn;
|
|
55
66
|
return;
|
|
56
67
|
}
|
|
57
68
|
}
|
|
58
|
-
function
|
|
59
|
-
const l =
|
|
69
|
+
function Vn(a) {
|
|
70
|
+
const l = Un();
|
|
60
71
|
if (a != null && a.basemaps && Array.isArray(a.basemaps) && l) {
|
|
61
|
-
const
|
|
62
|
-
for (const
|
|
63
|
-
const P =
|
|
72
|
+
const p = "/mapdata-map/tiles/hunan/", y = "/mapdata-map/tiles/jiangxi/", N = `${l}${p}{z}/{x}/{y}.png`, z = `${l}${y}{z}/{x}/{y}.png`;
|
|
73
|
+
for (const A of a.basemaps) {
|
|
74
|
+
const P = A == null ? void 0 : A.layers;
|
|
64
75
|
if (Array.isArray(P))
|
|
65
|
-
for (const
|
|
66
|
-
const q =
|
|
67
|
-
typeof q == "string" && (q.includes(
|
|
76
|
+
for (const F of P) {
|
|
77
|
+
const q = F == null ? void 0 : F.url;
|
|
78
|
+
typeof q == "string" && (q.includes(p) ? F.url = N : q.includes(y) && (F.url = z));
|
|
68
79
|
}
|
|
69
80
|
}
|
|
70
81
|
}
|
|
71
|
-
|
|
82
|
+
Gn(a);
|
|
72
83
|
}
|
|
73
|
-
const
|
|
84
|
+
const un = {
|
|
74
85
|
lat: 28.164192,
|
|
75
86
|
lng: 113.638378,
|
|
76
87
|
alt: 3e4
|
|
@@ -81,41 +92,41 @@ const ln = {
|
|
|
81
92
|
radius: 3e4,
|
|
82
93
|
pitch: -89,
|
|
83
94
|
duration: 1
|
|
84
|
-
},
|
|
85
|
-
function
|
|
86
|
-
const l = a.trim().replace(/^\/+/, ""),
|
|
87
|
-
return `${
|
|
95
|
+
}, Hn = "config/config.json";
|
|
96
|
+
function Wn(a) {
|
|
97
|
+
const l = a.trim().replace(/^\/+/, ""), p = "/";
|
|
98
|
+
return `${p.endsWith("/") ? p : `${p}/`}${l}`;
|
|
88
99
|
}
|
|
89
|
-
const
|
|
90
|
-
function
|
|
100
|
+
const zn = Wn(Hn), tt = /* @__PURE__ */ new Map();
|
|
101
|
+
function qn(a) {
|
|
91
102
|
return typeof structuredClone == "function" ? structuredClone(a) : JSON.parse(JSON.stringify(a));
|
|
92
103
|
}
|
|
93
|
-
function
|
|
104
|
+
function da(a) {
|
|
94
105
|
if (a) {
|
|
95
106
|
tt.delete(a);
|
|
96
107
|
return;
|
|
97
108
|
}
|
|
98
109
|
tt.clear();
|
|
99
110
|
}
|
|
100
|
-
async function
|
|
101
|
-
const
|
|
102
|
-
if (!
|
|
111
|
+
async function Kn(a, l) {
|
|
112
|
+
const p = l == null ? void 0 : l.trim();
|
|
113
|
+
if (!p)
|
|
103
114
|
throw new Error("map config url is empty");
|
|
104
|
-
let y = tt.get(
|
|
105
|
-
return y || (y = a.Util.fetchJson({ url:
|
|
106
|
-
throw tt.delete(
|
|
107
|
-
}), tt.set(
|
|
115
|
+
let y = tt.get(p);
|
|
116
|
+
return y || (y = a.Util.fetchJson({ url: p }), y = y.catch((N) => {
|
|
117
|
+
throw tt.delete(p), N;
|
|
118
|
+
}), tt.set(p, y)), qn(await y);
|
|
108
119
|
}
|
|
109
|
-
function
|
|
120
|
+
function jn(a) {
|
|
110
121
|
return {
|
|
111
122
|
lng: a.lng,
|
|
112
123
|
lat: a.lat,
|
|
113
|
-
alt: a.alt ?? a.radius ??
|
|
124
|
+
alt: a.alt ?? a.radius ?? un.alt,
|
|
114
125
|
heading: a.heading,
|
|
115
126
|
pitch: a.pitch
|
|
116
127
|
};
|
|
117
128
|
}
|
|
118
|
-
function
|
|
129
|
+
function Jt(a) {
|
|
119
130
|
a.scene = {
|
|
120
131
|
...a.scene ?? {},
|
|
121
132
|
showSun: !1,
|
|
@@ -124,24 +135,24 @@ function Yt(a) {
|
|
|
124
135
|
showSkyAtmosphere: !1
|
|
125
136
|
};
|
|
126
137
|
}
|
|
127
|
-
async function
|
|
128
|
-
const l = await
|
|
138
|
+
async function Yn(a) {
|
|
139
|
+
const l = await Kn(a.mars3d, a.configUrl);
|
|
129
140
|
if (!(l != null && l.map3d))
|
|
130
141
|
throw new Error("map config is missing map3d");
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
...
|
|
134
|
-
center: a.center ??
|
|
142
|
+
const p = l.map3d;
|
|
143
|
+
Vn(p), Bn(p), Jt(p), p.scene = {
|
|
144
|
+
...p.scene ?? {},
|
|
145
|
+
center: a.center ?? un
|
|
135
146
|
};
|
|
136
147
|
const y = {
|
|
137
|
-
...
|
|
148
|
+
...p,
|
|
138
149
|
...a.options ?? {}
|
|
139
150
|
};
|
|
140
|
-
return
|
|
151
|
+
return Jt(y), y;
|
|
141
152
|
}
|
|
142
|
-
function
|
|
153
|
+
function Qn(a) {
|
|
143
154
|
return a.map((l) => {
|
|
144
|
-
const
|
|
155
|
+
const p = String(l.modelType) === "2";
|
|
145
156
|
return {
|
|
146
157
|
...l,
|
|
147
158
|
label: String(l.modelTypeName || l.name || "模型分组"),
|
|
@@ -149,8 +160,8 @@ function zn(a) {
|
|
|
149
160
|
isExpand: l.isExpand ?? !1,
|
|
150
161
|
data: (l.data || []).map((y) => ({
|
|
151
162
|
...y,
|
|
152
|
-
type:
|
|
153
|
-
modelType:
|
|
163
|
+
type: p ? "2" : y.type ?? l.type,
|
|
164
|
+
modelType: p ? "2" : y.modelType ?? l.modelType,
|
|
154
165
|
label: String(y.fileName || y.name || y.id),
|
|
155
166
|
value: l.modelType ?? y.id,
|
|
156
167
|
status: y.status || "1",
|
|
@@ -159,21 +170,21 @@ function zn(a) {
|
|
|
159
170
|
};
|
|
160
171
|
});
|
|
161
172
|
}
|
|
162
|
-
function
|
|
173
|
+
function fa(a) {
|
|
163
174
|
return [a.type, a.modelType].some((l) => String(l) === "2");
|
|
164
175
|
}
|
|
165
|
-
function
|
|
176
|
+
function Xn(a) {
|
|
166
177
|
const l = a == null ? void 0 : a.trim();
|
|
167
178
|
return l ? /^https?:\/\//i.test(l) || l.endsWith("/tileset.json") || l.endsWith("tileset.json") ? l : `/mapdata/${l.replace(/^\/+|\/+$/g, "")}/tileset.json` : "";
|
|
168
179
|
}
|
|
169
|
-
const
|
|
180
|
+
const Jn = 12, Zt = 16, Zn = 0.3, er = 0.2;
|
|
170
181
|
function Wt(a, l = {}) {
|
|
171
|
-
const
|
|
182
|
+
const p = l.forceQualityMode || a <= 6;
|
|
172
183
|
return {
|
|
173
184
|
// 屏幕空间误差越大,越倾向加载粗层级;远距离保持较大值,能更快看到模型轮廓。
|
|
174
185
|
maximumScreenSpaceError: a,
|
|
175
186
|
// 非极致清晰模式下启用动态误差,远处瓦片会自动降低精度,减少同时加载的细节量。
|
|
176
|
-
dynamicScreenSpaceError: !
|
|
187
|
+
dynamicScreenSpaceError: !p,
|
|
177
188
|
// 允许跳过中间层级,优先请求能覆盖当前视图的目标层级,推进时再逐步补细节。
|
|
178
189
|
skipLevelOfDetail: !0,
|
|
179
190
|
// 配合跳级加载优先选择叶子层级,避免中间层级长期占用显存和请求队列。
|
|
@@ -181,42 +192,42 @@ function Wt(a, l = {}) {
|
|
|
181
192
|
// 不主动加载相邻兄弟瓦片,降低视野外数据带来的内存压力。
|
|
182
193
|
loadSiblings: !1,
|
|
183
194
|
// 视野中心优先保持清晰,边缘区域允许更粗,适合飞行和拖动中的模型浏览。
|
|
184
|
-
foveatedScreenSpaceError: !
|
|
195
|
+
foveatedScreenSpaceError: !p,
|
|
185
196
|
// 不强制立即加载最终层级,先显示可用粗层级,避免瞬时请求过多导致卡顿。
|
|
186
|
-
immediatelyLoadDesiredLevelOfDetail:
|
|
197
|
+
immediatelyLoadDesiredLevelOfDetail: p,
|
|
187
198
|
// 先按较低屏幕高度加载一层粗略瓦片,让远处和初次进入时更快看到轮廓。
|
|
188
|
-
progressiveResolutionHeightFraction:
|
|
199
|
+
progressiveResolutionHeightFraction: p ? 1 : l.progressiveResolutionHeightFraction ?? Zn,
|
|
189
200
|
// 相机移动时跳过大概率过期的瓦片请求,减少飞行和拖动过程中的网络与内存压力。
|
|
190
|
-
cullRequestsWhileMoving: !
|
|
201
|
+
cullRequestsWhileMoving: !p,
|
|
191
202
|
// 移动请求剔除强度,Cesium 默认 60;先保守使用默认值,后续可按实测逐步调高。
|
|
192
203
|
cullRequestsWhileMovingMultiplier: 60,
|
|
193
204
|
// 缺少模型大小数据时先按保守预算加载,降低单个超大模型推进时打满内存的概率。
|
|
194
|
-
cacheBytes: (
|
|
205
|
+
cacheBytes: (p ? 1024 : 160) * 1024 * 1024,
|
|
195
206
|
// 近景清晰模式放大缓存预算,减少刚移出视角再回来时高精瓦片被快速淘汰。
|
|
196
|
-
maximumCacheOverflowBytes: (
|
|
207
|
+
maximumCacheOverflowBytes: (p ? 1024 : 256) * 1024 * 1024,
|
|
197
208
|
// 不使用子节点包围盒裁剪父节点,避免远距离只剩零散细节而看不到整体轮廓。
|
|
198
209
|
cullWithChildrenBounds: !1,
|
|
199
210
|
// 关闭线框调试,避免调试渲染额外增加 GPU 压力。
|
|
200
211
|
enableDebugWireframe: !1
|
|
201
212
|
};
|
|
202
213
|
}
|
|
203
|
-
const
|
|
204
|
-
function
|
|
205
|
-
var y,
|
|
206
|
-
const l = (
|
|
207
|
-
if (!l ||
|
|
208
|
-
const
|
|
209
|
-
typeof
|
|
214
|
+
const tr = 1, nr = 0.8, rr = 8e3, ar = 300 * 1e3, or = 1500, en = 1e3, lr = 30 * 1e3, sr = -17, Oe = 6, ir = 16, tn = 10, ur = 16, cr = 28, dr = 72, fr = 12, gr = 180 * 1024 * 1024, mr = 260 * 1024 * 1024, Mr = 1e3, pr = 8, hr = 220, Sr = 650 * 1024 * 1024, yr = 6e3, Er = 1, _r = 24, Tr = 2, vr = 5e3, br = 5e3, nn = /* @__PURE__ */ new WeakSet();
|
|
215
|
+
function Cr(a) {
|
|
216
|
+
var y, N;
|
|
217
|
+
const l = (N = (y = a == null ? void 0 : a.graphic) == null ? void 0 : y.DivGraphic) == null ? void 0 : N.prototype;
|
|
218
|
+
if (!l || nn.has(l)) return;
|
|
219
|
+
const p = l._container_onMouseMoveHandler;
|
|
220
|
+
typeof p == "function" && (l._container_onMouseMoveHandler = function(...A) {
|
|
210
221
|
try {
|
|
211
|
-
return
|
|
222
|
+
return p.apply(this, A);
|
|
212
223
|
} catch (P) {
|
|
213
224
|
if (P instanceof TypeError && P.message.includes("reading 'fire'"))
|
|
214
225
|
return;
|
|
215
226
|
throw P;
|
|
216
227
|
}
|
|
217
|
-
},
|
|
228
|
+
}, nn.add(l));
|
|
218
229
|
}
|
|
219
|
-
function
|
|
230
|
+
function Lr(a) {
|
|
220
231
|
const l = fe({
|
|
221
232
|
heightText: "-",
|
|
222
233
|
lngText: "-",
|
|
@@ -231,10 +242,10 @@ function Er(a) {
|
|
|
231
242
|
pressureText: "-",
|
|
232
243
|
modelModeText: "-",
|
|
233
244
|
modelProfileText: "-"
|
|
234
|
-
}),
|
|
235
|
-
let
|
|
236
|
-
const
|
|
237
|
-
let se = null, me = null,
|
|
245
|
+
}), p = fe(""), y = fe(null);
|
|
246
|
+
let N = 0, z = [];
|
|
247
|
+
const A = /* @__PURE__ */ new Set(), P = /* @__PURE__ */ new Set(), F = /* @__PURE__ */ new Map(), q = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new Map(), he = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Set(), le = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map();
|
|
248
|
+
let se = null, me = null, m = null, b = 0, E = null, T = null, _ = null, I = 0, g = null, G = "", f = 0, L = null, H = !1, K = "", ue = null;
|
|
238
249
|
function Se(e) {
|
|
239
250
|
return Number.isFinite(e) ? e <= 120 ? Oe : e <= 300 ? 8 : e <= 600 ? 10 : 12 : 12;
|
|
240
251
|
}
|
|
@@ -259,12 +270,12 @@ function Er(a) {
|
|
|
259
270
|
}
|
|
260
271
|
function Ne(e, t = Ae()) {
|
|
261
272
|
if (e == null) {
|
|
262
|
-
|
|
273
|
+
p.value = "", y.value = null;
|
|
263
274
|
return;
|
|
264
275
|
}
|
|
265
276
|
y.value = e;
|
|
266
277
|
const n = t.find((s) => X(s.id, e)), r = j(e);
|
|
267
|
-
|
|
278
|
+
p.value = String(
|
|
268
279
|
(n == null ? void 0 : n.name) || (n == null ? void 0 : n.label) || (n == null ? void 0 : n.fileName) || (r == null ? void 0 : r.name) || ""
|
|
269
280
|
);
|
|
270
281
|
}
|
|
@@ -274,25 +285,25 @@ function Er(a) {
|
|
|
274
285
|
}
|
|
275
286
|
function at(e) {
|
|
276
287
|
var t;
|
|
277
|
-
return ((t = rt(e)) == null ? void 0 : t.secondarySse) ??
|
|
288
|
+
return ((t = rt(e)) == null ? void 0 : t.secondarySse) ?? ir;
|
|
278
289
|
}
|
|
279
290
|
function ot() {
|
|
280
291
|
return {
|
|
281
|
-
warnLoading:
|
|
282
|
-
criticalLoading:
|
|
283
|
-
warnMemoryBytes:
|
|
284
|
-
criticalMemoryBytes:
|
|
292
|
+
warnLoading: cr,
|
|
293
|
+
criticalLoading: dr,
|
|
294
|
+
warnMemoryBytes: gr,
|
|
295
|
+
criticalMemoryBytes: mr
|
|
285
296
|
};
|
|
286
297
|
}
|
|
287
298
|
function ee(e, t = Number(((s) => (s = ((r) => (r = ((n) => (n = a.getMap()) == null ? void 0 : n.camera)()) == null ? void 0 : r.positionCartographic)()) == null ? void 0 : s.height)() || 0)) {
|
|
288
|
-
const i = Me(t), u = ye.get(ne(e)), d = g !== null && X(g, e),
|
|
299
|
+
const i = Me(t), u = ye.get(ne(e)), d = g !== null && X(g, e), M = F.get(ne(e)) ?? 0, h = at(e);
|
|
289
300
|
if (d && u !== void 0)
|
|
290
|
-
return Math.max(u,
|
|
301
|
+
return Math.max(u, M);
|
|
291
302
|
const S = ve(e, t) ? Oe : i;
|
|
292
|
-
return Math.max(d ? S : Math.max(i, h),
|
|
303
|
+
return Math.max(d ? S : Math.max(i, h), M);
|
|
293
304
|
}
|
|
294
305
|
function lt(e, t, n) {
|
|
295
|
-
return t.size === 1 && n <=
|
|
306
|
+
return t.size === 1 && n <= Mr && g !== null && X(g, e);
|
|
296
307
|
}
|
|
297
308
|
function Ct(e) {
|
|
298
309
|
if (g === null) {
|
|
@@ -300,21 +311,21 @@ function Er(a) {
|
|
|
300
311
|
return;
|
|
301
312
|
}
|
|
302
313
|
const t = j(g);
|
|
303
|
-
t != null && t.show && e <=
|
|
314
|
+
t != null && t.show && e <= en && (b = Date.now() + lr);
|
|
304
315
|
}
|
|
305
316
|
function Ke() {
|
|
306
317
|
return g !== null && Date.now() <= b;
|
|
307
318
|
}
|
|
308
319
|
function ve(e, t) {
|
|
309
320
|
var n;
|
|
310
|
-
return t <=
|
|
321
|
+
return t <= en && g !== null && X(g, e) && ((n = j(e)) != null && n.show) ? !0 : Ke() && g !== null && X(g, e);
|
|
311
322
|
}
|
|
312
|
-
function
|
|
313
|
-
return e.loadingCount >=
|
|
323
|
+
function Fe(e) {
|
|
324
|
+
return e.loadingCount >= hr || e.memoryBytes >= Sr;
|
|
314
325
|
}
|
|
315
326
|
function be(e, t, n, r, s) {
|
|
316
|
-
const i = rt(e), u = (i == null ? void 0 : i.minSse) ??
|
|
317
|
-
return lt(e, n, r) &&
|
|
327
|
+
const i = rt(e), u = (i == null ? void 0 : i.minSse) ?? tn, d = (i == null ? void 0 : i.maxSse) ?? ur;
|
|
328
|
+
return lt(e, n, r) && !Fe(t) ? s ? Math.min(d, pr) : u : s ? d : Math.max(u, tn);
|
|
318
329
|
}
|
|
319
330
|
function Ce(e) {
|
|
320
331
|
return x(() => e == null ? void 0 : e.tileset) || x(() => e == null ? void 0 : e._tileset) || x(() => e == null ? void 0 : e._primitive) || x(() => e == null ? void 0 : e.primitive);
|
|
@@ -335,8 +346,8 @@ function Er(a) {
|
|
|
335
346
|
const t = a.getMap();
|
|
336
347
|
if (!(t != null && t.camera)) return;
|
|
337
348
|
const n = Date.now();
|
|
338
|
-
if (!e && n -
|
|
339
|
-
|
|
349
|
+
if (!e && n - N < 300) return;
|
|
350
|
+
N = n;
|
|
340
351
|
const r = t.camera.positionCartographic, s = (i = t.getCameraView) == null ? void 0 : i.call(t);
|
|
341
352
|
l.value = {
|
|
342
353
|
heightText: Number((r == null ? void 0 : r.height) || 0).toFixed(0),
|
|
@@ -355,10 +366,10 @@ function Er(a) {
|
|
|
355
366
|
};
|
|
356
367
|
}
|
|
357
368
|
function He() {
|
|
358
|
-
var i, u, d,
|
|
369
|
+
var i, u, d, M, h;
|
|
359
370
|
if (!a.getMap()) return;
|
|
360
371
|
const t = /* @__PURE__ */ new Set([
|
|
361
|
-
...
|
|
372
|
+
...A,
|
|
362
373
|
...P,
|
|
363
374
|
...a.getManualModelIds()
|
|
364
375
|
]);
|
|
@@ -367,7 +378,7 @@ function Er(a) {
|
|
|
367
378
|
const C = Ce(j(S));
|
|
368
379
|
if (!C) continue;
|
|
369
380
|
n = C.maximumScreenSpaceError ?? "-";
|
|
370
|
-
const
|
|
381
|
+
const U = Number(((i = C._statistics) == null ? void 0 : i.numberOfPendingRequests) ?? ((u = C._requestedTiles) == null ? void 0 : u.length) ?? 0), k = Number(((d = C._statistics) == null ? void 0 : d.numberOfTilesProcessing) ?? 0), V = Number(((M = C._statistics) == null ? void 0 : M.numberOfTilesSelected) ?? ((h = C._selectedTiles) == null ? void 0 : h.length) ?? 0), w = Number.isFinite(U) ? U : 0, ge = Number.isFinite(k) ? k : 0, Y = Number.isFinite(V) ? V : 0, de = Math.max(w, ge);
|
|
371
382
|
r = de > 0 ? `加载中:后台处理 ${de} 项,画面显示 ${Y} 块` : Y > 0 ? `已稳定:画面显示 ${Y} 块` : "已稳定";
|
|
372
383
|
const J = Math.round(Number(C.cacheBytes ?? 0) / 1024 / 1024), pe = Math.round(Number(C.maximumCacheOverflowBytes ?? 0) / 1024 / 1024), Ve = Math.round(Number(C.maximumMemoryUsage ?? C._maximumMemoryUsage ?? 0));
|
|
373
384
|
s = [
|
|
@@ -383,7 +394,7 @@ function Er(a) {
|
|
|
383
394
|
l.value.actualSseText = String(n), l.value.tilesLoadingText = String(r), l.value.tilesetOptionsText = s;
|
|
384
395
|
}
|
|
385
396
|
function je(e) {
|
|
386
|
-
var S, C,
|
|
397
|
+
var S, C, U, k, V, w, ge, Y, de, J, pe, Ve, Je, Ze, Yt;
|
|
387
398
|
const t = Ce(e);
|
|
388
399
|
if (!t)
|
|
389
400
|
return {
|
|
@@ -397,9 +408,9 @@ function Er(a) {
|
|
|
397
408
|
rootGeometricError: 0,
|
|
398
409
|
actualSse: "-"
|
|
399
410
|
};
|
|
400
|
-
const n = Number(((S = t._statistics) == null ? void 0 : S.numberOfPendingRequests) ?? ((C = t._requestedTiles) == null ? void 0 : C.length) ?? 0), r = Number(((
|
|
401
|
-
t.totalMemoryUsageInBytes ?? ((
|
|
402
|
-
), u = Number(((w = t._statistics) == null ? void 0 : w.numberOfTilesSelected) ?? ((ge = t._selectedTiles) == null ? void 0 : ge.length) ?? 0), d = Number(((Y = t._statistics) == null ? void 0 : Y.numberOfTilesVisited) ?? 0),
|
|
411
|
+
const n = Number(((S = t._statistics) == null ? void 0 : S.numberOfPendingRequests) ?? ((C = t._requestedTiles) == null ? void 0 : C.length) ?? 0), r = Number(((U = t._statistics) == null ? void 0 : U.numberOfTilesProcessing) ?? 0), s = Math.max(n, r), i = Number(
|
|
412
|
+
t.totalMemoryUsageInBytes ?? ((k = t._statistics) == null ? void 0 : k.texturesByteLength) ?? ((V = t._statistics) == null ? void 0 : V.geometryByteLength) ?? 0
|
|
413
|
+
), u = Number(((w = t._statistics) == null ? void 0 : w.numberOfTilesSelected) ?? ((ge = t._selectedTiles) == null ? void 0 : ge.length) ?? 0), d = Number(((Y = t._statistics) == null ? void 0 : Y.numberOfTilesVisited) ?? 0), M = Number(((de = t.boundingSphere) == null ? void 0 : de.radius) ?? ((pe = (J = t._root) == null ? void 0 : J.boundingSphere) == null ? void 0 : pe.radius) ?? ((Je = (Ve = t.root) == null ? void 0 : Ve.boundingSphere) == null ? void 0 : Je.radius) ?? 0), h = Number(((Ze = t.root) == null ? void 0 : Ze.geometricError) ?? ((Yt = t._root) == null ? void 0 : Yt.geometricError) ?? 0);
|
|
403
414
|
return {
|
|
404
415
|
loadingCount: Number.isFinite(s) ? s : 0,
|
|
405
416
|
pendingRequests: Number.isFinite(n) ? n : 0,
|
|
@@ -407,7 +418,7 @@ function Er(a) {
|
|
|
407
418
|
memoryBytes: Number.isFinite(i) ? i : 0,
|
|
408
419
|
selectedTiles: Number.isFinite(u) ? u : 0,
|
|
409
420
|
visitedTiles: Number.isFinite(d) ? d : 0,
|
|
410
|
-
radius: Number.isFinite(
|
|
421
|
+
radius: Number.isFinite(M) ? M : 0,
|
|
411
422
|
rootGeometricError: Number.isFinite(h) ? h : 0,
|
|
412
423
|
actualSse: t.maximumScreenSpaceError ?? "-"
|
|
413
424
|
};
|
|
@@ -438,16 +449,16 @@ function Er(a) {
|
|
|
438
449
|
var h;
|
|
439
450
|
const t = Date.now(), n = !!((h = a.shouldProfileModels) != null && h.call(a)), r = Ae(), s = new Map(r.map((S) => [ne(S.id), S]));
|
|
440
451
|
e.forEach((S) => {
|
|
441
|
-
const C = ne(S),
|
|
442
|
-
if (!(
|
|
443
|
-
const
|
|
452
|
+
const C = ne(S), U = j(S);
|
|
453
|
+
if (!(U != null && U.show)) return;
|
|
454
|
+
const k = je(U), V = s.get(C), w = ie.get(C) || {
|
|
444
455
|
id: S,
|
|
445
456
|
name: (V == null ? void 0 : V.name) || (V == null ? void 0 : V.label) || (V == null ? void 0 : V.title) || "模型",
|
|
446
457
|
startedAt: t,
|
|
447
458
|
lastSeenAt: t,
|
|
448
459
|
samples: 0,
|
|
449
460
|
currentSse: ee(S),
|
|
450
|
-
actualSse:
|
|
461
|
+
actualSse: k.actualSse,
|
|
451
462
|
peakLoadingCount: 0,
|
|
452
463
|
peakPendingRequests: 0,
|
|
453
464
|
peakProcessingCount: 0,
|
|
@@ -459,7 +470,7 @@ function Er(a) {
|
|
|
459
470
|
guardSse: null,
|
|
460
471
|
lastLoggedAt: 0
|
|
461
472
|
};
|
|
462
|
-
if (w.lastSeenAt = t, w.samples += 1, w.currentSse = ee(S), w.actualSse =
|
|
473
|
+
if (w.lastSeenAt = t, w.samples += 1, w.currentSse = ee(S), w.actualSse = k.actualSse, w.peakLoadingCount = Math.max(w.peakLoadingCount, k.loadingCount), w.peakPendingRequests = Math.max(w.peakPendingRequests, k.pendingRequests), w.peakProcessingCount = Math.max(w.peakProcessingCount, k.processingCount), w.peakMemoryBytes = Math.max(w.peakMemoryBytes, k.memoryBytes), w.peakSelectedTiles = Math.max(w.peakSelectedTiles, k.selectedTiles), w.peakVisitedTiles = Math.max(w.peakVisitedTiles, k.visitedTiles), w.radius = k.radius || w.radius, w.rootGeometricError = k.rootGeometricError || w.rootGeometricError, w.guardSse = F.get(C) ?? null, ie.set(C, w), Lt(w), n && w.samples >= 3 && t - w.lastLoggedAt >= br) {
|
|
463
474
|
w.lastLoggedAt = t;
|
|
464
475
|
const ge = Ye(w);
|
|
465
476
|
console.table([{
|
|
@@ -493,83 +504,83 @@ function Er(a) {
|
|
|
493
504
|
l.value.modelProfileText = "-";
|
|
494
505
|
return;
|
|
495
506
|
}
|
|
496
|
-
const
|
|
497
|
-
l.value.modelProfileText = `${d.id} ${ke(d)} SSE${d.currentSse}/${d.actualSse} 峰值请求${d.peakLoadingCount} 内存${Math.round(d.peakMemoryBytes / 1024 / 1024)}MB 半径${Math.round(d.radius)}m root${Math.round(d.rootGeometricError)} 建议${
|
|
507
|
+
const M = Ye(d);
|
|
508
|
+
l.value.modelProfileText = `${d.id} ${ke(d)} SSE${d.currentSse}/${d.actualSse} 峰值请求${d.peakLoadingCount} 内存${Math.round(d.peakMemoryBytes / 1024 / 1024)}MB 半径${Math.round(d.radius)}m root${Math.round(d.rootGeometricError)} 建议${M.minSse}/${M.secondarySse}/${M.maxSse}`;
|
|
498
509
|
}
|
|
499
|
-
function
|
|
510
|
+
function Ue() {
|
|
500
511
|
ie.clear(), l.value.modelProfileText = "-";
|
|
501
512
|
}
|
|
502
513
|
function wt() {
|
|
503
|
-
var u, d,
|
|
514
|
+
var u, d, M;
|
|
504
515
|
const e = /* @__PURE__ */ new Set([
|
|
505
|
-
...
|
|
516
|
+
...A,
|
|
506
517
|
...P,
|
|
507
518
|
...a.getManualModelIds()
|
|
508
|
-
]), t = Number(((
|
|
509
|
-
if (n !==
|
|
510
|
-
|
|
519
|
+
]), t = Number(((M = (d = (u = a.getMap()) == null ? void 0 : u.camera) == null ? void 0 : d.positionCartographic) == null ? void 0 : M.height) || 0), n = Array.from(e).map((h) => String(h)).sort().join(",");
|
|
520
|
+
if (n !== G) {
|
|
521
|
+
G = n, f = Date.now(), q.clear(), Q.clear(), l.value.pressureText = F.size ? l.value.pressureText : "-", Qe(e);
|
|
511
522
|
return;
|
|
512
523
|
}
|
|
513
|
-
if (
|
|
524
|
+
if (!F.size && Date.now() - f < vr) {
|
|
514
525
|
q.clear(), Q.clear(), l.value.pressureText = "-", Qe(e);
|
|
515
526
|
return;
|
|
516
527
|
}
|
|
517
528
|
const r = [], s = Ae();
|
|
518
529
|
e.forEach((h) => {
|
|
519
530
|
var ge;
|
|
520
|
-
const S = je(j(h)), C = S.loadingCount >=
|
|
521
|
-
let
|
|
522
|
-
const
|
|
531
|
+
const S = je(j(h)), C = S.loadingCount >= fr;
|
|
532
|
+
let U = null;
|
|
533
|
+
const k = F.get(ne(h)), V = ot(), w = bt(h, s);
|
|
523
534
|
if (lt(h, e, t)) {
|
|
524
535
|
const Y = ne(h);
|
|
525
|
-
(ge = a.destroyModelResourcesExcept) == null || ge.call(a, [h]),
|
|
536
|
+
(ge = a.destroyModelResourcesExcept) == null || ge.call(a, [h]), F.delete(Y), q.delete(Y), Q.delete(Y), Ie(j(h), ee(h)), r.push(`${w}|保护中|SSE ${ee(h)}|内存 ${Math.round(S.memoryBytes / 1024 / 1024)}MB`);
|
|
526
537
|
return;
|
|
527
538
|
}
|
|
528
|
-
if (S.loadingCount >= V.criticalLoading ||
|
|
539
|
+
if (S.loadingCount >= V.criticalLoading || k !== void 0 && C && S.memoryBytes >= V.criticalMemoryBytes ? U = be(h, S, e, t, !0) : (S.loadingCount >= V.warnLoading || C && S.memoryBytes >= V.warnMemoryBytes) && (U = be(h, S, e, t, !1)), U !== null) {
|
|
529
540
|
const Y = ne(h);
|
|
530
541
|
Q.delete(Y);
|
|
531
542
|
const de = (q.get(Y) ?? 0) + 1;
|
|
532
|
-
if (q.set(Y, de), de <
|
|
533
|
-
const J = Math.max(
|
|
534
|
-
|
|
543
|
+
if (q.set(Y, de), de < Tr) return;
|
|
544
|
+
const J = Math.max(k ?? 0, U);
|
|
545
|
+
F.set(Y, J), Ie(j(h), ee(h)), r.push(`${w}|压力降级|保护 SSE ${J}|内存 ${Math.round(S.memoryBytes / 1024 / 1024)}MB`);
|
|
535
546
|
return;
|
|
536
547
|
}
|
|
537
|
-
if (q.delete(ne(h)),
|
|
548
|
+
if (q.delete(ne(h)), k !== void 0) {
|
|
538
549
|
const Y = ne(h), de = Q.get(Y) ?? Date.now();
|
|
539
|
-
Q.set(Y, de), Date.now() - de >=
|
|
550
|
+
Q.set(Y, de), Date.now() - de >= yr && (F.delete(Y), Q.delete(Y), Ie(j(h), ee(h)));
|
|
540
551
|
}
|
|
541
552
|
});
|
|
542
553
|
const i = new Set(Array.from(e).map((h) => ne(h)));
|
|
543
|
-
Array.from(
|
|
544
|
-
i.has(h) ||
|
|
554
|
+
Array.from(F.keys()).forEach((h) => {
|
|
555
|
+
i.has(h) || F.delete(h);
|
|
545
556
|
}), Array.from(Q.keys()).forEach((h) => {
|
|
546
557
|
i.has(h) || Q.delete(h);
|
|
547
558
|
}), l.value.pressureText = r.length ? `压力保护:${r.join(" | ")}` : "-", Qe(e);
|
|
548
559
|
}
|
|
549
|
-
function
|
|
560
|
+
function Ie(e, t) {
|
|
550
561
|
var h, S, C;
|
|
551
562
|
if (!e) return;
|
|
552
563
|
const n = a.getMap(), r = (e == null ? void 0 : e.id) ?? ((h = e == null ? void 0 : e.options) == null ? void 0 : h.id), s = g !== null && X(r, g) && Ke(), i = Wt(t, { forceQualityMode: s });
|
|
553
564
|
e.maximumScreenSpaceError = t, e.options && Object.assign(e.options, i);
|
|
554
565
|
const u = Object.entries(i), d = s || t <= Oe ? 1024 : 192;
|
|
555
|
-
e.maxMemory !== void 0 && (e.maxMemory = d), e.options && (e.options.maxMemory = d), u.forEach(([
|
|
556
|
-
e[
|
|
566
|
+
e.maxMemory !== void 0 && (e.maxMemory = d), e.options && (e.options.maxMemory = d), u.forEach(([U, k]) => {
|
|
567
|
+
e[U] !== void 0 && (e[U] = k);
|
|
557
568
|
});
|
|
558
|
-
const
|
|
559
|
-
|
|
560
|
-
|
|
569
|
+
const M = Ce(e);
|
|
570
|
+
M && (M.maximumScreenSpaceError = t, M.maximumMemoryUsage !== void 0 && (M.maximumMemoryUsage = d), M._maximumMemoryUsage !== void 0 && (M._maximumMemoryUsage = d), u.forEach(([U, k]) => {
|
|
571
|
+
M[U] !== void 0 && (M[U] = k);
|
|
561
572
|
})), He(), (C = (S = n == null ? void 0 : n.scene) == null ? void 0 : S.requestRender) == null || C.call(S);
|
|
562
573
|
}
|
|
563
|
-
function
|
|
564
|
-
|
|
574
|
+
function Pe() {
|
|
575
|
+
m && (clearTimeout(m), m = null), me = null;
|
|
565
576
|
}
|
|
566
577
|
function We(e) {
|
|
567
578
|
if (!a.getMap()) return;
|
|
568
579
|
se = e, (/* @__PURE__ */ new Set([
|
|
569
|
-
...
|
|
580
|
+
...A,
|
|
570
581
|
...P,
|
|
571
582
|
...a.getManualModelIds()
|
|
572
|
-
])).forEach((r) =>
|
|
583
|
+
])).forEach((r) => Ie(j(r), ee(r))), l.value.clarityText = g == null ? String(ce()) : String(ee(g)), l.value.sseText = g == null ? String(ce()) : `当前${g}:${ee(g)}`;
|
|
573
584
|
}
|
|
574
585
|
function xt() {
|
|
575
586
|
var n, r;
|
|
@@ -577,53 +588,53 @@ function Er(a) {
|
|
|
577
588
|
return Number.isFinite(t) ? t : -90;
|
|
578
589
|
}
|
|
579
590
|
function Rt() {
|
|
580
|
-
return xt() >
|
|
591
|
+
return xt() > sr;
|
|
581
592
|
}
|
|
582
|
-
function
|
|
593
|
+
function Ee(e = Number(((r) => (r = ((n) => (n = ((t) => (t = a.getMap()) == null ? void 0 : t.camera)()) == null ? void 0 : n.positionCartographic)()) == null ? void 0 : r.height)() || 0)) {
|
|
583
594
|
if (!a.getMap()) return;
|
|
584
595
|
const i = se, u = g == null ? null : ye.get(ne(g));
|
|
585
596
|
if (u != null) {
|
|
586
|
-
|
|
597
|
+
Pe(), We(u);
|
|
587
598
|
return;
|
|
588
599
|
}
|
|
589
600
|
Ct(e);
|
|
590
601
|
let d = Math.max(Me(e), Oe);
|
|
591
602
|
if (g !== null && ve(g, e) && (d = Oe), i === null || d < i) {
|
|
592
|
-
|
|
603
|
+
Pe(), We(d);
|
|
593
604
|
return;
|
|
594
605
|
}
|
|
595
606
|
if (d === i) {
|
|
596
|
-
|
|
607
|
+
Pe(), l.value.clarityText = g == null ? String(i) : String(ee(g)), l.value.sseText = g == null ? String(i) : `当前${g}:${ee(g)}`;
|
|
597
608
|
return;
|
|
598
609
|
}
|
|
599
|
-
me === d &&
|
|
600
|
-
var C,
|
|
601
|
-
|
|
602
|
-
const
|
|
610
|
+
me === d && m || (Pe(), me = d, m = setTimeout(() => {
|
|
611
|
+
var C, U;
|
|
612
|
+
m = null;
|
|
613
|
+
const M = a.getMap(), h = Number(((U = (C = M == null ? void 0 : M.camera) == null ? void 0 : C.positionCartographic) == null ? void 0 : U.height) || 0);
|
|
603
614
|
let S = Math.max(Me(h), Oe);
|
|
604
615
|
g !== null && ve(g, h) && (S = Oe), me = null, se !== null && S > se && We(S);
|
|
605
|
-
},
|
|
616
|
+
}, or), l.value.clarityText = String(i), l.value.sseText = `${i}->${d}`);
|
|
606
617
|
}
|
|
607
618
|
function Dt(e) {
|
|
608
619
|
if (g == null) return !1;
|
|
609
|
-
const t = Math.min(
|
|
620
|
+
const t = Math.min(_r, Math.max(Er, Math.round(Number(e))));
|
|
610
621
|
if (!Number.isFinite(t)) return !1;
|
|
611
622
|
const n = ne(g);
|
|
612
|
-
return ye.set(n, t),
|
|
623
|
+
return ye.set(n, t), F.delete(n), q.delete(n), Q.delete(n), Pe(), We(t), He(), Ge(), !0;
|
|
613
624
|
}
|
|
614
625
|
function Nt() {
|
|
615
|
-
return g == null ? !1 : (ye.delete(ne(g)),
|
|
626
|
+
return g == null ? !1 : (ye.delete(ne(g)), Pe(), se = null, Ee(), He(), Ge(), !0);
|
|
616
627
|
}
|
|
617
628
|
function it(e = 0, t = 0) {
|
|
618
629
|
var C;
|
|
619
630
|
const n = a.getMap(), r = a.getCesium(), s = (C = n == null ? void 0 : n.camera) == null ? void 0 : C.computeViewRectangle(n.scene.globe.ellipsoid);
|
|
620
631
|
if (!s) return null;
|
|
621
|
-
const i = r.Math.toDegrees(s.west), u = r.Math.toDegrees(s.east), d = r.Math.toDegrees(s.south),
|
|
632
|
+
const i = r.Math.toDegrees(s.west), u = r.Math.toDegrees(s.east), d = r.Math.toDegrees(s.south), M = r.Math.toDegrees(s.north), h = Math.max(Math.abs(u - i) * e, t), S = Math.max(Math.abs(M - d) * e, t);
|
|
622
633
|
return {
|
|
623
634
|
west: i - h,
|
|
624
635
|
east: u + h,
|
|
625
636
|
south: d - S,
|
|
626
|
-
north:
|
|
637
|
+
north: M + S
|
|
627
638
|
};
|
|
628
639
|
}
|
|
629
640
|
function ut(e, t) {
|
|
@@ -648,10 +659,10 @@ function Er(a) {
|
|
|
648
659
|
return (h = n == null ? void 0 : n.boundingSphere) == null ? void 0 : h.center;
|
|
649
660
|
});
|
|
650
661
|
if (!d) return null;
|
|
651
|
-
const
|
|
652
|
-
return
|
|
653
|
-
lng: t.Math.toDegrees(
|
|
654
|
-
lat: t.Math.toDegrees(
|
|
662
|
+
const M = x(() => t.Cartographic.fromCartesian(d));
|
|
663
|
+
return M ? {
|
|
664
|
+
lng: t.Math.toDegrees(M.longitude),
|
|
665
|
+
lat: t.Math.toDegrees(M.latitude)
|
|
655
666
|
} : null;
|
|
656
667
|
}
|
|
657
668
|
function Le(e) {
|
|
@@ -684,11 +695,11 @@ function Er(a) {
|
|
|
684
695
|
const e = a.getMap(), t = a.getCesium(), n = (u = e == null ? void 0 : e.scene) == null ? void 0 : u.canvas;
|
|
685
696
|
if (!e || !t || !n) return null;
|
|
686
697
|
const r = new t.Cartesian2(n.clientWidth / 2, n.clientHeight / 2), s = x(() => {
|
|
687
|
-
var d,
|
|
688
|
-
return (
|
|
698
|
+
var d, M;
|
|
699
|
+
return (M = (d = e.scene) == null ? void 0 : d.pickPosition) == null ? void 0 : M.call(d, r);
|
|
689
700
|
}) || x(() => {
|
|
690
|
-
var d,
|
|
691
|
-
return (
|
|
701
|
+
var d, M;
|
|
702
|
+
return (M = (d = e.camera) == null ? void 0 : d.pickEllipsoid) == null ? void 0 : M.call(d, r, e.scene.globe.ellipsoid);
|
|
692
703
|
});
|
|
693
704
|
if (!s) return null;
|
|
694
705
|
const i = x(() => t.Cartographic.fromCartesian(s));
|
|
@@ -697,7 +708,7 @@ function Er(a) {
|
|
|
697
708
|
lat: t.Math.toDegrees(i.latitude)
|
|
698
709
|
} : null;
|
|
699
710
|
}
|
|
700
|
-
function
|
|
711
|
+
function It() {
|
|
701
712
|
const e = a.getMap(), t = x(() => {
|
|
702
713
|
var s;
|
|
703
714
|
return (s = e == null ? void 0 : e.getCenter) == null ? void 0 : s.call(e);
|
|
@@ -707,14 +718,14 @@ function Er(a) {
|
|
|
707
718
|
function gt(e) {
|
|
708
719
|
return e ? '<svg viewBox="0 0 1024 1024" aria-hidden="true"><path fill="currentColor" d="M512 512a128 128 0 1 0 0-256 128 128 0 0 0 0 256z"/><path fill="currentColor" d="M512 64a384 384 0 0 0-384 384c0 236.8 384 512 384 512s384-275.2 384-512A384 384 0 0 0 512 64zm0 512a192 192 0 1 1 0-384 192 192 0 0 1 0 384z"/></svg>' : '<svg viewBox="0 0 1024 1024" aria-hidden="true"><path fill="currentColor" d="M512 512a128 128 0 1 0 0-256 128 128 0 0 0 0 256z"/><path fill="currentColor" d="M512 64a384 384 0 0 0-384 384c0 236.8 384 512 384 512s384-275.2 384-512A384 384 0 0 0 512 64zm0 820.8C391.04 790.4 192 587.52 192 448a320 320 0 0 1 640 0c0 139.52-199.04 342.4-320 436.8z"/></svg>';
|
|
709
720
|
}
|
|
710
|
-
function
|
|
721
|
+
function Pt(e, t, n, r) {
|
|
711
722
|
var h;
|
|
712
|
-
const s = (e == null ? void 0 : e.id) ?? "-", i = (e == null ? void 0 : e.label) || (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || "模型", d = !!((h = a.shouldShowDebugDetails) != null && h.call(a)) ? `<span class="real-model-debug-label__id">${s}</span>` : "",
|
|
723
|
+
const s = (e == null ? void 0 : e.id) ?? "-", i = (e == null ? void 0 : e.label) || (e == null ? void 0 : e.name) || (e == null ? void 0 : e.title) || "模型", d = !!((h = a.shouldShowDebugDetails) != null && h.call(a)) ? `<span class="real-model-debug-label__id">${s}</span>` : "", M = r ? "正在查看" : "点击查看";
|
|
713
724
|
return `<div class="real-model-debug-label ${t ? "is-visible" : "is-hidden"} ${n ? "is-hovered" : ""} ${r ? "is-current" : ""}">
|
|
714
725
|
<span class="real-model-debug-label__icon">${gt(t)}</span>
|
|
715
726
|
${d}
|
|
716
727
|
<span class="real-model-debug-label__name">${i}</span>
|
|
717
|
-
<span class="real-model-debug-label__action">${
|
|
728
|
+
<span class="real-model-debug-label__action">${M}</span>
|
|
718
729
|
</div>`;
|
|
719
730
|
}
|
|
720
731
|
function mt() {
|
|
@@ -740,12 +751,12 @@ function Er(a) {
|
|
|
740
751
|
return (S = n == null ? void 0 : n._root) == null ? void 0 : S._boundingVolume;
|
|
741
752
|
}), s = x(() => r == null ? void 0 : r.boundingVolume) || x(() => r == null ? void 0 : r._boundingVolume) || x(() => r == null ? void 0 : r.orientedBoundingBox) || x(() => r == null ? void 0 : r._orientedBoundingBox), i = x(() => s == null ? void 0 : s.center), u = x(() => s == null ? void 0 : s.halfAxes);
|
|
742
753
|
if (!i || !u || !((h = t == null ? void 0 : t.Matrix3) != null && h.getColumn)) return null;
|
|
743
|
-
const d = t.Matrix3.getColumn(u, 0, new t.Cartesian3()),
|
|
754
|
+
const d = t.Matrix3.getColumn(u, 0, new t.Cartesian3()), M = t.Matrix3.getColumn(u, 1, new t.Cartesian3());
|
|
744
755
|
return [
|
|
745
|
-
t.Cartesian3.add(t.Cartesian3.add(i, d, new t.Cartesian3()),
|
|
746
|
-
t.Cartesian3.add(t.Cartesian3.subtract(i, d, new t.Cartesian3()),
|
|
747
|
-
t.Cartesian3.subtract(t.Cartesian3.subtract(i, d, new t.Cartesian3()),
|
|
748
|
-
t.Cartesian3.add(t.Cartesian3.subtract(i,
|
|
756
|
+
t.Cartesian3.add(t.Cartesian3.add(i, d, new t.Cartesian3()), M, new t.Cartesian3()),
|
|
757
|
+
t.Cartesian3.add(t.Cartesian3.subtract(i, d, new t.Cartesian3()), M, new t.Cartesian3()),
|
|
758
|
+
t.Cartesian3.subtract(t.Cartesian3.subtract(i, d, new t.Cartesian3()), M, new t.Cartesian3()),
|
|
759
|
+
t.Cartesian3.add(t.Cartesian3.subtract(i, M, new t.Cartesian3()), d, new t.Cartesian3())
|
|
749
760
|
];
|
|
750
761
|
}
|
|
751
762
|
function At(e) {
|
|
@@ -833,11 +844,11 @@ function Er(a) {
|
|
|
833
844
|
if (s != null && s.length) {
|
|
834
845
|
D.set(n, s);
|
|
835
846
|
const d = Ot(s);
|
|
836
|
-
return d &&
|
|
847
|
+
return d && $.set(n, d), re.add(n), s;
|
|
837
848
|
}
|
|
838
849
|
const i = At(t), u = i || pt(e);
|
|
839
850
|
if (u) {
|
|
840
|
-
|
|
851
|
+
$.set(n, u);
|
|
841
852
|
const d = ht(u);
|
|
842
853
|
return D.set(n, d), i && re.add(n), d;
|
|
843
854
|
}
|
|
@@ -870,48 +881,48 @@ function Er(a) {
|
|
|
870
881
|
(t = a.locateMaterialModel) == null || t.call(a, e);
|
|
871
882
|
}
|
|
872
883
|
function R(e, t, n, r) {
|
|
873
|
-
var d,
|
|
874
|
-
const s = a.getMars3d(), i = ((d = s == null ? void 0 : s.EventType) == null ? void 0 : d.mouseOver) || "mouseover", u = ((
|
|
884
|
+
var d, M, h, S;
|
|
885
|
+
const s = a.getMars3d(), i = ((d = s == null ? void 0 : s.EventType) == null ? void 0 : d.mouseOver) || "mouseover", u = ((M = s == null ? void 0 : s.EventType) == null ? void 0 : M.mouseOut) || "mouseout";
|
|
875
886
|
(h = e.on) == null || h.call(e, i, () => {
|
|
876
887
|
o(t.id, n, r);
|
|
877
888
|
}), (S = e.on) == null || S.call(e, u, () => {
|
|
878
889
|
o(null, n, r);
|
|
879
890
|
});
|
|
880
891
|
}
|
|
881
|
-
function
|
|
892
|
+
function B() {
|
|
882
893
|
var e;
|
|
883
894
|
K = "", ue = null, (e = L == null ? void 0 : L.clear) == null || e.call(L);
|
|
884
895
|
}
|
|
885
896
|
function te(e) {
|
|
886
897
|
if (H = e, !e) {
|
|
887
|
-
|
|
898
|
+
B();
|
|
888
899
|
return;
|
|
889
900
|
}
|
|
890
|
-
|
|
901
|
+
Ut();
|
|
891
902
|
}
|
|
892
903
|
function ae(e, t) {
|
|
893
904
|
const n = a.getMap(), r = a.getMars3d(), s = a.getCesium();
|
|
894
905
|
if (!n) return;
|
|
895
|
-
if (
|
|
896
|
-
|
|
906
|
+
if (Cr(r), !H) {
|
|
907
|
+
B();
|
|
897
908
|
return;
|
|
898
909
|
}
|
|
899
910
|
const i = mt();
|
|
900
911
|
if (!i) return;
|
|
901
|
-
const u = new Set(t.map((
|
|
902
|
-
d !== K && (K = d, i.clear(), e.forEach((
|
|
912
|
+
const u = new Set(t.map((M) => String(M))), d = `${e.map((M) => String(M.id)).join(",")}|${Array.from(u).sort().join(",")}|current:${y.value ?? ""}|hover:${ue ?? ""}`;
|
|
913
|
+
d !== K && (K = d, i.clear(), e.forEach((M) => {
|
|
903
914
|
var w, ge, Y;
|
|
904
|
-
const h = ze(
|
|
915
|
+
const h = ze(M);
|
|
905
916
|
if (!h) return;
|
|
906
|
-
const S = u.has(String(
|
|
907
|
-
|
|
908
|
-
c(
|
|
909
|
-
}), i.addGraphic(
|
|
917
|
+
const S = u.has(String(M.id)), C = String(ue ?? "") === String(M.id), U = y.value != null && X(y.value, M.id), k = kt(M, S, C, U);
|
|
918
|
+
k && (R(k, M, e, t), (w = k.on) == null || w.call(k, r.EventType.click, () => {
|
|
919
|
+
c(M);
|
|
920
|
+
}), i.addGraphic(k));
|
|
910
921
|
const V = new r.graphic.DivGraphic({
|
|
911
922
|
position: h,
|
|
912
923
|
pointerEvents: !0,
|
|
913
924
|
style: {
|
|
914
|
-
html:
|
|
925
|
+
html: Pt(M, S, C, U),
|
|
915
926
|
horizontalOrigin: s.HorizontalOrigin.CENTER,
|
|
916
927
|
verticalOrigin: s.VerticalOrigin.BOTTOM,
|
|
917
928
|
offsetY: C ? -36 : -28,
|
|
@@ -919,30 +930,30 @@ function Er(a) {
|
|
|
919
930
|
disableDepthTestDistance: Number.POSITIVE_INFINITY
|
|
920
931
|
}
|
|
921
932
|
});
|
|
922
|
-
R(V,
|
|
933
|
+
R(V, M, e, t), (ge = V.on) == null || ge.call(V, r.EventType.load, (de) => {
|
|
923
934
|
var Ve, Je;
|
|
924
935
|
const J = (Ve = de == null ? void 0 : de.target) == null ? void 0 : Ve.container;
|
|
925
936
|
J != null && J.style && (J.style.pointerEvents = "auto", J.style.zIndex = C ? "10001" : "9999");
|
|
926
937
|
const pe = ((Je = J == null ? void 0 : J.querySelector) == null ? void 0 : Je.call(J, ".real-model-debug-label")) || (J == null ? void 0 : J.firstElementChild);
|
|
927
938
|
!(pe != null && pe.dataset) || pe.dataset.realModelClickBound === "1" || (pe.dataset.realModelClickBound = "1", pe.addEventListener("mouseenter", () => {
|
|
928
|
-
o(
|
|
939
|
+
o(M.id, e, t);
|
|
929
940
|
}), pe.addEventListener("mouseleave", () => {
|
|
930
941
|
o(null, e, t);
|
|
931
942
|
}), pe.addEventListener("click", (Ze) => {
|
|
932
|
-
Ze.preventDefault(), Ze.stopPropagation(), c(
|
|
943
|
+
Ze.preventDefault(), Ze.stopPropagation(), c(M);
|
|
933
944
|
}));
|
|
934
945
|
}), (Y = V.on) == null || Y.call(V, r.EventType.click, () => {
|
|
935
|
-
c(
|
|
946
|
+
c(M);
|
|
936
947
|
}), i.addGraphic(V);
|
|
937
948
|
}));
|
|
938
949
|
}
|
|
939
950
|
function we(e, t, n = 0) {
|
|
940
|
-
var
|
|
951
|
+
var M;
|
|
941
952
|
const r = a.getMap();
|
|
942
953
|
if (!r) return !1;
|
|
943
954
|
const s = Le(e);
|
|
944
955
|
if (!s || t && n <= 0 && !ut(s, t)) return !1;
|
|
945
|
-
const i = ze(e), u = (
|
|
956
|
+
const i = ze(e), u = (M = r.scene) == null ? void 0 : M.canvas, d = Xe(i);
|
|
946
957
|
if (d && u) {
|
|
947
958
|
const h = Math.max(u.clientWidth, u.clientHeight) * n;
|
|
948
959
|
return d.x >= 0 - h && d.x <= u.clientWidth + h && d.y >= 0 - h && d.y <= u.clientHeight + h;
|
|
@@ -955,7 +966,7 @@ function Er(a) {
|
|
|
955
966
|
lat: (Number(e.south) + Number(e.north)) / 2
|
|
956
967
|
} : null;
|
|
957
968
|
}
|
|
958
|
-
function
|
|
969
|
+
function _e(e, t) {
|
|
959
970
|
if (!e || !t) return Number.MAX_SAFE_INTEGER;
|
|
960
971
|
const n = e.lng - t.lng, r = e.lat - t.lat;
|
|
961
972
|
return n * n + r * r;
|
|
@@ -978,25 +989,25 @@ function Er(a) {
|
|
|
978
989
|
var s, i, u, d;
|
|
979
990
|
const n = a.getMap(), r = (s = a.getLastPointerLngLat) == null ? void 0 : s.call(a);
|
|
980
991
|
if (Rt() && !((i = a.getLastPointerWindowPosition) != null && i.call(a))) {
|
|
981
|
-
const
|
|
982
|
-
return
|
|
992
|
+
const M = _e(Le(e), r || t), h = Bt(e);
|
|
993
|
+
return M + (Number.isFinite(h) ? h * 2e-6 : 0);
|
|
983
994
|
}
|
|
984
995
|
if (n) {
|
|
985
|
-
const
|
|
996
|
+
const M = ze(e), h = (u = n.scene) == null ? void 0 : u.canvas, S = Xe(M);
|
|
986
997
|
if (S && h) {
|
|
987
998
|
const C = (d = a.getLastPointerWindowPosition) == null ? void 0 : d.call(a);
|
|
988
999
|
if (C) {
|
|
989
|
-
const
|
|
990
|
-
return
|
|
1000
|
+
const U = S.x - C.x, k = S.y - C.y;
|
|
1001
|
+
return U * U + k * k;
|
|
991
1002
|
}
|
|
992
|
-
return r ?
|
|
1003
|
+
return r ? _e(Le(e), r) : Be(e);
|
|
993
1004
|
}
|
|
994
1005
|
}
|
|
995
|
-
return
|
|
1006
|
+
return _e(Le(e), t);
|
|
996
1007
|
}
|
|
997
|
-
function
|
|
1008
|
+
function dn(e) {
|
|
998
1009
|
var t;
|
|
999
|
-
return ((t = a.getLastPointerLngLat) == null ? void 0 : t.call(a)) ||
|
|
1010
|
+
return ((t = a.getLastPointerLngLat) == null ? void 0 : t.call(a)) || It() || ft() || xe(e);
|
|
1000
1011
|
}
|
|
1001
1012
|
function X(e, t) {
|
|
1002
1013
|
return String(e) === String(t);
|
|
@@ -1007,22 +1018,22 @@ function Er(a) {
|
|
|
1007
1018
|
function ne(e) {
|
|
1008
1019
|
return String(e);
|
|
1009
1020
|
}
|
|
1010
|
-
function
|
|
1021
|
+
function Et(e, t = !1, n = []) {
|
|
1011
1022
|
return Array.isArray(e) && e.forEach((r) => {
|
|
1012
1023
|
var u, d;
|
|
1013
|
-
const s = [r == null ? void 0 : r.value, r == null ? void 0 : r.modelType, r == null ? void 0 : r.type], i = t || s.some((
|
|
1024
|
+
const s = [r == null ? void 0 : r.value, r == null ? void 0 : r.modelType, r == null ? void 0 : r.type], i = t || s.some((M) => String(M) === "2");
|
|
1014
1025
|
if ((u = r == null ? void 0 : r.data) != null && u.length) {
|
|
1015
|
-
|
|
1026
|
+
Et(r.data, i, n);
|
|
1016
1027
|
return;
|
|
1017
1028
|
}
|
|
1018
1029
|
if ((d = r == null ? void 0 : r.children) != null && d.length) {
|
|
1019
|
-
|
|
1030
|
+
Et(r.children, i, n);
|
|
1020
1031
|
return;
|
|
1021
1032
|
}
|
|
1022
1033
|
i && (r != null && r.id) && !a.isPoliceModelLeaf(r) && n.push(r);
|
|
1023
1034
|
}), n;
|
|
1024
1035
|
}
|
|
1025
|
-
function
|
|
1036
|
+
function $t(...e) {
|
|
1026
1037
|
const t = /* @__PURE__ */ new Map();
|
|
1027
1038
|
return e.flat().forEach((n) => {
|
|
1028
1039
|
if (!(n != null && n.id)) return;
|
|
@@ -1033,9 +1044,9 @@ function Er(a) {
|
|
|
1033
1044
|
}), Array.from(t.values());
|
|
1034
1045
|
}
|
|
1035
1046
|
function Ae() {
|
|
1036
|
-
return
|
|
1047
|
+
return $t(
|
|
1037
1048
|
z,
|
|
1038
|
-
|
|
1049
|
+
Et(a.getTreeData())
|
|
1039
1050
|
).filter((e) => (e == null ? void 0 : e.id) && !a.isPoliceModelLeaf(e));
|
|
1040
1051
|
}
|
|
1041
1052
|
function Re(e, t = !0) {
|
|
@@ -1047,48 +1058,48 @@ function Er(a) {
|
|
|
1047
1058
|
a.hideMaterialModel(e, t);
|
|
1048
1059
|
}
|
|
1049
1060
|
}
|
|
1050
|
-
function
|
|
1061
|
+
function fn(e) {
|
|
1051
1062
|
var t;
|
|
1052
1063
|
(t = a.destroyModelResourcesExcept) == null || t.call(a, Array.from(e)), Ae().forEach((n) => {
|
|
1053
1064
|
if (qe(e, n.id)) return;
|
|
1054
1065
|
const r = j(n.id);
|
|
1055
1066
|
r != null && r.show && Re(n.id, !1);
|
|
1056
|
-
}),
|
|
1067
|
+
}), A.forEach((n) => {
|
|
1057
1068
|
qe(e, n) || Re(n, !1);
|
|
1058
1069
|
}), P.forEach((n) => {
|
|
1059
1070
|
qe(e, n) || Re(n, !1);
|
|
1060
1071
|
});
|
|
1061
1072
|
}
|
|
1062
|
-
function
|
|
1073
|
+
function _t(e) {
|
|
1063
1074
|
return g !== null && X(g, e);
|
|
1064
1075
|
}
|
|
1065
|
-
function
|
|
1066
|
-
const e = Ae(), t = new Map(e.map((d) => [String(d.id), d])), n = it(), r =
|
|
1076
|
+
function Ft() {
|
|
1077
|
+
const e = Ae(), t = new Map(e.map((d) => [String(d.id), d])), n = it(), r = dn(n), s = /* @__PURE__ */ new Set([
|
|
1067
1078
|
...e.map((d) => d.id),
|
|
1068
|
-
...
|
|
1079
|
+
...A,
|
|
1069
1080
|
...P,
|
|
1070
1081
|
...a.getManualModelIds()
|
|
1071
1082
|
]), i = Array.from(s).filter((d) => {
|
|
1072
|
-
const
|
|
1073
|
-
return !!(
|
|
1074
|
-
}).sort((d,
|
|
1083
|
+
const M = j(d);
|
|
1084
|
+
return !!(M != null && M.show);
|
|
1085
|
+
}).sort((d, M) => yt(t.get(String(d)) || { id: d }, r) - yt(t.get(String(M)) || { id: M }, r)), u = e.filter((d) => !!Le(d)).filter((d) => we(d, n, nr)).sort((d, M) => yt(d, r) - yt(M, r)).slice(0, 30);
|
|
1075
1086
|
return ae(u, i), {
|
|
1076
1087
|
visibleModelIds: i,
|
|
1077
1088
|
visibleModelCount: i.length,
|
|
1078
1089
|
manualModelCount: a.getManualModelIds().length,
|
|
1079
|
-
autoModelCount:
|
|
1090
|
+
autoModelCount: A.size,
|
|
1080
1091
|
pinnedModelCount: P.size
|
|
1081
1092
|
};
|
|
1082
1093
|
}
|
|
1083
|
-
function
|
|
1084
|
-
const t =
|
|
1085
|
-
l.value.realText = `${t.visibleModelCount}/${
|
|
1094
|
+
function Ge(e = Ae().length) {
|
|
1095
|
+
const t = Ft();
|
|
1096
|
+
l.value.realText = `${t.visibleModelCount}/${tr} 当前真实模型 ${t.visibleModelIds.join(",") || "-"} / 标签 ${e}`;
|
|
1086
1097
|
}
|
|
1087
|
-
function
|
|
1098
|
+
function gn(e) {
|
|
1088
1099
|
var r, s, i;
|
|
1089
1100
|
const t = a.getMap();
|
|
1090
1101
|
return {
|
|
1091
|
-
|
|
1102
|
+
...Ft(),
|
|
1092
1103
|
time: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1093
1104
|
cameraHeight: Number(((s = (r = t == null ? void 0 : t.camera) == null ? void 0 : r.positionCartographic) == null ? void 0 : s.height) || 0).toFixed(0),
|
|
1094
1105
|
sse: l.value.sseText,
|
|
@@ -1097,78 +1108,78 @@ function Er(a) {
|
|
|
1097
1108
|
errorMessage: (e == null ? void 0 : e.message) || ((i = e == null ? void 0 : e.error) == null ? void 0 : i.message) || String(e || "")
|
|
1098
1109
|
};
|
|
1099
1110
|
}
|
|
1100
|
-
function
|
|
1101
|
-
|
|
1102
|
-
|
|
1111
|
+
function mn(e = /* @__PURE__ */ new Set()) {
|
|
1112
|
+
A.forEach((t) => {
|
|
1113
|
+
_t(t) || qe(e, t) || a.getManualModelIds().includes(t) || Re(t, !1);
|
|
1103
1114
|
}), P.forEach((t) => {
|
|
1104
|
-
|
|
1115
|
+
_t(t) || qe(e, t) || a.getManualModelIds().some((n) => X(n, t)) || Re(t, !1);
|
|
1105
1116
|
});
|
|
1106
1117
|
}
|
|
1107
|
-
function
|
|
1108
|
-
return
|
|
1118
|
+
function Kt(e) {
|
|
1119
|
+
return _ !== null && Date.now() <= I && X(e, _);
|
|
1109
1120
|
}
|
|
1110
|
-
function
|
|
1121
|
+
function Mn(e, t) {
|
|
1111
1122
|
var i;
|
|
1112
1123
|
if (!a.getMap()) return;
|
|
1113
|
-
|
|
1124
|
+
Ee(e);
|
|
1114
1125
|
const r = /* @__PURE__ */ new Set(), s = Ae();
|
|
1115
|
-
if (g !== null && ((i = j(g)) != null && i.show) && (a.showMaterialModel(g, !1),
|
|
1116
|
-
|
|
1126
|
+
if (g !== null && ((i = j(g)) != null && i.show) && (a.showMaterialModel(g, !1), Ie(j(g), ee(g)), r.add(g)), !r.size) {
|
|
1127
|
+
mn(r), A.clear(), P.clear(), F.clear(), q.clear(), Q.clear(), E = null, _ = null, I = 0, g = null, Ne(null, s), Ue(), Ft(), Ge(s.length), l.value.modelModeText = "模型总览模式:当前仅展示模型范围和名称;点击模型标签后加载真实模型。";
|
|
1117
1128
|
return;
|
|
1118
1129
|
}
|
|
1119
|
-
|
|
1130
|
+
fn(r), A.clear(), r.forEach((u) => A.add(u)), P.clear(), r.forEach((u) => P.add(u)), g = Array.from(r)[0] ?? null, Ne(g, s), Ee(e), l.value.modelModeText = g !== null ? "模型查看模式:当前模型已锁定,拉远视角不会自动销毁;切换模型时才释放当前真实模型。" : "模型总览模式:当前仅展示模型范围和名称;点击模型标签后加载真实模型。", Ge(s.length), wt();
|
|
1120
1131
|
}
|
|
1121
|
-
function
|
|
1132
|
+
function Ut() {
|
|
1122
1133
|
var n;
|
|
1123
1134
|
const e = a.getMap();
|
|
1124
1135
|
if (!e) return;
|
|
1125
1136
|
const t = Number(((n = e.camera.positionCartographic) == null ? void 0 : n.height) || 0);
|
|
1126
|
-
it(0.5, 0.01),
|
|
1137
|
+
it(0.5, 0.01), Mn(t);
|
|
1127
1138
|
}
|
|
1128
|
-
function
|
|
1129
|
-
z =
|
|
1139
|
+
function pn(...e) {
|
|
1140
|
+
z = $t(z, ...e);
|
|
1130
1141
|
}
|
|
1131
|
-
function
|
|
1132
|
-
T && (clearTimeout(T), T = null),
|
|
1142
|
+
function hn(e) {
|
|
1143
|
+
T && (clearTimeout(T), T = null), A.forEach((t) => {
|
|
1133
1144
|
!a.getManualModelIds().some((n) => X(n, t)) && !X(t, e) && Re(t, !1);
|
|
1134
1145
|
}), P.forEach((t) => {
|
|
1135
1146
|
!a.getManualModelIds().some((n) => X(n, t)) && !X(t, e) && Re(t, !1);
|
|
1136
|
-
}),
|
|
1137
|
-
T = null,
|
|
1138
|
-
},
|
|
1147
|
+
}), A.clear(), P.clear(), F.clear(), q.clear(), Q.clear(), ye.clear(), b = 0, Ue(), g = e, Ne(e), _ = e, I = Date.now() + ar, a.showMaterialModel(e, !1), Ie(j(e), ee(e)), P.add(e), E = e, T = setTimeout(() => {
|
|
1148
|
+
T = null, E = null, Ut();
|
|
1149
|
+
}, rr);
|
|
1139
1150
|
}
|
|
1140
|
-
function
|
|
1141
|
-
T && (clearTimeout(T), T = null),
|
|
1151
|
+
function jt(e = {}) {
|
|
1152
|
+
T && (clearTimeout(T), T = null), A.clear(), P.clear(), e.clearDebugLayer !== !1 && B(), Pe(), b = 0, F.clear(), q.clear(), Q.clear(), Ue(), G = "", f = 0, g = null, Ne(null), se = null, E = null, _ = null, I = 0;
|
|
1142
1153
|
}
|
|
1143
|
-
function
|
|
1154
|
+
function Sn() {
|
|
1144
1155
|
var t, n, r;
|
|
1145
1156
|
(/* @__PURE__ */ new Set([
|
|
1146
1157
|
g,
|
|
1147
|
-
E,
|
|
1148
1158
|
_,
|
|
1149
|
-
|
|
1159
|
+
E,
|
|
1160
|
+
...A,
|
|
1150
1161
|
...P
|
|
1151
1162
|
])).forEach((s) => {
|
|
1152
1163
|
s != null && Re(s, !0);
|
|
1153
|
-
}),
|
|
1164
|
+
}), jt({ clearDebugLayer: !1 }), Ge(), (r = (n = (t = a.getMap()) == null ? void 0 : t.scene) == null ? void 0 : n.requestRender) == null || r.call(n);
|
|
1154
1165
|
}
|
|
1155
|
-
function
|
|
1166
|
+
function yn() {
|
|
1156
1167
|
var e, t, n, r;
|
|
1157
|
-
|
|
1158
|
-
|
|
1168
|
+
A.forEach((s) => {
|
|
1169
|
+
_t(s) || Kt(s) || a.getManualModelIds().some((i) => X(i, s)) || Re(s, !1);
|
|
1159
1170
|
}), P.forEach((s) => {
|
|
1160
|
-
|
|
1161
|
-
}),
|
|
1171
|
+
_t(s) || Kt(s) || a.getManualModelIds().some((i) => X(i, s)) || Re(s, !1);
|
|
1172
|
+
}), A.clear(), g !== null && ((e = j(g)) != null && e.show) ? (A.add(g), P.clear(), P.add(g), Ne(g)) : _ !== null && Date.now() <= I ? (A.add(_), P.clear(), P.add(_), g = _, Ne(_)) : (P.clear(), g = null, Ne(null), _ = null, I = 0), F.clear(), q.clear(), Q.clear(), Ue(), Ee(Number(((r = (n = (t = a.getMap()) == null ? void 0 : t.camera) == null ? void 0 : n.positionCartographic) == null ? void 0 : r.height) || 0) + 1e3), Ge();
|
|
1162
1173
|
}
|
|
1163
1174
|
return {
|
|
1164
1175
|
cameraDebugInfo: l,
|
|
1165
|
-
currentModelName:
|
|
1176
|
+
currentModelName: p,
|
|
1166
1177
|
currentModelId: y,
|
|
1167
1178
|
updateCameraDebugInfo: st,
|
|
1168
1179
|
updateActualTilesetDebugInfo: He,
|
|
1169
|
-
collectRenderErrorDebugInfo:
|
|
1170
|
-
applyTilesetScreenSpaceError:
|
|
1171
|
-
applyCurrentModelScreenSpaceError:
|
|
1180
|
+
collectRenderErrorDebugInfo: gn,
|
|
1181
|
+
applyTilesetScreenSpaceError: Ie,
|
|
1182
|
+
applyCurrentModelScreenSpaceError: Ee,
|
|
1172
1183
|
getCurrentModelScreenSpaceError: ce,
|
|
1173
1184
|
getCurrentPrimaryModelScreenSpaceError: De,
|
|
1174
1185
|
getCurrentPrimaryModelRecommendedScreenSpaceError: nt,
|
|
@@ -1176,169 +1187,169 @@ function Er(a) {
|
|
|
1176
1187
|
resetCurrentModelClarity: Nt,
|
|
1177
1188
|
getMaterialModelLayerById: j,
|
|
1178
1189
|
getRealModelLngLat: Le,
|
|
1179
|
-
collectThreeDimensionalModelNodes:
|
|
1180
|
-
mergeRealModelMaterialItems:
|
|
1190
|
+
collectThreeDimensionalModelNodes: Et,
|
|
1191
|
+
mergeRealModelMaterialItems: $t,
|
|
1181
1192
|
getThreeDimensionalModelItems: Ae,
|
|
1182
|
-
updateRealModelDebugText:
|
|
1183
|
-
updateRealModelLayer:
|
|
1193
|
+
updateRealModelDebugText: Ge,
|
|
1194
|
+
updateRealModelLayer: Ut,
|
|
1184
1195
|
setRealModelLabelsVisible: te,
|
|
1185
|
-
setRealModelMaterialItems:
|
|
1186
|
-
handleLocationModel:
|
|
1187
|
-
switchToOverviewMode:
|
|
1188
|
-
releaseAutoVisibleModels:
|
|
1196
|
+
setRealModelMaterialItems: pn,
|
|
1197
|
+
handleLocationModel: hn,
|
|
1198
|
+
switchToOverviewMode: Sn,
|
|
1199
|
+
releaseAutoVisibleModels: yn,
|
|
1189
1200
|
isSameModelId: X,
|
|
1190
1201
|
hasModelId: qe,
|
|
1191
|
-
reset:
|
|
1202
|
+
reset: jt
|
|
1192
1203
|
};
|
|
1193
1204
|
}
|
|
1194
|
-
const
|
|
1195
|
-
function
|
|
1196
|
-
const l = /* @__PURE__ */ new Map(),
|
|
1205
|
+
const wr = 3e3;
|
|
1206
|
+
function xr(a) {
|
|
1207
|
+
const l = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Set();
|
|
1197
1208
|
let y = null;
|
|
1198
|
-
function
|
|
1199
|
-
var
|
|
1200
|
-
return ((
|
|
1209
|
+
function N() {
|
|
1210
|
+
var m;
|
|
1211
|
+
return ((m = a.getCurrentModelScreenSpaceError) == null ? void 0 : m.call(a)) ?? Jn;
|
|
1201
1212
|
}
|
|
1202
|
-
function z(
|
|
1203
|
-
var
|
|
1204
|
-
if (
|
|
1213
|
+
function z(m) {
|
|
1214
|
+
var E, T, _;
|
|
1215
|
+
if (m == null) return null;
|
|
1205
1216
|
const b = a.getMap();
|
|
1206
|
-
return b ? ((
|
|
1217
|
+
return b ? ((E = b.getLayerById) == null ? void 0 : E.call(b, m)) || ((T = b.getLayerById) == null ? void 0 : T.call(b, String(m))) || (Number.isFinite(Number(m)) ? (_ = b.getLayerById) == null ? void 0 : _.call(b, Number(m)) : null) : null;
|
|
1207
1218
|
}
|
|
1208
|
-
function
|
|
1209
|
-
return (
|
|
1219
|
+
function A(m) {
|
|
1220
|
+
return (m == null ? void 0 : m.tileset) || (m == null ? void 0 : m._tileset) || (m == null ? void 0 : m._primitive) || (m == null ? void 0 : m.primitive);
|
|
1210
1221
|
}
|
|
1211
|
-
function P(
|
|
1212
|
-
var T,
|
|
1213
|
-
if (!
|
|
1222
|
+
function P(m, b) {
|
|
1223
|
+
var T, _, I;
|
|
1224
|
+
if (!m) return;
|
|
1214
1225
|
Object.keys(b).forEach((g) => {
|
|
1215
|
-
|
|
1226
|
+
m[g] !== void 0 && (m[g] = b[g]), m.options && (m.options[g] = b[g]);
|
|
1216
1227
|
});
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
}), (
|
|
1221
|
-
}
|
|
1222
|
-
function
|
|
1223
|
-
const
|
|
1224
|
-
if (!
|
|
1225
|
-
const T =
|
|
1226
|
-
id:
|
|
1227
|
-
name:
|
|
1228
|
+
const E = A(m);
|
|
1229
|
+
E && Object.keys(b).forEach((g) => {
|
|
1230
|
+
E[g] !== void 0 && (E[g] = b[g]);
|
|
1231
|
+
}), (I = (_ = (T = a.getMap()) == null ? void 0 : T.scene) == null ? void 0 : _.requestRender) == null || I.call(_);
|
|
1232
|
+
}
|
|
1233
|
+
function F(m, b) {
|
|
1234
|
+
const E = a.getMars3d();
|
|
1235
|
+
if (!E) return null;
|
|
1236
|
+
const T = N(), _ = {
|
|
1237
|
+
id: m.id,
|
|
1238
|
+
name: m.fileName || m.name || "3D model",
|
|
1228
1239
|
url: b,
|
|
1229
1240
|
...Wt(T),
|
|
1230
1241
|
show: !1
|
|
1231
1242
|
};
|
|
1232
|
-
return
|
|
1243
|
+
return m.id === 5 || String(m.id) === "5" ? _.position = { alt: 35 } : (_.maxMemory = T <= 6 ? 768 : 192, _.loadSiblings = !1, _.dynamicScreenSpaceError = T > 6), new E.layer.TilesetLayer(_);
|
|
1233
1244
|
}
|
|
1234
|
-
async function q(
|
|
1245
|
+
async function q(m) {
|
|
1235
1246
|
const b = a.getMap();
|
|
1236
|
-
if (!b ||
|
|
1237
|
-
const
|
|
1238
|
-
if (
|
|
1239
|
-
return
|
|
1240
|
-
const
|
|
1241
|
-
if (
|
|
1242
|
-
const
|
|
1243
|
-
const g = a.resolveTilesetUrl ? await a.resolveTilesetUrl(
|
|
1247
|
+
if (!b || m.id == null) return null;
|
|
1248
|
+
const E = z(m.id), T = String(m.id);
|
|
1249
|
+
if (E)
|
|
1250
|
+
return p.add(T), E;
|
|
1251
|
+
const _ = l.get(T);
|
|
1252
|
+
if (_) return _;
|
|
1253
|
+
const I = (async () => {
|
|
1254
|
+
const g = a.resolveTilesetUrl ? await a.resolveTilesetUrl(m) : Xn(m.file);
|
|
1244
1255
|
if (!g) return null;
|
|
1245
|
-
const
|
|
1246
|
-
return
|
|
1256
|
+
const G = F(m, g);
|
|
1257
|
+
return G ? (await b.addLayer(G), p.add(T), G) : null;
|
|
1247
1258
|
})().finally(() => {
|
|
1248
1259
|
l.delete(T);
|
|
1249
1260
|
});
|
|
1250
|
-
return l.set(T,
|
|
1261
|
+
return l.set(T, I), I;
|
|
1251
1262
|
}
|
|
1252
|
-
async function Q(
|
|
1253
|
-
var
|
|
1254
|
-
const b = await q(
|
|
1255
|
-
return b ? (b.show = !0, (
|
|
1263
|
+
async function Q(m) {
|
|
1264
|
+
var E, T, _;
|
|
1265
|
+
const b = await q(m);
|
|
1266
|
+
return b ? (b.show = !0, (_ = (T = (E = a.getMap()) == null ? void 0 : E.scene) == null ? void 0 : T.requestRender) == null || _.call(T), b) : null;
|
|
1256
1267
|
}
|
|
1257
|
-
function ye(
|
|
1258
|
-
var T,
|
|
1259
|
-
const b = z(
|
|
1268
|
+
function ye(m) {
|
|
1269
|
+
var T, _, I, g;
|
|
1270
|
+
const b = z(m);
|
|
1260
1271
|
if (!b) return;
|
|
1261
1272
|
b.show = !1;
|
|
1262
|
-
const
|
|
1263
|
-
(T =
|
|
1273
|
+
const E = A(b);
|
|
1274
|
+
(T = E == null ? void 0 : E.trimLoadedTiles) == null || T.call(E), (g = (I = (_ = a.getMap()) == null ? void 0 : _.scene) == null ? void 0 : I.requestRender) == null || g.call(I);
|
|
1264
1275
|
}
|
|
1265
|
-
function he(
|
|
1266
|
-
var
|
|
1267
|
-
const b = String(
|
|
1276
|
+
function he(m) {
|
|
1277
|
+
var I, g, G, f, L, H, K;
|
|
1278
|
+
const b = String(m);
|
|
1268
1279
|
l.delete(b);
|
|
1269
|
-
const
|
|
1270
|
-
if (
|
|
1271
|
-
const T =
|
|
1272
|
-
(
|
|
1273
|
-
const
|
|
1274
|
-
|
|
1275
|
-
}
|
|
1276
|
-
function D(
|
|
1277
|
-
var
|
|
1278
|
-
const b = new Set(
|
|
1279
|
-
Array.from(
|
|
1280
|
-
b.has(String(
|
|
1281
|
-
}), (
|
|
1282
|
-
}
|
|
1283
|
-
function
|
|
1284
|
-
P(
|
|
1285
|
-
...Wt(
|
|
1286
|
-
progressiveResolutionHeightFraction:
|
|
1280
|
+
const E = z(m);
|
|
1281
|
+
if (p.delete(b), !E) return;
|
|
1282
|
+
const T = A(E);
|
|
1283
|
+
(I = T == null ? void 0 : T.trimLoadedTiles) == null || I.call(T), E.show = !1;
|
|
1284
|
+
const _ = a.getMap();
|
|
1285
|
+
_ != null && _.removeLayer ? _.removeLayer(E, !0) : ((g = E.remove) == null || g.call(E), !((G = E.isDestroy) != null && G.call(E)) && !((f = E.isDestroyed) != null && f.call(E)) && ((L = E.destroy) == null || L.call(E))), (K = (H = _ == null ? void 0 : _.scene) == null ? void 0 : H.requestRender) == null || K.call(H);
|
|
1286
|
+
}
|
|
1287
|
+
function D(m) {
|
|
1288
|
+
var E, T, _;
|
|
1289
|
+
const b = new Set(m.map((I) => String(I)));
|
|
1290
|
+
Array.from(p).forEach((I) => {
|
|
1291
|
+
b.has(String(I)) || he(I);
|
|
1292
|
+
}), (_ = (T = (E = a.getMap()) == null ? void 0 : E.scene) == null ? void 0 : T.requestRender) == null || _.call(T);
|
|
1293
|
+
}
|
|
1294
|
+
function $(m) {
|
|
1295
|
+
P(m, {
|
|
1296
|
+
...Wt(Zt, {
|
|
1297
|
+
progressiveResolutionHeightFraction: er
|
|
1287
1298
|
}),
|
|
1288
1299
|
preferLeaves: !1
|
|
1289
1300
|
});
|
|
1290
1301
|
}
|
|
1291
|
-
function re(
|
|
1302
|
+
function re(m) {
|
|
1292
1303
|
y && (clearTimeout(y), y = null), y = setTimeout(() => {
|
|
1293
1304
|
y = null;
|
|
1294
|
-
const b =
|
|
1295
|
-
if (((b == null ? void 0 : b.maximumScreenSpaceError) ?? (
|
|
1305
|
+
const b = A(m);
|
|
1306
|
+
if (((b == null ? void 0 : b.maximumScreenSpaceError) ?? (m == null ? void 0 : m.maximumScreenSpaceError)) === Zt) {
|
|
1296
1307
|
if (a.applyTilesetScreenSpaceError) {
|
|
1297
|
-
a.applyTilesetScreenSpaceError(
|
|
1308
|
+
a.applyTilesetScreenSpaceError(m, N());
|
|
1298
1309
|
return;
|
|
1299
1310
|
}
|
|
1300
|
-
P(
|
|
1301
|
-
maximumScreenSpaceError:
|
|
1302
|
-
dynamicScreenSpaceError:
|
|
1311
|
+
P(m, {
|
|
1312
|
+
maximumScreenSpaceError: N(),
|
|
1313
|
+
dynamicScreenSpaceError: N() > 6
|
|
1303
1314
|
});
|
|
1304
1315
|
}
|
|
1305
|
-
},
|
|
1306
|
-
}
|
|
1307
|
-
async function le(
|
|
1308
|
-
var T,
|
|
1309
|
-
if (!
|
|
1310
|
-
(
|
|
1311
|
-
const
|
|
1312
|
-
if (!(
|
|
1316
|
+
}, wr);
|
|
1317
|
+
}
|
|
1318
|
+
async function le(m, b = 2500) {
|
|
1319
|
+
var T, _, I, g, G;
|
|
1320
|
+
if (!m) return;
|
|
1321
|
+
(I = (_ = (T = a.getMap()) == null ? void 0 : T.scene) == null ? void 0 : _.requestRender) == null || I.call(_);
|
|
1322
|
+
const E = m.readyPromise || ((g = A(m)) == null ? void 0 : g.readyPromise);
|
|
1323
|
+
if (!(E != null && E.then)) {
|
|
1313
1324
|
await new Promise((f) => setTimeout(f, 120));
|
|
1314
1325
|
return;
|
|
1315
1326
|
}
|
|
1316
1327
|
await Promise.race([
|
|
1317
|
-
((
|
|
1318
|
-
})) ||
|
|
1328
|
+
((G = E.catch) == null ? void 0 : G.call(E, () => {
|
|
1329
|
+
})) || E,
|
|
1319
1330
|
new Promise((f) => setTimeout(f, b))
|
|
1320
1331
|
]);
|
|
1321
1332
|
}
|
|
1322
|
-
async function ie(
|
|
1323
|
-
var
|
|
1324
|
-
const b = a.getMars3d(),
|
|
1325
|
-
if (!
|
|
1326
|
-
if (
|
|
1333
|
+
async function ie(m) {
|
|
1334
|
+
var I;
|
|
1335
|
+
const b = a.getMars3d(), E = a.getMap(), T = await Q(m);
|
|
1336
|
+
if (!E || !b || !T) return;
|
|
1337
|
+
if ($(T), re(T), await le(T), T.flyTo) {
|
|
1327
1338
|
T.flyTo({ radius: 700, pitch: -15 });
|
|
1328
1339
|
return;
|
|
1329
1340
|
}
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1341
|
+
const _ = ((I = a.getModelLngLat) == null ? void 0 : I.call(a, m)) ?? (m.longitude && m.latitude ? { lng: Number(m.longitude), lat: Number(m.latitude) } : null);
|
|
1342
|
+
_ && E.flyToPoint(new b.LngLatPoint(_.lng, _.lat), { radius: 150, pitch: -15, duration: 1 });
|
|
1332
1343
|
}
|
|
1333
|
-
async function se(
|
|
1334
|
-
for (const b of
|
|
1344
|
+
async function se(m) {
|
|
1345
|
+
for (const b of m)
|
|
1335
1346
|
await q(b);
|
|
1336
1347
|
}
|
|
1337
1348
|
function me() {
|
|
1338
|
-
y && (clearTimeout(y), y = null), l.clear(),
|
|
1349
|
+
y && (clearTimeout(y), y = null), l.clear(), p.clear();
|
|
1339
1350
|
}
|
|
1340
1351
|
return {
|
|
1341
|
-
applyLocationFastTilesetOptions:
|
|
1352
|
+
applyLocationFastTilesetOptions: $,
|
|
1342
1353
|
destroyModel: he,
|
|
1343
1354
|
destroyModelResourcesExcept: D,
|
|
1344
1355
|
dispose: me,
|
|
@@ -1353,7 +1364,7 @@ function vr(a) {
|
|
|
1353
1364
|
};
|
|
1354
1365
|
}
|
|
1355
1366
|
let Tt = null, Ht = null;
|
|
1356
|
-
function
|
|
1367
|
+
function Rr(a) {
|
|
1357
1368
|
const l = globalThis.mars3d;
|
|
1358
1369
|
return [
|
|
1359
1370
|
a == null ? void 0 : a.default,
|
|
@@ -1361,32 +1372,32 @@ function br(a) {
|
|
|
1361
1372
|
l
|
|
1362
1373
|
].find((y) => !y || typeof y != "object" ? !1 : "BaseClass" in y && "Map" in y) ?? null;
|
|
1363
1374
|
}
|
|
1364
|
-
async function
|
|
1375
|
+
async function Dr() {
|
|
1365
1376
|
return Tt || (Ht || (Ht = (async () => {
|
|
1366
1377
|
await Promise.all([
|
|
1367
|
-
|
|
1378
|
+
An(),
|
|
1368
1379
|
import("@turf/turf"),
|
|
1369
1380
|
Promise.resolve({ })
|
|
1370
1381
|
]);
|
|
1371
|
-
const a = await import("mars3d"), l =
|
|
1382
|
+
const a = await import("mars3d"), l = Rr(a);
|
|
1372
1383
|
if (!l) {
|
|
1373
|
-
const
|
|
1374
|
-
throw new Error(`mars3d module loaded but BaseClass is missing. Module keys: ${
|
|
1384
|
+
const p = a && typeof a == "object" ? Object.keys(a).join(", ") : typeof a;
|
|
1385
|
+
throw new Error(`mars3d module loaded but BaseClass is missing. Module keys: ${p}`);
|
|
1375
1386
|
}
|
|
1376
1387
|
return Tt = l, globalThis.mars3d = l, Tt;
|
|
1377
1388
|
})()), Ht);
|
|
1378
1389
|
}
|
|
1379
|
-
async function
|
|
1380
|
-
const a = await
|
|
1390
|
+
async function Nr() {
|
|
1391
|
+
const a = await Dr();
|
|
1381
1392
|
return { mars3d: a, Cesium: a.Cesium };
|
|
1382
1393
|
}
|
|
1383
|
-
const
|
|
1394
|
+
const Ir = {
|
|
1384
1395
|
class: "real-model-clarity__panel",
|
|
1385
1396
|
role: "dialog",
|
|
1386
1397
|
"aria-modal": "true",
|
|
1387
1398
|
"aria-labelledby": "real-model-clarity-title",
|
|
1388
1399
|
tabindex: "-1"
|
|
1389
|
-
},
|
|
1400
|
+
}, Pr = { class: "real-model-clarity__body" }, Ar = { class: "real-model-clarity__hero" }, Or = { class: "real-model-clarity__status" }, kr = { class: "real-model-clarity__status-card" }, Br = { class: "real-model-clarity__status-card is-loading-status" }, $r = { class: "real-model-clarity__control" }, Fr = { class: "real-model-clarity__control-head" }, Ur = { class: "real-model-clarity__range-wrap" }, Gr = ["value", "min", "max"], Vr = { class: "real-model-clarity__marks" }, Hr = { class: "real-model-clarity__input" }, Wr = ["value", "min", "max"], zr = { class: "real-model-clarity__notice" }, qr = /* @__PURE__ */ zt({
|
|
1390
1401
|
__name: "RealModelClarityDialog",
|
|
1391
1402
|
props: {
|
|
1392
1403
|
modelValue: { type: Boolean },
|
|
@@ -1400,26 +1411,26 @@ const wr = {
|
|
|
1400
1411
|
},
|
|
1401
1412
|
emits: ["update:modelValue", "apply", "reset"],
|
|
1402
1413
|
setup(a, { emit: l }) {
|
|
1403
|
-
const
|
|
1414
|
+
const p = a, y = l, N = fe(p.currentSse), z = O(() => $(N.value)), A = O(() => re(z.value)), P = O(() => re($(p.currentSse))), F = O(() => $(p.recommended)), q = O(() => re(F.value)), Q = O(() => le(p.tilesLoading)), ye = O(() => ie(p.tilesLoading)), he = O(() => se(ye.value, z.value, F.value)), D = O(() => [
|
|
1404
1415
|
{ label: "极清 1", value: 1, tone: "is-high" },
|
|
1405
1416
|
{ label: "高清 6", value: 6, tone: "is-recommended" },
|
|
1406
1417
|
{ label: "均衡 12", value: 12, tone: "is-balanced" },
|
|
1407
1418
|
{ label: "流畅 18", value: 18, tone: "is-fast" }
|
|
1408
1419
|
]);
|
|
1409
1420
|
vt(
|
|
1410
|
-
() =>
|
|
1421
|
+
() => p.modelValue,
|
|
1411
1422
|
(f) => {
|
|
1412
|
-
f && (
|
|
1423
|
+
f && (N.value = $(p.currentSse));
|
|
1413
1424
|
}
|
|
1414
1425
|
), vt(
|
|
1415
|
-
() =>
|
|
1426
|
+
() => p.currentSse,
|
|
1416
1427
|
(f) => {
|
|
1417
|
-
|
|
1428
|
+
p.modelValue || (N.value = $(f));
|
|
1418
1429
|
}
|
|
1419
1430
|
);
|
|
1420
|
-
function
|
|
1431
|
+
function $(f) {
|
|
1421
1432
|
const L = Number(f);
|
|
1422
|
-
return Number.isFinite(L) ? Math.min(
|
|
1433
|
+
return Number.isFinite(L) ? Math.min(p.max, Math.max(p.min, Math.round(L))) : p.recommended;
|
|
1423
1434
|
}
|
|
1424
1435
|
function re(f) {
|
|
1425
1436
|
return f <= 4 ? {
|
|
@@ -1475,42 +1486,42 @@ const wr = {
|
|
|
1475
1486
|
};
|
|
1476
1487
|
}
|
|
1477
1488
|
function me(f) {
|
|
1478
|
-
return (f -
|
|
1489
|
+
return (f - p.min) / (p.max - p.min) * 100;
|
|
1479
1490
|
}
|
|
1480
|
-
function
|
|
1491
|
+
function m(f) {
|
|
1481
1492
|
const L = me(f);
|
|
1482
1493
|
return { left: `${Math.min(100, Math.max(0, L))}%` };
|
|
1483
1494
|
}
|
|
1484
1495
|
function b(f) {
|
|
1485
|
-
|
|
1496
|
+
N.value = $(Number(f));
|
|
1486
1497
|
}
|
|
1487
|
-
function
|
|
1498
|
+
function E(f) {
|
|
1488
1499
|
b(f.target.value);
|
|
1489
1500
|
}
|
|
1490
1501
|
function T(f) {
|
|
1491
|
-
const L = f.target, H =
|
|
1492
|
-
L.value = String(H),
|
|
1502
|
+
const L = f.target, H = $(Number(L.value));
|
|
1503
|
+
L.value = String(H), N.value = H;
|
|
1493
1504
|
}
|
|
1494
|
-
function
|
|
1495
|
-
|
|
1505
|
+
function _() {
|
|
1506
|
+
N.value = z.value;
|
|
1496
1507
|
}
|
|
1497
|
-
function
|
|
1508
|
+
function I() {
|
|
1498
1509
|
y("apply", z.value), y("update:modelValue", !1);
|
|
1499
1510
|
}
|
|
1500
1511
|
function g() {
|
|
1501
1512
|
y("update:modelValue", !1);
|
|
1502
1513
|
}
|
|
1503
|
-
function
|
|
1504
|
-
|
|
1514
|
+
function G() {
|
|
1515
|
+
N.value = F.value, y("reset");
|
|
1505
1516
|
}
|
|
1506
|
-
return (f, L) => (Z(),
|
|
1517
|
+
return (f, L) => (Z(), rn(En, { to: "body" }, [
|
|
1507
1518
|
a.modelValue ? (Z(), oe("div", {
|
|
1508
1519
|
key: 0,
|
|
1509
1520
|
class: "real-model-clarity",
|
|
1510
|
-
onClick:
|
|
1511
|
-
onKeydown:
|
|
1521
|
+
onClick: an(g, ["self"]),
|
|
1522
|
+
onKeydown: _n(g, ["esc"])
|
|
1512
1523
|
}, [
|
|
1513
|
-
v("section",
|
|
1524
|
+
v("section", Ir, [
|
|
1514
1525
|
v("header", { class: "real-model-clarity__header" }, [
|
|
1515
1526
|
L[0] || (L[0] = v("h2", { id: "real-model-clarity-title" }, "模型清晰度设置", -1)),
|
|
1516
1527
|
v("button", {
|
|
@@ -1520,36 +1531,36 @@ const wr = {
|
|
|
1520
1531
|
onClick: g
|
|
1521
1532
|
})
|
|
1522
1533
|
]),
|
|
1523
|
-
v("section",
|
|
1524
|
-
v("header",
|
|
1534
|
+
v("section", Pr, [
|
|
1535
|
+
v("header", Ar, [
|
|
1525
1536
|
v("div", null, [
|
|
1526
1537
|
L[1] || (L[1] = v("span", null, "当前模型", -1)),
|
|
1527
1538
|
v("strong", null, W(a.modelName || "当前模型"), 1)
|
|
1528
1539
|
]),
|
|
1529
1540
|
v("div", {
|
|
1530
|
-
class:
|
|
1531
|
-
}, " 推荐 " + W(q.value.name) + " / SSE " + W(
|
|
1541
|
+
class: $e(["real-model-clarity__recommend", q.value.tone])
|
|
1542
|
+
}, " 推荐 " + W(q.value.name) + " / SSE " + W(F.value), 3)
|
|
1532
1543
|
]),
|
|
1533
|
-
v("div",
|
|
1534
|
-
v("div",
|
|
1544
|
+
v("div", Or, [
|
|
1545
|
+
v("div", kr, [
|
|
1535
1546
|
L[2] || (L[2] = v("span", null, "当前清晰度", -1)),
|
|
1536
1547
|
v("strong", {
|
|
1537
|
-
class:
|
|
1548
|
+
class: $e(P.value.tone)
|
|
1538
1549
|
}, W(P.value.name) + " / SSE " + W(a.currentSse), 3)
|
|
1539
1550
|
]),
|
|
1540
|
-
v("div",
|
|
1551
|
+
v("div", Br, [
|
|
1541
1552
|
L[3] || (L[3] = v("span", null, "加载状态", -1)),
|
|
1542
1553
|
v("strong", null, W(Q.value), 1)
|
|
1543
1554
|
])
|
|
1544
1555
|
]),
|
|
1545
|
-
v("section",
|
|
1546
|
-
v("div",
|
|
1556
|
+
v("section", $r, [
|
|
1557
|
+
v("div", Fr, [
|
|
1547
1558
|
L[4] || (L[4] = v("span", null, "设置清晰度", -1)),
|
|
1548
1559
|
v("strong", {
|
|
1549
|
-
class:
|
|
1550
|
-
}, W(
|
|
1560
|
+
class: $e(A.value.tone)
|
|
1561
|
+
}, W(A.value.name) + " / SSE " + W(z.value), 3)
|
|
1551
1562
|
]),
|
|
1552
|
-
v("div",
|
|
1563
|
+
v("div", Ur, [
|
|
1553
1564
|
v("input", {
|
|
1554
1565
|
class: "real-model-clarity__range",
|
|
1555
1566
|
type: "range",
|
|
@@ -1557,17 +1568,17 @@ const wr = {
|
|
|
1557
1568
|
min: a.min,
|
|
1558
1569
|
max: a.max,
|
|
1559
1570
|
step: "1",
|
|
1560
|
-
onInput:
|
|
1561
|
-
}, null, 40,
|
|
1562
|
-
v("div",
|
|
1563
|
-
(Z(!0), oe(
|
|
1571
|
+
onInput: E
|
|
1572
|
+
}, null, 40, Gr),
|
|
1573
|
+
v("div", Vr, [
|
|
1574
|
+
(Z(!0), oe(on, null, ln(D.value, (H) => (Z(), oe("span", {
|
|
1564
1575
|
key: H.value,
|
|
1565
|
-
class:
|
|
1566
|
-
style:
|
|
1576
|
+
class: $e(H.tone),
|
|
1577
|
+
style: Tn(m(H.value))
|
|
1567
1578
|
}, W(H.label), 7))), 128))
|
|
1568
1579
|
])
|
|
1569
1580
|
]),
|
|
1570
|
-
v("label",
|
|
1581
|
+
v("label", Hr, [
|
|
1571
1582
|
L[5] || (L[5] = v("span", null, "SSE", -1)),
|
|
1572
1583
|
v("input", {
|
|
1573
1584
|
value: z.value,
|
|
@@ -1577,24 +1588,24 @@ const wr = {
|
|
|
1577
1588
|
step: "1",
|
|
1578
1589
|
inputmode: "numeric",
|
|
1579
1590
|
onInput: T,
|
|
1580
|
-
onBlur:
|
|
1581
|
-
}, null, 40,
|
|
1591
|
+
onBlur: _
|
|
1592
|
+
}, null, 40, Wr),
|
|
1582
1593
|
v("small", null, "范围 " + W(a.min) + " - " + W(a.max) + ",数值越小越清晰", 1)
|
|
1583
1594
|
])
|
|
1584
1595
|
]),
|
|
1585
|
-
v("section",
|
|
1596
|
+
v("section", zr, [
|
|
1586
1597
|
v("strong", {
|
|
1587
|
-
class:
|
|
1598
|
+
class: $e(he.value.tone)
|
|
1588
1599
|
}, W(he.value.title), 3),
|
|
1589
1600
|
v("span", null, W(he.value.description), 1),
|
|
1590
|
-
v("small", null, W(
|
|
1601
|
+
v("small", null, W(A.value.description), 1)
|
|
1591
1602
|
])
|
|
1592
1603
|
]),
|
|
1593
1604
|
v("footer", { class: "real-model-clarity__footer" }, [
|
|
1594
1605
|
v("button", {
|
|
1595
1606
|
class: "real-model-clarity__secondary",
|
|
1596
1607
|
type: "button",
|
|
1597
|
-
onClick:
|
|
1608
|
+
onClick: G
|
|
1598
1609
|
}, "恢复推荐"),
|
|
1599
1610
|
v("div", { class: "real-model-clarity__actions" }, [
|
|
1600
1611
|
v("button", {
|
|
@@ -1605,7 +1616,7 @@ const wr = {
|
|
|
1605
1616
|
v("button", {
|
|
1606
1617
|
class: "real-model-clarity__primary",
|
|
1607
1618
|
type: "button",
|
|
1608
|
-
onClick:
|
|
1619
|
+
onClick: I
|
|
1609
1620
|
}, "应用")
|
|
1610
1621
|
])
|
|
1611
1622
|
])
|
|
@@ -1613,35 +1624,35 @@ const wr = {
|
|
|
1613
1624
|
], 32)) : Te("", !0)
|
|
1614
1625
|
]));
|
|
1615
1626
|
}
|
|
1616
|
-
}),
|
|
1617
|
-
const
|
|
1618
|
-
for (const [y,
|
|
1619
|
-
|
|
1620
|
-
return
|
|
1621
|
-
},
|
|
1627
|
+
}), cn = (a, l) => {
|
|
1628
|
+
const p = a.__vccOpts || a;
|
|
1629
|
+
for (const [y, N] of l)
|
|
1630
|
+
p[y] = N;
|
|
1631
|
+
return p;
|
|
1632
|
+
}, Kr = /* @__PURE__ */ cn(qr, [["__scopeId", "data-v-6094e99f"]]), jr = { class: "three-dimensional-map" }, Yr = ["id"], Qr = { key: 0 }, Xr = { class: "three-dimensional-map__current-actions" }, Jr = ["data-tooltip"], Zr = ["disabled"], ea = {
|
|
1622
1633
|
key: 2,
|
|
1623
1634
|
class: "three-dimensional-map__clarity-nudge"
|
|
1624
|
-
},
|
|
1635
|
+
}, ta = {
|
|
1625
1636
|
key: 3,
|
|
1626
1637
|
class: "three-dimensional-map__model-tip"
|
|
1627
|
-
},
|
|
1638
|
+
}, na = {
|
|
1628
1639
|
key: 4,
|
|
1629
1640
|
class: "three-dimensional-map__model-tip is-pressure"
|
|
1630
|
-
},
|
|
1641
|
+
}, ra = {
|
|
1631
1642
|
key: 5,
|
|
1632
1643
|
class: "three-dimensional-map__debug-panel"
|
|
1633
|
-
},
|
|
1644
|
+
}, aa = {
|
|
1634
1645
|
key: 0,
|
|
1635
1646
|
class: "three-dimensional-map__status-error"
|
|
1636
|
-
},
|
|
1647
|
+
}, oa = {
|
|
1637
1648
|
key: 1,
|
|
1638
1649
|
class: "three-dimensional-map__loader",
|
|
1639
1650
|
role: "status",
|
|
1640
1651
|
"aria-live": "polite"
|
|
1641
|
-
},
|
|
1652
|
+
}, la = 6, sa = /* @__PURE__ */ zt({
|
|
1642
1653
|
__name: "ThreeDimensionalMap",
|
|
1643
1654
|
props: {
|
|
1644
|
-
configUrl: { default:
|
|
1655
|
+
configUrl: { default: zn },
|
|
1645
1656
|
mapKey: { default: "common-3d" },
|
|
1646
1657
|
options: { default: () => ({}) },
|
|
1647
1658
|
initialView: { type: [Object, Boolean], default: () => et },
|
|
@@ -1658,13 +1669,13 @@ const wr = {
|
|
|
1658
1669
|
onBack: {}
|
|
1659
1670
|
},
|
|
1660
1671
|
setup(a) {
|
|
1661
|
-
const l = a,
|
|
1672
|
+
const l = a, p = vn(sn, null), y = O(() => `mars3d-container-${l.mapKey}`), N = fe(!0), z = fe(""), A = fe({}), P = O(() => A.value.realModel ?? {}), F = O(() => !!P.value.showPanel), q = O(() => {
|
|
1662
1673
|
const o = f.cameraDebugInfo.value.modelModeText;
|
|
1663
1674
|
return o != null && o.startsWith("模型总览模式") ? o : "";
|
|
1664
|
-
}), Q =
|
|
1675
|
+
}), Q = O(() => {
|
|
1665
1676
|
const o = f.cameraDebugInfo.value.pressureText;
|
|
1666
1677
|
return !o || o === "-" || o.includes("保护中") ? "" : "当前加载压力偏高,系统会临时偏向流畅,稳定后再恢复细节。";
|
|
1667
|
-
}), ye =
|
|
1678
|
+
}), ye = O(() => "加载压力保护"), he = O(() => {
|
|
1668
1679
|
const o = f.cameraDebugInfo.value, c = [
|
|
1669
1680
|
{ label: "相机高度", value: o.heightText },
|
|
1670
1681
|
{ label: "经度", value: o.lngText },
|
|
@@ -1678,54 +1689,54 @@ const wr = {
|
|
|
1678
1689
|
{ label: "模型加载", value: o.tilesLoadingText }
|
|
1679
1690
|
), c;
|
|
1680
1691
|
});
|
|
1681
|
-
let D = null,
|
|
1692
|
+
let D = null, $ = null, re = null;
|
|
1682
1693
|
const le = fe([]), ie = fe([]), se = /* @__PURE__ */ new Map();
|
|
1683
|
-
let me = null,
|
|
1694
|
+
let me = null, m = 0, b = null, E = 0, T = null, _ = !1, I = !1;
|
|
1684
1695
|
function g() {
|
|
1685
|
-
return
|
|
1696
|
+
return I || _;
|
|
1686
1697
|
}
|
|
1687
|
-
const
|
|
1698
|
+
const G = xr({
|
|
1688
1699
|
getMap: () => D,
|
|
1689
|
-
getMars3d: () =>
|
|
1700
|
+
getMars3d: () => $,
|
|
1690
1701
|
getCurrentModelScreenSpaceError: () => f.getCurrentModelScreenSpaceError(),
|
|
1691
1702
|
applyTilesetScreenSpaceError: (o, c) => f.applyTilesetScreenSpaceError(o, c),
|
|
1692
1703
|
getModelLngLat: (o) => f.getRealModelLngLat(o),
|
|
1693
1704
|
resolveTilesetUrl: l.resolveTilesetUrl
|
|
1694
|
-
}), f =
|
|
1705
|
+
}), f = Lr({
|
|
1695
1706
|
getMap: () => D,
|
|
1696
|
-
getMars3d: () =>
|
|
1707
|
+
getMars3d: () => $,
|
|
1697
1708
|
getCesium: () => re,
|
|
1698
1709
|
getTreeData: () => ie.value,
|
|
1699
1710
|
getManualModelIds: () => le.value,
|
|
1700
|
-
getLastPointerLngLat: () => g() && Date.now() -
|
|
1701
|
-
getLastPointerWindowPosition: () => g() && Date.now() -
|
|
1711
|
+
getLastPointerLngLat: () => g() && Date.now() - m <= 1200 ? me : null,
|
|
1712
|
+
getLastPointerWindowPosition: () => g() && Date.now() - E <= 1200 ? b : null,
|
|
1702
1713
|
shouldShowDebugDetails: () => !!P.value.showLabelIds,
|
|
1703
|
-
destroyModelResourcesExcept: (o) =>
|
|
1704
|
-
ensureMaterialModelLayer: (o) =>
|
|
1714
|
+
destroyModelResourcesExcept: (o) => G.destroyModelResourcesExcept(o),
|
|
1715
|
+
ensureMaterialModelLayer: (o) => G.ensureLayer(o).then((c) => (f.updateRealModelLayer(), f.updateRealModelDebugText(), c)),
|
|
1705
1716
|
locateMaterialModel: (o) => {
|
|
1706
1717
|
ke(o == null ? void 0 : o.id) || Xe({ ...o, modelType: (o == null ? void 0 : o.modelType) ?? "2" });
|
|
1707
1718
|
},
|
|
1708
1719
|
showMaterialModel: (o, c = !0) => {
|
|
1709
|
-
le.value = le.value.filter((te) => f.isSameModelId(te, o)), c && !le.value.some((te) => f.isSameModelId(te, o)) && le.value.push(o),
|
|
1710
|
-
const
|
|
1711
|
-
|
|
1720
|
+
le.value = le.value.filter((te) => f.isSameModelId(te, o)), c && !le.value.some((te) => f.isSameModelId(te, o)) && le.value.push(o), G.destroyModelResourcesExcept([o]);
|
|
1721
|
+
const B = se.get(String(o)) || f.getThreeDimensionalModelItems().find((te) => f.isSameModelId(te.id, o));
|
|
1722
|
+
B && G.showModel(B);
|
|
1712
1723
|
},
|
|
1713
1724
|
hideMaterialModel: (o, c = !0) => {
|
|
1714
|
-
c && (le.value = le.value.filter((R) => !f.isSameModelId(R, o))),
|
|
1725
|
+
c && (le.value = le.value.filter((R) => !f.isSameModelId(R, o))), G.hideModel(o);
|
|
1715
1726
|
},
|
|
1716
1727
|
destroyMaterialModel: (o, c = !0) => {
|
|
1717
|
-
c && (le.value = le.value.filter((R) => !f.isSameModelId(R, o))),
|
|
1728
|
+
c && (le.value = le.value.filter((R) => !f.isSameModelId(R, o))), G.destroyModel(o);
|
|
1718
1729
|
},
|
|
1719
1730
|
isPoliceModelLeaf: () => !1
|
|
1720
|
-
}), L =
|
|
1721
|
-
let
|
|
1731
|
+
}), L = O(() => f.currentModelName.value), H = O(() => f.currentModelId.value), K = fe(!1), ue = fe(null), Se = fe(""), Me = fe(!1), ce = fe(0), De = O(() => ue.value != null), nt = O(() => !!L.value || K.value || De.value), rt = O(() => nt.value && l.initialView !== !1), Ne = O(() => K.value ? "正在返回" : (De.value, "正在查看")), bt = O(() => K.value ? "回到模型总览" : De.value ? Se.value || L.value || "模型加载中" : L.value), at = O(() => K.value ? "正在回到模型总览" : De.value ? "模型加载中..." : ""), ot = O(() => !!L.value && !K.value && !De.value), ee = O(() => (ce.value, H.value, f.cameraDebugInfo.value.clarityText, f.cameraDebugInfo.value.sseText, f.getCurrentPrimaryModelScreenSpaceError())), lt = O(() => (ce.value, H.value, f.cameraDebugInfo.value.clarityText, f.cameraDebugInfo.value.sseText, f.getCurrentPrimaryModelRecommendedScreenSpaceError())), Ct = O(() => f.cameraDebugInfo.value.actualSseText), Ke = O(() => f.cameraDebugInfo.value.tilesLoadingText), ve = fe("");
|
|
1732
|
+
let Fe = null, be = null, Ce = 0;
|
|
1722
1733
|
function j(o) {
|
|
1723
1734
|
return o <= 4 ? "is-high" : o <= 8 ? "is-recommended" : o <= 16 ? "is-balanced" : "is-fast";
|
|
1724
1735
|
}
|
|
1725
1736
|
function x(o) {
|
|
1726
1737
|
return o <= 4 ? `极清 / SSE ${o}` : o <= 8 ? `高清 / SSE ${o}` : o <= 16 ? `均衡 / SSE ${o}` : `流畅 / SSE ${o}`;
|
|
1727
1738
|
}
|
|
1728
|
-
const st =
|
|
1739
|
+
const st = O(() => x(ee.value)), He = O(() => j(ee.value)), je = O(() => {
|
|
1729
1740
|
const c = (Ke.value || "").match(/后台处理\s*(\d+)/);
|
|
1730
1741
|
return c ? Number(c[1]) : 0;
|
|
1731
1742
|
});
|
|
@@ -1735,10 +1746,10 @@ const wr = {
|
|
|
1735
1746
|
function Ye(o, c) {
|
|
1736
1747
|
return o >= 96 ? "当前模型数据量较大,推荐清晰度也可能加载慢;可临时调到均衡或流畅,画面稳定后再调高清晰度。" : o >= 48 ? "当前模型加载较慢,可先调到均衡提升加载速度;需要近景细节时再调回高清。" : c > 8 ? "当前偏流畅,近景不够清晰时可调到高清或极清。" : "系统已设置默认清晰度;不同模型大小不同,可按加载速度和近景效果微调。";
|
|
1737
1748
|
}
|
|
1738
|
-
const Lt =
|
|
1749
|
+
const Lt = O(() => [
|
|
1739
1750
|
He.value,
|
|
1740
1751
|
je.value >= 48 ? "is-loading" : ""
|
|
1741
|
-
].filter(Boolean)), Qe =
|
|
1752
|
+
].filter(Boolean)), Qe = O(() => Ye(je.value, ee.value)), Ue = O(() => ve.value ? ve.value : "");
|
|
1742
1753
|
function wt() {
|
|
1743
1754
|
if (l.onBack) {
|
|
1744
1755
|
l.onBack();
|
|
@@ -1750,7 +1761,7 @@ const wr = {
|
|
|
1750
1761
|
}
|
|
1751
1762
|
window.location.href = l.backFallbackUrl;
|
|
1752
1763
|
}
|
|
1753
|
-
function
|
|
1764
|
+
function Ie() {
|
|
1754
1765
|
const o = pt();
|
|
1755
1766
|
if (!o) return;
|
|
1756
1767
|
const c = o.radius ?? o.alt ?? et.radius ?? 3200;
|
|
@@ -1763,10 +1774,10 @@ const wr = {
|
|
|
1763
1774
|
f.updateRealModelLayer(), f.updateRealModelDebugText(), K.value = !1;
|
|
1764
1775
|
}, 900);
|
|
1765
1776
|
}
|
|
1766
|
-
function
|
|
1777
|
+
function Pe() {
|
|
1767
1778
|
const o = Date.now();
|
|
1768
1779
|
if (!(o - Ce < 250)) {
|
|
1769
|
-
Ce = o,
|
|
1780
|
+
Ce = o, Ee(), ce.value += 1, Me.value = !0;
|
|
1770
1781
|
try {
|
|
1771
1782
|
f.updateActualTilesetDebugInfo(), f.updateRealModelDebugText(), ce.value += 1;
|
|
1772
1783
|
} catch (c) {
|
|
@@ -1775,18 +1786,18 @@ const wr = {
|
|
|
1775
1786
|
}
|
|
1776
1787
|
}
|
|
1777
1788
|
function We(o) {
|
|
1778
|
-
|
|
1789
|
+
Ee(), f.setCurrentModelClarity(o), ce.value += 1;
|
|
1779
1790
|
}
|
|
1780
1791
|
function xt() {
|
|
1781
|
-
|
|
1792
|
+
Ee(), f.resetCurrentModelClarity(), ce.value += 1;
|
|
1782
1793
|
}
|
|
1783
1794
|
function Rt() {
|
|
1784
|
-
|
|
1785
|
-
ve.value = "",
|
|
1795
|
+
Ee(), ve.value = `已为当前模型设置默认清晰度:${st.value}。模型较大时推荐档也可能加载慢,可点“清晰度”按效果调整。`, Fe = window.setTimeout(() => {
|
|
1796
|
+
ve.value = "", Fe = null;
|
|
1786
1797
|
}, 5200);
|
|
1787
1798
|
}
|
|
1788
|
-
function
|
|
1789
|
-
be && (window.clearTimeout(be), be = null),
|
|
1799
|
+
function Ee() {
|
|
1800
|
+
be && (window.clearTimeout(be), be = null), Fe && (window.clearTimeout(Fe), Fe = null), ve.value = "";
|
|
1790
1801
|
}
|
|
1791
1802
|
vt([H, L], ([o, c], [R]) => {
|
|
1792
1803
|
ce.value += 1, !(!o || !c || K.value || f.isSameModelId(o, R)) && (be && window.clearTimeout(be), be = window.setTimeout(() => {
|
|
@@ -1804,11 +1815,11 @@ const wr = {
|
|
|
1804
1815
|
}
|
|
1805
1816
|
async function ut() {
|
|
1806
1817
|
var o;
|
|
1807
|
-
return l.modelGroups ? l.modelGroups : (o = l.dataSource) != null && o.getModelGroups ? l.dataSource.getModelGroups() :
|
|
1818
|
+
return l.modelGroups ? l.modelGroups : (o = l.dataSource) != null && o.getModelGroups ? l.dataSource.getModelGroups() : p ? p.getThreeDimensionalModels() : [];
|
|
1808
1819
|
}
|
|
1809
1820
|
async function ct(o = []) {
|
|
1810
1821
|
var c;
|
|
1811
|
-
return l.modelItems ? l.modelItems : (c = l.dataSource) != null && c.getModelItems ? Dt(await l.dataSource.getModelItems()) :
|
|
1822
|
+
return l.modelItems ? l.modelItems : (c = l.dataSource) != null && c.getModelItems ? Dt(await l.dataSource.getModelItems()) : p ? (await p.getMaterialModels({ pageSize: 100, pageNo: 1, type: 2 })).list || [] : Nt(o);
|
|
1812
1823
|
}
|
|
1813
1824
|
function dt(o) {
|
|
1814
1825
|
o.forEach((c) => {
|
|
@@ -1816,27 +1827,27 @@ const wr = {
|
|
|
1816
1827
|
});
|
|
1817
1828
|
}
|
|
1818
1829
|
function Le(o, c) {
|
|
1819
|
-
const R = String(c.id ?? ""),
|
|
1820
|
-
return o.find((ae) => !!(R && String(ae.id) === R ||
|
|
1830
|
+
const R = String(c.id ?? ""), B = String(c.file ?? ""), te = String(c.name ?? c.label ?? "");
|
|
1831
|
+
return o.find((ae) => !!(R && String(ae.id) === R || B && String(ae.file) === B || te && String(ae.name ?? ae.label ?? "") === te)) || null;
|
|
1821
1832
|
}
|
|
1822
1833
|
async function ze(o) {
|
|
1823
1834
|
let c = se.get(String(o.id));
|
|
1824
1835
|
if (!c && o.file && (c = o), !c) {
|
|
1825
|
-
const
|
|
1826
|
-
dt(
|
|
1827
|
-
|
|
1836
|
+
const B = await ct();
|
|
1837
|
+
dt(B), f.setRealModelMaterialItems(
|
|
1838
|
+
B,
|
|
1828
1839
|
f.collectThreeDimensionalModelNodes(ie.value)
|
|
1829
|
-
), c = se.get(String(o.id)) || Le(
|
|
1840
|
+
), c = se.get(String(o.id)) || Le(B, o) || void 0;
|
|
1830
1841
|
}
|
|
1831
1842
|
if (c && o.id != null && String(c.id) !== String(o.id) && (c = { ...c, id: o.id }, se.set(String(o.id), c)), !c) {
|
|
1832
|
-
const
|
|
1833
|
-
return
|
|
1843
|
+
const B = G.getLayerById(o.id);
|
|
1844
|
+
return B ? { item: o, layer: B } : null;
|
|
1834
1845
|
}
|
|
1835
|
-
const R = await
|
|
1846
|
+
const R = await G.ensureLayer(c);
|
|
1836
1847
|
return R ? { item: c, layer: R } : null;
|
|
1837
1848
|
}
|
|
1838
1849
|
async function Xe(o) {
|
|
1839
|
-
var
|
|
1850
|
+
var B, te, ae;
|
|
1840
1851
|
const c = (o == null ? void 0 : o.id) ?? null;
|
|
1841
1852
|
if (ke(c)) return;
|
|
1842
1853
|
const R = String((o == null ? void 0 : o.name) || (o == null ? void 0 : o.label) || (o == null ? void 0 : o.title) || (o == null ? void 0 : o.fileName) || "模型");
|
|
@@ -1844,48 +1855,48 @@ const wr = {
|
|
|
1844
1855
|
try {
|
|
1845
1856
|
const we = await ze(o);
|
|
1846
1857
|
if (!we) return;
|
|
1847
|
-
const { item: xe, layer:
|
|
1858
|
+
const { item: xe, layer: _e } = we;
|
|
1848
1859
|
if (ke(xe.id)) return;
|
|
1849
1860
|
ue.value = xe.id, Se.value = String(xe.name || xe.label || xe.title || xe.fileName || R);
|
|
1850
1861
|
const Be = f.getRealModelLngLat(xe);
|
|
1851
|
-
Be && (me = Be,
|
|
1862
|
+
Be && (me = Be, m = Date.now());
|
|
1852
1863
|
const Bt = xe.id;
|
|
1853
|
-
f.handleLocationModel(Bt),
|
|
1864
|
+
f.handleLocationModel(Bt), _e.show = !0, (te = (B = D == null ? void 0 : D.scene) == null ? void 0 : B.requestRender) == null || te.call(B), f.updateRealModelLayer(), G.applyLocationFastTilesetOptions(_e), G.scheduleRestoreLocationTilesetOptions(_e), Be && $ ? D == null || D.flyToPoint(new $.LngLatPoint(Be.lng, Be.lat), { radius: 700, pitch: -15, duration: 1.6 }) : (await G.waitForTilesetLayerReady(_e, 600), (ae = _e.flyTo) == null || ae.call(_e, { radius: 700, pitch: -15 })), f.updateActualTilesetDebugInfo(), f.updateRealModelDebugText();
|
|
1854
1865
|
} finally {
|
|
1855
1866
|
ue.value = null, Se.value = "";
|
|
1856
1867
|
}
|
|
1857
1868
|
}
|
|
1858
1869
|
function ft(o) {
|
|
1859
|
-
var
|
|
1870
|
+
var B, te, ae, we;
|
|
1860
1871
|
if (!D || !re || !(o != null && o.windowPosition)) return !1;
|
|
1861
|
-
b = { x: o.windowPosition.x, y: o.windowPosition.y },
|
|
1862
|
-
const c = ((te = (
|
|
1872
|
+
b = { x: o.windowPosition.x, y: o.windowPosition.y }, E = Date.now();
|
|
1873
|
+
const c = ((te = (B = D.scene) == null ? void 0 : B.pickPosition) == null ? void 0 : te.call(B, o.windowPosition)) || ((we = (ae = D.camera) == null ? void 0 : ae.pickEllipsoid) == null ? void 0 : we.call(ae, o.windowPosition, D.scene.globe.ellipsoid));
|
|
1863
1874
|
if (!c) return !1;
|
|
1864
1875
|
const R = re.Cartographic.fromCartesian(c);
|
|
1865
1876
|
return me = {
|
|
1866
1877
|
lng: re.Math.toDegrees(R.longitude),
|
|
1867
1878
|
lat: re.Math.toDegrees(R.latitude)
|
|
1868
|
-
},
|
|
1879
|
+
}, m = Date.now(), !0;
|
|
1869
1880
|
}
|
|
1870
|
-
function
|
|
1871
|
-
me = null,
|
|
1881
|
+
function It() {
|
|
1882
|
+
me = null, m = 0, b = null, E = 0, T = null, _ = !1, I = !1;
|
|
1872
1883
|
}
|
|
1873
1884
|
function gt(o) {
|
|
1874
|
-
var
|
|
1875
|
-
const c = Number(((
|
|
1885
|
+
var B, te, ae, we;
|
|
1886
|
+
const c = Number(((B = o == null ? void 0 : o.windowPosition) == null ? void 0 : B.x) ?? ((te = o == null ? void 0 : o.startPosition) == null ? void 0 : te.x)), R = Number(((ae = o == null ? void 0 : o.windowPosition) == null ? void 0 : ae.y) ?? ((we = o == null ? void 0 : o.startPosition) == null ? void 0 : we.y));
|
|
1876
1887
|
return !Number.isFinite(c) || !Number.isFinite(R) ? null : { x: c, y: R };
|
|
1877
1888
|
}
|
|
1878
|
-
function
|
|
1889
|
+
function Pt(o) {
|
|
1879
1890
|
if (!T) return;
|
|
1880
1891
|
const c = gt(o);
|
|
1881
1892
|
if (!c) return;
|
|
1882
1893
|
Math.hypot(
|
|
1883
1894
|
c.x - T.x,
|
|
1884
1895
|
c.y - T.y
|
|
1885
|
-
) >=
|
|
1896
|
+
) >= la && (_ = !0);
|
|
1886
1897
|
}
|
|
1887
1898
|
function mt() {
|
|
1888
|
-
T = null,
|
|
1899
|
+
T = null, _ = !1, I = !1;
|
|
1889
1900
|
}
|
|
1890
1901
|
function Mt() {
|
|
1891
1902
|
const o = D == null ? void 0 : D.scene;
|
|
@@ -1897,27 +1908,27 @@ const wr = {
|
|
|
1897
1908
|
return !c || c.includes("fragment shader") || c.includes("vertex shader") || c.includes("shader failed to compile") ? !1 : c.includes("out of memory") || c.includes("context lost") || c.includes("webgl context") || c.includes("too many active webgl contexts");
|
|
1898
1909
|
}
|
|
1899
1910
|
function Ot() {
|
|
1900
|
-
!D ||
|
|
1901
|
-
T = gt(o),
|
|
1902
|
-
}), D.on(
|
|
1911
|
+
!D || !$ || (D.on($.EventType.leftDown, (o) => {
|
|
1912
|
+
T = gt(o), _ = !1;
|
|
1913
|
+
}), D.on($.EventType.cameraMoveEnd, () => {
|
|
1903
1914
|
mt(), f.updateCameraDebugInfo(!0), f.updateRealModelLayer();
|
|
1904
|
-
}), D.on(
|
|
1915
|
+
}), D.on($.EventType.leftUp || "leftUp", () => {
|
|
1905
1916
|
mt();
|
|
1906
|
-
}), D.on(
|
|
1907
|
-
|
|
1908
|
-
}), D.on(
|
|
1909
|
-
|
|
1910
|
-
}), D.on(
|
|
1911
|
-
var R,
|
|
1917
|
+
}), D.on($.EventType.click, (o) => {
|
|
1918
|
+
I = !0, ft(o) && f.updateRealModelLayer(), I = !1;
|
|
1919
|
+
}), D.on($.EventType.mouseMove, (o) => {
|
|
1920
|
+
Pt(o), ft(o) && _ && f.updateCameraDebugInfo();
|
|
1921
|
+
}), D.on($.EventType.renderError, (o) => {
|
|
1922
|
+
var R, B;
|
|
1912
1923
|
const c = f.collectRenderErrorDebugInfo(o);
|
|
1913
|
-
console.error("[ThreeDimensionalMap] renderError:", c, o), Mt(), At(o) && f.releaseAutoVisibleModels(), (
|
|
1924
|
+
console.error("[ThreeDimensionalMap] renderError:", c, o), Mt(), At(o) && f.releaseAutoVisibleModels(), (B = (R = D == null ? void 0 : D.scene) == null ? void 0 : R.requestRender) == null || B.call(R);
|
|
1914
1925
|
}));
|
|
1915
1926
|
}
|
|
1916
1927
|
function pt() {
|
|
1917
1928
|
return l.initialView === !1 ? null : l.initialView;
|
|
1918
1929
|
}
|
|
1919
1930
|
function ht(o) {
|
|
1920
|
-
!D ||
|
|
1931
|
+
!D || !$ || o.lng === 0 || o.lat === 0 || D.flyToPoint(new $.LngLatPoint(o.lng, o.lat), {
|
|
1921
1932
|
radius: o.radius ?? o.alt ?? et.radius,
|
|
1922
1933
|
pitch: o.pitch ?? et.pitch,
|
|
1923
1934
|
heading: o.heading,
|
|
@@ -1927,46 +1938,46 @@ const wr = {
|
|
|
1927
1938
|
async function St() {
|
|
1928
1939
|
if (!l.showRealModelLabels) return;
|
|
1929
1940
|
const o = await ut(), c = await ct(o), R = o.length ? o : it(c);
|
|
1930
|
-
ie.value =
|
|
1941
|
+
ie.value = Qn(R), dt(c), f.setRealModelMaterialItems(
|
|
1931
1942
|
c,
|
|
1932
1943
|
f.collectThreeDimensionalModelNodes(ie.value)
|
|
1933
|
-
), l.preloadModels && await
|
|
1944
|
+
), l.preloadModels && await G.preloadModels(c), f.setRealModelLabelsVisible(!0), f.updateRealModelLayer(), f.updateRealModelDebugText();
|
|
1934
1945
|
}
|
|
1935
1946
|
async function kt() {
|
|
1936
|
-
|
|
1947
|
+
N.value = !0, z.value = "";
|
|
1937
1948
|
try {
|
|
1938
|
-
const o = await
|
|
1939
|
-
|
|
1940
|
-
const c = pt(), R = await
|
|
1941
|
-
mars3d:
|
|
1949
|
+
const o = await Nr();
|
|
1950
|
+
$ = o.mars3d, re = o.Cesium;
|
|
1951
|
+
const c = pt(), R = await Yn({
|
|
1952
|
+
mars3d: $,
|
|
1942
1953
|
configUrl: l.configUrl,
|
|
1943
|
-
center: c ?
|
|
1954
|
+
center: c ? jn(c) : void 0,
|
|
1944
1955
|
options: l.options
|
|
1945
1956
|
});
|
|
1946
|
-
|
|
1957
|
+
A.value = R.debug ?? {}, D = new $.Map(y.value, {
|
|
1947
1958
|
...R,
|
|
1948
1959
|
minZoom: 5
|
|
1949
|
-
}),
|
|
1960
|
+
}), $n(D) || (D.hasTerrain = !0), D.viewer.sceneModePicker && (D.viewer.sceneModePicker.viewModel.duration = 0), Mt(), Ot(), c && l.flyToInitialView && (await xn(), ht(c)), await St();
|
|
1950
1961
|
} catch (o) {
|
|
1951
1962
|
z.value = o instanceof Error ? o.message : "三维地图初始化失败";
|
|
1952
1963
|
} finally {
|
|
1953
|
-
|
|
1964
|
+
N.value = !1;
|
|
1954
1965
|
}
|
|
1955
1966
|
}
|
|
1956
|
-
return
|
|
1967
|
+
return bn(() => {
|
|
1957
1968
|
kt();
|
|
1958
1969
|
}), vt(
|
|
1959
1970
|
() => [l.modelGroups, l.modelItems, l.dataSource],
|
|
1960
1971
|
() => {
|
|
1961
|
-
!D ||
|
|
1972
|
+
!D || N.value || St();
|
|
1962
1973
|
}
|
|
1963
|
-
),
|
|
1964
|
-
|
|
1965
|
-
}), (o, c) => (Z(), oe("section",
|
|
1974
|
+
), Cn(() => {
|
|
1975
|
+
Ee(), f.reset(), G.dispose(), It(), D && (D.destroy(), D = null), $ = null, re = null;
|
|
1976
|
+
}), (o, c) => (Z(), oe("section", jr, [
|
|
1966
1977
|
v("div", {
|
|
1967
1978
|
id: y.value,
|
|
1968
1979
|
class: "three-dimensional-map__container"
|
|
1969
|
-
}, null, 8,
|
|
1980
|
+
}, null, 8, Yr),
|
|
1970
1981
|
a.showBackButton ? (Z(), oe("button", {
|
|
1971
1982
|
key: 0,
|
|
1972
1983
|
class: "three-dimensional-map__back",
|
|
@@ -1981,36 +1992,36 @@ const wr = {
|
|
|
1981
1992
|
])) : Te("", !0),
|
|
1982
1993
|
nt.value ? (Z(), oe("div", {
|
|
1983
1994
|
key: 1,
|
|
1984
|
-
class:
|
|
1995
|
+
class: $e(["three-dimensional-map__current-model", { "is-busy": K.value || De.value }])
|
|
1985
1996
|
}, [
|
|
1986
1997
|
v("span", null, W(Ne.value), 1),
|
|
1987
1998
|
v("strong", null, W(bt.value), 1),
|
|
1988
|
-
at.value ? (Z(), oe("small",
|
|
1989
|
-
v("div",
|
|
1999
|
+
at.value ? (Z(), oe("small", Qr, W(at.value), 1)) : Te("", !0),
|
|
2000
|
+
v("div", Xr, [
|
|
1990
2001
|
ot.value ? (Z(), oe("button", {
|
|
1991
2002
|
key: 0,
|
|
1992
|
-
class:
|
|
2003
|
+
class: $e(["three-dimensional-map__clarity-action", Lt.value]),
|
|
1993
2004
|
type: "button",
|
|
1994
2005
|
"data-tooltip": Qe.value,
|
|
1995
|
-
onClick:
|
|
2006
|
+
onClick: an(Pe, ["stop"])
|
|
1996
2007
|
}, [
|
|
1997
2008
|
c[2] || (c[2] = v("span", null, "清晰度", -1)),
|
|
1998
2009
|
v("strong", null, W(st.value), 1)
|
|
1999
|
-
], 10,
|
|
2010
|
+
], 10, Jr)) : Te("", !0),
|
|
2000
2011
|
rt.value ? (Z(), oe("button", {
|
|
2001
2012
|
key: 1,
|
|
2002
2013
|
class: "three-dimensional-map__overview",
|
|
2003
2014
|
type: "button",
|
|
2004
2015
|
disabled: K.value || De.value,
|
|
2005
2016
|
"data-tooltip": "回到模型总览,点击其他模型标签继续查看",
|
|
2006
|
-
onClick:
|
|
2017
|
+
onClick: Ie
|
|
2007
2018
|
}, [
|
|
2008
2019
|
c[3] || (c[3] = v("span", {
|
|
2009
2020
|
class: "three-dimensional-map__switch-icon",
|
|
2010
2021
|
"aria-hidden": "true"
|
|
2011
2022
|
}, null, -1)),
|
|
2012
2023
|
v("span", null, W(K.value ? "返回中" : "回到总览"), 1)
|
|
2013
|
-
], 8,
|
|
2024
|
+
], 8, Zr)) : Te("", !0)
|
|
2014
2025
|
])
|
|
2015
2026
|
], 2)) : Te("", !0),
|
|
2016
2027
|
c[6] || (c[6] = v("div", {
|
|
@@ -2019,19 +2030,19 @@ const wr = {
|
|
|
2019
2030
|
}, [
|
|
2020
2031
|
v("span", null, [
|
|
2021
2032
|
v("i", { class: "is-available" }),
|
|
2022
|
-
|
|
2033
|
+
Gt("可查看模型")
|
|
2023
2034
|
]),
|
|
2024
2035
|
v("span", null, [
|
|
2025
2036
|
v("i", { class: "is-loaded" }),
|
|
2026
|
-
|
|
2037
|
+
Gt("已加载模型")
|
|
2027
2038
|
]),
|
|
2028
2039
|
v("span", null, [
|
|
2029
2040
|
v("i", { class: "is-hover" }),
|
|
2030
|
-
|
|
2041
|
+
Gt("鼠标悬停")
|
|
2031
2042
|
])
|
|
2032
2043
|
], -1)),
|
|
2033
|
-
|
|
2034
|
-
|
|
2044
|
+
Ue.value ? (Z(), oe("div", ea, W(Ue.value), 1)) : Te("", !0),
|
|
2045
|
+
Ln(Kr, {
|
|
2035
2046
|
modelValue: Me.value,
|
|
2036
2047
|
"onUpdate:modelValue": c[0] || (c[0] = (R) => Me.value = R),
|
|
2037
2048
|
"model-name": L.value,
|
|
@@ -2042,16 +2053,16 @@ const wr = {
|
|
|
2042
2053
|
onApply: We,
|
|
2043
2054
|
onReset: xt
|
|
2044
2055
|
}, null, 8, ["modelValue", "model-name", "current-sse", "actual-sse", "tiles-loading", "recommended"]),
|
|
2045
|
-
q.value ? (Z(), oe("div",
|
|
2056
|
+
q.value ? (Z(), oe("div", ta, [
|
|
2046
2057
|
c[4] || (c[4] = v("strong", null, "模型总览模式", -1)),
|
|
2047
2058
|
v("span", null, W(q.value), 1)
|
|
2048
2059
|
])) : Te("", !0),
|
|
2049
|
-
Q.value ? (Z(), oe("div",
|
|
2060
|
+
Q.value ? (Z(), oe("div", na, [
|
|
2050
2061
|
v("strong", null, W(ye.value), 1),
|
|
2051
2062
|
v("span", null, W(Q.value), 1)
|
|
2052
2063
|
])) : Te("", !0),
|
|
2053
|
-
|
|
2054
|
-
(Z(!0), oe(
|
|
2064
|
+
F.value ? (Z(), oe("div", ra, [
|
|
2065
|
+
(Z(!0), oe(on, null, ln(he.value, (R) => (Z(), oe("div", {
|
|
2055
2066
|
key: R.label,
|
|
2056
2067
|
class: "three-dimensional-map__debug-row"
|
|
2057
2068
|
}, [
|
|
@@ -2059,23 +2070,23 @@ const wr = {
|
|
|
2059
2070
|
v("strong", null, W(R.value), 1)
|
|
2060
2071
|
]))), 128))
|
|
2061
2072
|
])) : Te("", !0),
|
|
2062
|
-
|
|
2073
|
+
N.value || z.value ? (Z(), oe("div", {
|
|
2063
2074
|
key: 6,
|
|
2064
|
-
class:
|
|
2075
|
+
class: $e(["three-dimensional-map__status", { "is-error": !!z.value }])
|
|
2065
2076
|
}, [
|
|
2066
|
-
z.value ? (Z(), oe("span",
|
|
2067
|
-
|
|
2077
|
+
z.value ? (Z(), oe("span", aa, W(z.value), 1)) : (Z(), oe("div", oa, [...c[5] || (c[5] = [
|
|
2078
|
+
wn('<div class="three-dimensional-map__loader-orbit" aria-hidden="true" data-v-38a250d2><span class="three-dimensional-map__loader-core" data-v-38a250d2></span><span class="three-dimensional-map__loader-ring is-inner" data-v-38a250d2></span><span class="three-dimensional-map__loader-ring is-outer" data-v-38a250d2></span><span class="three-dimensional-map__loader-node is-a" data-v-38a250d2></span><span class="three-dimensional-map__loader-node is-b" data-v-38a250d2></span><span class="three-dimensional-map__loader-node is-c" data-v-38a250d2></span></div><div class="three-dimensional-map__loader-copy" data-v-38a250d2><strong data-v-38a250d2>三维地形引擎启动中</strong><span data-v-38a250d2>同步影像图层 / 实景模型 / 空间索引</span></div><div class="three-dimensional-map__loader-progress" aria-hidden="true" data-v-38a250d2><span data-v-38a250d2></span></div>', 3)
|
|
2068
2079
|
])]))
|
|
2069
2080
|
], 2)) : Te("", !0)
|
|
2070
2081
|
]));
|
|
2071
2082
|
}
|
|
2072
|
-
}),
|
|
2083
|
+
}), ia = /* @__PURE__ */ cn(sa, [["__scopeId", "data-v-38a250d2"]]), ga = /* @__PURE__ */ zt({
|
|
2073
2084
|
__name: "ThreeDimensionalMapPage",
|
|
2074
2085
|
setup(a) {
|
|
2075
|
-
return (l,
|
|
2086
|
+
return (l, p) => (Z(), rn(ia));
|
|
2076
2087
|
}
|
|
2077
2088
|
});
|
|
2078
|
-
function
|
|
2089
|
+
function ma(a) {
|
|
2079
2090
|
return {
|
|
2080
2091
|
async getThreeDimensionalModels() {
|
|
2081
2092
|
return (await a.get("/material/threedList")).data ?? [];
|
|
@@ -2085,32 +2096,32 @@ function ua(a) {
|
|
|
2085
2096
|
}
|
|
2086
2097
|
};
|
|
2087
2098
|
}
|
|
2088
|
-
function
|
|
2099
|
+
function Ma(a) {
|
|
2089
2100
|
const l = a == null ? void 0 : a.viewer;
|
|
2090
2101
|
l && (l.useDefaultRenderLoop = !1);
|
|
2091
2102
|
}
|
|
2092
|
-
function
|
|
2093
|
-
var
|
|
2103
|
+
function pa(a) {
|
|
2104
|
+
var p, y, N;
|
|
2094
2105
|
const l = a == null ? void 0 : a.viewer;
|
|
2095
|
-
l && (l.useDefaultRenderLoop = !0, (
|
|
2106
|
+
l && (l.useDefaultRenderLoop = !0, (p = l.resize) == null || p.call(l), (N = (y = l.scene) == null ? void 0 : y.requestRender) == null || N.call(y));
|
|
2096
2107
|
}
|
|
2097
2108
|
export {
|
|
2098
|
-
|
|
2099
|
-
|
|
2109
|
+
un as DEFAULT_MAP3D_CENTER,
|
|
2110
|
+
zn as DEFAULT_MAP3D_CONFIG_URL,
|
|
2100
2111
|
et as DEFAULT_MAP3D_INITIAL_VIEW,
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2112
|
+
Hn as MAP3D_DEFAULT_CONFIG_PATH,
|
|
2113
|
+
ia as ThreeDimensionalMap,
|
|
2114
|
+
ga as ThreeDimensionalMapPage,
|
|
2115
|
+
da as clearMap3dConfigCache,
|
|
2116
|
+
Yn as createMap3dOptions,
|
|
2117
|
+
ma as createMapApi,
|
|
2118
|
+
Kn as fetchMap3dConfig,
|
|
2119
|
+
Qn as formatMaterialModelTree,
|
|
2120
|
+
jn as initialViewToCenter,
|
|
2121
|
+
fa as isThreeDimensionalModel,
|
|
2122
|
+
ca as provideMapApi,
|
|
2123
|
+
Wn as resolveMap3dPublicUrl,
|
|
2124
|
+
Xn as resolveTilesetUrl,
|
|
2125
|
+
pa as resumeMars3dMap,
|
|
2126
|
+
Ma as suspendMars3dMap
|
|
2116
2127
|
};
|