bigmap-plugin 1.0.7 → 1.0.9
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 +2 -0
- package/dist/bigmap-plugin.js +279 -274
- package/dist/bigmap-plugin.umd.cjs +5 -5
- package/dist/index.d.ts +2 -0
- package/package.json +2 -2
package/dist/bigmap-plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as _, shallowRef as Ie, onBeforeUnmount as Qn, onUnmounted as K, isRef as pt, watch as st, computed as z, defineComponent as Z, createVNode as h, createTextVNode as
|
|
1
|
+
import { ref as _, shallowRef as Ie, onBeforeUnmount as Qn, onUnmounted as K, isRef as pt, watch as st, computed as z, defineComponent as Z, createVNode as h, createTextVNode as R, useSlots as er, mergeProps as ct, onMounted as tn, Teleport as tr, Fragment as nr, Suspense as rr } from "vue";
|
|
2
2
|
const Tt = {
|
|
3
3
|
debug: 10,
|
|
4
4
|
info: 20,
|
|
@@ -117,10 +117,10 @@ class nn {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
const ts = new nn(), Ae = /* @__PURE__ */ new Map();
|
|
120
|
-
function
|
|
120
|
+
function oe(e) {
|
|
121
121
|
Ae.set(e.type, e);
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
oe({
|
|
124
124
|
type: "area",
|
|
125
125
|
name: "测面积",
|
|
126
126
|
defaultSize: 15,
|
|
@@ -131,7 +131,7 @@ ae({
|
|
|
131
131
|
labelOptions: e.label
|
|
132
132
|
})
|
|
133
133
|
});
|
|
134
|
-
|
|
134
|
+
oe({
|
|
135
135
|
type: "polygon",
|
|
136
136
|
name: "绘制多边形",
|
|
137
137
|
defaultSize: 14,
|
|
@@ -143,7 +143,7 @@ ae({
|
|
|
143
143
|
material: t.fill
|
|
144
144
|
})
|
|
145
145
|
});
|
|
146
|
-
|
|
146
|
+
oe({
|
|
147
147
|
type: "circle",
|
|
148
148
|
name: "绘制圆形",
|
|
149
149
|
defaultSize: 17,
|
|
@@ -167,7 +167,7 @@ ae({
|
|
|
167
167
|
}
|
|
168
168
|
})
|
|
169
169
|
});
|
|
170
|
-
|
|
170
|
+
oe({
|
|
171
171
|
type: "azimuth",
|
|
172
172
|
name: "测方位",
|
|
173
173
|
defaultSize: 15,
|
|
@@ -182,7 +182,7 @@ ae({
|
|
|
182
182
|
labelOptions: { fillColor: e.Color.YELLOW }
|
|
183
183
|
})
|
|
184
184
|
});
|
|
185
|
-
|
|
185
|
+
oe({
|
|
186
186
|
type: "ruler",
|
|
187
187
|
name: "测距离",
|
|
188
188
|
defaultSize: 15,
|
|
@@ -195,7 +195,7 @@ ae({
|
|
|
195
195
|
labelOptions: t.label
|
|
196
196
|
})
|
|
197
197
|
});
|
|
198
|
-
|
|
198
|
+
oe({
|
|
199
199
|
type: "polyline",
|
|
200
200
|
name: "绘制线",
|
|
201
201
|
defaultSize: 16,
|
|
@@ -207,7 +207,7 @@ ae({
|
|
|
207
207
|
material: t.fill
|
|
208
208
|
})
|
|
209
209
|
});
|
|
210
|
-
|
|
210
|
+
oe({
|
|
211
211
|
type: "triangle",
|
|
212
212
|
name: "绘制三角形",
|
|
213
213
|
defaultSize: 16,
|
|
@@ -219,7 +219,7 @@ ae({
|
|
|
219
219
|
material: t.fill
|
|
220
220
|
})
|
|
221
221
|
});
|
|
222
|
-
|
|
222
|
+
oe({
|
|
223
223
|
type: "rectangle",
|
|
224
224
|
name: "绘制矩形",
|
|
225
225
|
defaultSize: 16,
|
|
@@ -353,7 +353,7 @@ const Ke = "/libs", Le = {
|
|
|
353
353
|
showDeleteControls: !0,
|
|
354
354
|
tools: rn,
|
|
355
355
|
searchDebounceTime: De.DEBOUNCE_DELAY
|
|
356
|
-
},
|
|
356
|
+
}, re = {
|
|
357
357
|
/** 纬度每度对应米数(圆形搜索/网格计算,较精确) */
|
|
358
358
|
METERS_PER_DEGREE_LAT: 111320,
|
|
359
359
|
/** 纬度每度对应米数(相机高度估算,近似值) */
|
|
@@ -958,9 +958,9 @@ function jr(e) {
|
|
|
958
958
|
height: Math.max(n.height, 1e4)
|
|
959
959
|
}, i = Vr(e);
|
|
960
960
|
if (!i) return r;
|
|
961
|
-
const o = (i.minx + i.maxx) / 2, a = (i.miny + i.maxy) / 2, l = (i.maxx - i.minx) * Math.cos(a * Math.PI / 180) *
|
|
961
|
+
const o = (i.minx + i.maxx) / 2, a = (i.miny + i.maxy) / 2, l = (i.maxx - i.minx) * Math.cos(a * Math.PI / 180) * re.METERS_PER_DEGREE_LAT_APPROX, s = (i.maxy - i.miny) * re.METERS_PER_DEGREE_LAT_APPROX, u = Math.max(l, s), c = t.Math.toRadians(re.CAMERA_FOV_DEGREES), d = Math.max(
|
|
962
962
|
u / (2 * Math.tan(c / 2)),
|
|
963
|
-
|
|
963
|
+
re.MIN_CAMERA_HEIGHT
|
|
964
964
|
);
|
|
965
965
|
return { lng: o, lat: a, height: d };
|
|
966
966
|
}
|
|
@@ -1052,7 +1052,7 @@ function ei(e) {
|
|
|
1052
1052
|
return { west: t, south: n, east: r, north: i };
|
|
1053
1053
|
}
|
|
1054
1054
|
function ti(e) {
|
|
1055
|
-
const [t, n] = e.center, r = e.radius / (
|
|
1055
|
+
const [t, n] = e.center, r = e.radius / (re.METERS_PER_DEGREE_LAT * Math.cos(n * Math.PI / 180)), i = e.radius / re.METERS_PER_DEGREE_LAT;
|
|
1056
1056
|
return {
|
|
1057
1057
|
west: t - r,
|
|
1058
1058
|
east: t + r,
|
|
@@ -1073,7 +1073,7 @@ function ri(e, t) {
|
|
|
1073
1073
|
return i;
|
|
1074
1074
|
}
|
|
1075
1075
|
function ii(e, t) {
|
|
1076
|
-
const [n, r] = t.center, i = t.radius * t.radius, o = (e.lng - n) *
|
|
1076
|
+
const [n, r] = t.center, i = t.radius * t.radius, o = (e.lng - n) * re.METERS_PER_DEGREE_LAT * Math.cos(r * Math.PI / 180), a = (e.lat - r) * re.METERS_PER_DEGREE_LAT;
|
|
1077
1077
|
return o * o + a * a <= i;
|
|
1078
1078
|
}
|
|
1079
1079
|
function oi(e, t) {
|
|
@@ -1154,7 +1154,7 @@ function fi(e) {
|
|
|
1154
1154
|
}
|
|
1155
1155
|
return t.billboardMap.delete(u), _t(t, d), c;
|
|
1156
1156
|
}, o = (u, c, d, f) => {
|
|
1157
|
-
const g = parseFloat(c[d.fieldMapping.lng]) || 0, b = parseFloat(c[d.fieldMapping.lat]) || 0, y = parseFloat(c[d.fieldMapping.altitude]) || 0, p = u.Cartesian3.fromDegrees(g, b, y), C =
|
|
1157
|
+
const g = parseFloat(c[d.fieldMapping.lng]) || 0, b = parseFloat(c[d.fieldMapping.lat]) || 0, y = parseFloat(c[d.fieldMapping.altitude]) || 0, p = u.Cartesian3.fromDegrees(g, b, y), C = {
|
|
1158
1158
|
position: p,
|
|
1159
1159
|
image: c.icon,
|
|
1160
1160
|
width: c.width || d.width,
|
|
@@ -1163,54 +1163,59 @@ function fi(e) {
|
|
|
1163
1163
|
id: f,
|
|
1164
1164
|
disableDepthTestDistance: ln.NEAR,
|
|
1165
1165
|
verticalOrigin: u.VerticalOrigin.BOTTOM
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1166
|
+
};
|
|
1167
|
+
d.clampToGround && u.HeightReference && (C.heightReference = u.HeightReference.CLAMP_TO_GROUND);
|
|
1168
|
+
const v = t.billboardCollection.add(C);
|
|
1169
|
+
return v.pointData = c, { billboard: v, position: p, lng: g, lat: b, altitude: y };
|
|
1168
1170
|
}, a = async (u, c, d, f = "append") => {
|
|
1169
1171
|
try {
|
|
1170
1172
|
if (f === "replace" && r(), !await n()) return;
|
|
1171
1173
|
const b = A();
|
|
1172
1174
|
if (!b) return;
|
|
1173
|
-
const y = {
|
|
1175
|
+
const y = c?.clampToGround ?? !1, p = {
|
|
1174
1176
|
width: c?.width || 20,
|
|
1175
1177
|
height: c?.height || 20,
|
|
1178
|
+
clampToGround: y,
|
|
1176
1179
|
fieldMapping: {
|
|
1177
1180
|
...si,
|
|
1178
1181
|
...c?.fieldMapping || {}
|
|
1179
1182
|
}
|
|
1180
|
-
},
|
|
1183
|
+
}, C = performance.now();
|
|
1181
1184
|
t.gridIndex || (t.gridIndex = /* @__PURE__ */ new Map());
|
|
1182
|
-
const
|
|
1183
|
-
let
|
|
1184
|
-
for (let
|
|
1185
|
-
const
|
|
1186
|
-
for (const
|
|
1187
|
-
if (!
|
|
1188
|
-
|
|
1185
|
+
const v = Array.isArray(u) ? u : [], S = v.length, P = De.BATCH_SIZE, D = De.YIELD_BUDGET_MS;
|
|
1186
|
+
let k = performance.now(), E = 0;
|
|
1187
|
+
for (let I = 0; I < S; I += P) {
|
|
1188
|
+
const N = v.slice(I, I + P);
|
|
1189
|
+
for (const x of N) {
|
|
1190
|
+
if (!x.icon) {
|
|
1191
|
+
E += 1, Bt || (Bt = !0, m.warn(
|
|
1189
1192
|
"[useMapPoint] 检测到缺失 icon 的点位,已跳过渲染;请在数据层通过 iconManager 预生成 icon 后传入"
|
|
1190
1193
|
));
|
|
1191
1194
|
continue;
|
|
1192
1195
|
}
|
|
1193
|
-
const
|
|
1196
|
+
const w = x[p.fieldMapping.id], L = w != null && w !== "" ? String(w) : ci(), M = i(L), { billboard: U, position: j, lng: Y, lat: ae, altitude: fe } = o(
|
|
1194
1197
|
b,
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
+
x,
|
|
1199
|
+
p,
|
|
1200
|
+
L
|
|
1198
1201
|
);
|
|
1199
|
-
t.billboardMap.set(
|
|
1200
|
-
const
|
|
1201
|
-
...
|
|
1202
|
-
id:
|
|
1203
|
-
lng:
|
|
1204
|
-
lat:
|
|
1205
|
-
altitude:
|
|
1206
|
-
icon:
|
|
1202
|
+
t.billboardMap.set(L, U);
|
|
1203
|
+
const T = {
|
|
1204
|
+
...x,
|
|
1205
|
+
id: L,
|
|
1206
|
+
lng: Y,
|
|
1207
|
+
lat: ae,
|
|
1208
|
+
altitude: fe,
|
|
1209
|
+
icon: x.icon
|
|
1207
1210
|
};
|
|
1208
|
-
|
|
1211
|
+
M !== void 0 ? t.pointDataCache[M] = T : (t.cacheIdIndex.set(L, t.pointDataCache.length), t.pointDataCache.push(T)), At(t, T);
|
|
1209
1212
|
}
|
|
1210
|
-
|
|
1213
|
+
I + P < S && performance.now() - k >= D && (await ui(), k = performance.now());
|
|
1211
1214
|
}
|
|
1212
|
-
|
|
1213
|
-
`[useMapPoint]
|
|
1215
|
+
E > 0 && m.warn(
|
|
1216
|
+
`[useMapPoint] 本次加载跳过 ${E} 个缺失 icon 的点位`
|
|
1217
|
+
), console.log(
|
|
1218
|
+
`[useMapPoint] ${f} ${v.length} 个点位 billboard 渲染耗时:${(performance.now() - C).toFixed(0)}ms`
|
|
1214
1219
|
);
|
|
1215
1220
|
} catch (g) {
|
|
1216
1221
|
throw m.error("加载点位失败:", g), g;
|
|
@@ -1876,7 +1881,7 @@ function ke(e, t = !1) {
|
|
|
1876
1881
|
t && e.lastEditedEntity && Wi(e);
|
|
1877
1882
|
}
|
|
1878
1883
|
}
|
|
1879
|
-
function
|
|
1884
|
+
function de(e, t) {
|
|
1880
1885
|
if (e.drawCallback)
|
|
1881
1886
|
try {
|
|
1882
1887
|
e.drawCallback(t);
|
|
@@ -1896,7 +1901,7 @@ function Wi(e) {
|
|
|
1896
1901
|
layer: { _id: e.currentDrawId },
|
|
1897
1902
|
path: t.rawPath || []
|
|
1898
1903
|
};
|
|
1899
|
-
t.type === "circle" && t.radius !== void 0 && (n.radius = t.radius),
|
|
1904
|
+
t.type === "circle" && t.radius !== void 0 && (n.radius = t.radius), de(e, {
|
|
1900
1905
|
type: t.type,
|
|
1901
1906
|
operation: "edit",
|
|
1902
1907
|
id: e.currentDrawId,
|
|
@@ -1935,14 +1940,14 @@ function Ki(e) {
|
|
|
1935
1940
|
function ji(e) {
|
|
1936
1941
|
e.currentDrawId = "", e.currentDrawType = null, e.isDrawing = !1, e.isEditing = !1, e.lastEditedEntity = null;
|
|
1937
1942
|
}
|
|
1938
|
-
function
|
|
1943
|
+
function ue(e) {
|
|
1939
1944
|
e.isEditing && ke(e, !1), Ki(e), ji(e);
|
|
1940
1945
|
}
|
|
1941
1946
|
function Yi(e, t = "") {
|
|
1942
1947
|
if (!e.mapInstance) return;
|
|
1943
1948
|
const n = t || e.currentDrawId;
|
|
1944
1949
|
if (e.isEditing && ke(e, !1), !n) {
|
|
1945
|
-
|
|
1950
|
+
ue(e);
|
|
1946
1951
|
return;
|
|
1947
1952
|
}
|
|
1948
1953
|
const r = e.mapInstance.entities.getById(n);
|
|
@@ -1954,7 +1959,7 @@ function Yi(e, t = "") {
|
|
|
1954
1959
|
layer: { _id: n },
|
|
1955
1960
|
path: i.rawPath || []
|
|
1956
1961
|
};
|
|
1957
|
-
i.type === "circle" && i.radius !== void 0 && (o.radius = i.radius),
|
|
1962
|
+
i.type === "circle" && i.radius !== void 0 && (o.radius = i.radius), de(e, {
|
|
1958
1963
|
type: i.type,
|
|
1959
1964
|
operation: "delete",
|
|
1960
1965
|
id: n,
|
|
@@ -1963,7 +1968,7 @@ function Yi(e, t = "") {
|
|
|
1963
1968
|
});
|
|
1964
1969
|
}
|
|
1965
1970
|
}
|
|
1966
|
-
|
|
1971
|
+
ue(e);
|
|
1967
1972
|
}
|
|
1968
1973
|
function qi(e) {
|
|
1969
1974
|
if (!e.mapInstance) return;
|
|
@@ -1980,13 +1985,13 @@ function qi(e) {
|
|
|
1980
1985
|
r.some((o) => !e.drawEntityIds.has(o?._id)) || (e.mapInstance.entities.removeAll(), t = r.length);
|
|
1981
1986
|
}
|
|
1982
1987
|
const n = e.currentDrawType || "polygon";
|
|
1983
|
-
|
|
1988
|
+
de(e, {
|
|
1984
1989
|
type: n,
|
|
1985
1990
|
operation: "clear",
|
|
1986
1991
|
data: null,
|
|
1987
1992
|
rawData: null,
|
|
1988
1993
|
count: t
|
|
1989
|
-
}),
|
|
1994
|
+
}), ue(e);
|
|
1990
1995
|
}
|
|
1991
1996
|
class ne {
|
|
1992
1997
|
/** 处理原始数据(附加图层 id 后返回;无效数据返回 null) */
|
|
@@ -2060,7 +2065,7 @@ class ne {
|
|
|
2060
2065
|
}
|
|
2061
2066
|
}
|
|
2062
2067
|
function Xi(e, t, n) {
|
|
2063
|
-
|
|
2068
|
+
de(e, {
|
|
2064
2069
|
type: $i(n),
|
|
2065
2070
|
operation: "select",
|
|
2066
2071
|
id: t,
|
|
@@ -2073,13 +2078,13 @@ function Zi(e) {
|
|
|
2073
2078
|
ke(e, !0);
|
|
2074
2079
|
return;
|
|
2075
2080
|
}
|
|
2076
|
-
e.isDrawing && e.currentDrawType &&
|
|
2081
|
+
e.isDrawing && e.currentDrawType && de(e, {
|
|
2077
2082
|
type: e.currentDrawType,
|
|
2078
2083
|
operation: "cancel",
|
|
2079
2084
|
id: e.currentDrawId,
|
|
2080
2085
|
data: null,
|
|
2081
2086
|
rawData: null
|
|
2082
|
-
}),
|
|
2087
|
+
}), ue(e);
|
|
2083
2088
|
}
|
|
2084
2089
|
function Ji(e, t) {
|
|
2085
2090
|
if (!e.mapInstance) return;
|
|
@@ -2113,7 +2118,7 @@ function eo(e, t) {
|
|
|
2113
2118
|
data: n,
|
|
2114
2119
|
rawData: t.detail
|
|
2115
2120
|
};
|
|
2116
|
-
|
|
2121
|
+
de(e, r), ue(e);
|
|
2117
2122
|
}
|
|
2118
2123
|
function to(e, t) {
|
|
2119
2124
|
e.isEditing = !1;
|
|
@@ -2129,7 +2134,7 @@ function to(e, t) {
|
|
|
2129
2134
|
data: n,
|
|
2130
2135
|
rawData: t.detail
|
|
2131
2136
|
};
|
|
2132
|
-
|
|
2137
|
+
de(e, r), e.lastEditedEntity = null;
|
|
2133
2138
|
}
|
|
2134
2139
|
function yn(e) {
|
|
2135
2140
|
e.eventListeners.forEach(({ type: t }) => {
|
|
@@ -2185,7 +2190,7 @@ function io(e, t, n) {
|
|
|
2185
2190
|
}
|
|
2186
2191
|
function Ft(e) {
|
|
2187
2192
|
try {
|
|
2188
|
-
|
|
2193
|
+
ue(e), yn(e), e.drawInstance && typeof e.drawInstance.destroy == "function" && e.drawInstance.destroy(), e.editInstance && typeof e.editInstance.destroy == "function" && e.editInstance.destroy(), e.drawInstance = null, e.editInstance = null, e.drawCallback = null, e.mapHandler = null, e.lastEditedEntity = null;
|
|
2189
2194
|
} catch (t) {
|
|
2190
2195
|
m.error("清理绘图工具资源失败:", t);
|
|
2191
2196
|
}
|
|
@@ -2225,7 +2230,7 @@ function oo(e, t) {
|
|
|
2225
2230
|
}), {
|
|
2226
2231
|
// 绘制控制
|
|
2227
2232
|
startDrawing: (l) => Hi(n, l, r),
|
|
2228
|
-
cancelDrawing: () =>
|
|
2233
|
+
cancelDrawing: () => ue(n),
|
|
2229
2234
|
// 数据操作
|
|
2230
2235
|
removeDrawing: (l = "") => Yi(n, l),
|
|
2231
2236
|
clearAllDrawings: () => qi(n),
|
|
@@ -2641,21 +2646,21 @@ function zo(e, t, n) {
|
|
|
2641
2646
|
if (g)
|
|
2642
2647
|
return b = !0, null;
|
|
2643
2648
|
g = !0;
|
|
2644
|
-
const
|
|
2649
|
+
const M = ++d;
|
|
2645
2650
|
try {
|
|
2646
|
-
const
|
|
2647
|
-
for (let
|
|
2648
|
-
if (y || !f || a !== w ||
|
|
2651
|
+
const U = L ? Ro : 1;
|
|
2652
|
+
for (let j = 0; j < U; j++) {
|
|
2653
|
+
if (y || !f || a !== w || M !== d) return null;
|
|
2649
2654
|
w.clearLabels();
|
|
2650
2655
|
const Y = await w.loadCurrentViewLabels();
|
|
2651
|
-
if (
|
|
2656
|
+
if (M !== d) return null;
|
|
2652
2657
|
if (p(), Y.status === "terrain-loading") {
|
|
2653
|
-
await new Promise((
|
|
2658
|
+
await new Promise((ae) => setTimeout(ae, Bo));
|
|
2654
2659
|
continue;
|
|
2655
2660
|
}
|
|
2656
|
-
return Y.status === "success" ? m.debug(`[useMapContour] 已标注 ${Y.labelCount} 个高程数字`) : Y.status === "no-results" ? m.warn(
|
|
2661
|
+
return Y.status === "success" ? m.debug(`[useMapContour] 已标注 ${Y.labelCount} 个高程数字`) : Y.status === "hidden" || (Y.status === "no-results" ? m.warn(
|
|
2657
2662
|
"[useMapContour] 当前视区未找到可标注的等高线:请确认已开启地形,或调小 contourConfig.contourSpacing / labelEvery 以加密标注间隔"
|
|
2658
|
-
) : m.warn(`[useMapContour] 高程数字未加载(${Y.status})`), Y;
|
|
2663
|
+
) : m.warn(`[useMapContour] 高程数字未加载(${Y.status})`)), Y;
|
|
2659
2664
|
}
|
|
2660
2665
|
return m.warn("[useMapContour] 地形长时间未就绪,已放弃自动标注高程数字"), null;
|
|
2661
2666
|
} finally {
|
|
@@ -2675,16 +2680,16 @@ function zo(e, t, n) {
|
|
|
2675
2680
|
}, Fo));
|
|
2676
2681
|
}, S = (w) => {
|
|
2677
2682
|
if (s) return;
|
|
2678
|
-
const L = w.camera,
|
|
2679
|
-
if (typeof L?.moveEnd?.addEventListener == "function" && (L.moveEnd.addEventListener(v),
|
|
2680
|
-
const
|
|
2683
|
+
const L = w.camera, M = w.scene?.globe, U = [];
|
|
2684
|
+
if (typeof L?.moveEnd?.addEventListener == "function" && (L.moveEnd.addEventListener(v), U.push(() => L.moveEnd.removeEventListener(v))), typeof M?.tileLoadProgressEvent?.addEventListener == "function") {
|
|
2685
|
+
const j = (Y) => {
|
|
2681
2686
|
Y === 0 && v();
|
|
2682
2687
|
};
|
|
2683
|
-
|
|
2684
|
-
() =>
|
|
2688
|
+
M.tileLoadProgressEvent.addEventListener(j), U.push(
|
|
2689
|
+
() => M.tileLoadProgressEvent.removeEventListener(j)
|
|
2685
2690
|
);
|
|
2686
2691
|
}
|
|
2687
|
-
s = () =>
|
|
2692
|
+
s = () => U.forEach((j) => j());
|
|
2688
2693
|
}, P = async () => {
|
|
2689
2694
|
if (a) return a;
|
|
2690
2695
|
if (l) return l;
|
|
@@ -2693,17 +2698,17 @@ function zo(e, t, n) {
|
|
|
2693
2698
|
try {
|
|
2694
2699
|
const L = await ko(n);
|
|
2695
2700
|
if (y) return null;
|
|
2696
|
-
const
|
|
2697
|
-
return a =
|
|
2701
|
+
const M = new L(w, Oo(i));
|
|
2702
|
+
return a = M, M.setVisible(r.value), f = r.value, S(w), M;
|
|
2698
2703
|
} catch (L) {
|
|
2699
2704
|
return m.error("[useMapContour] 彩色等高线库加载失败:", L), null;
|
|
2700
2705
|
} finally {
|
|
2701
2706
|
l = null;
|
|
2702
2707
|
}
|
|
2703
2708
|
})(), l) : null;
|
|
2704
|
-
},
|
|
2709
|
+
}, D = async (w) => {
|
|
2705
2710
|
if (r.value = !!w, !r.value) {
|
|
2706
|
-
f = !1, a?.hide(), p();
|
|
2711
|
+
f = !1, a?.hide(), a?.clearLabels(), p();
|
|
2707
2712
|
return;
|
|
2708
2713
|
}
|
|
2709
2714
|
const L = await P();
|
|
@@ -2711,17 +2716,17 @@ function zo(e, t, n) {
|
|
|
2711
2716
|
r.value = !1, f = !1, p();
|
|
2712
2717
|
return;
|
|
2713
2718
|
}
|
|
2714
|
-
f = !0, p(), C(L, !0);
|
|
2719
|
+
f = !0, L.show(), p(), C(L, !0);
|
|
2715
2720
|
}, k = () => {
|
|
2716
2721
|
if (r.value) {
|
|
2717
2722
|
if (a) {
|
|
2718
|
-
f = !0, a.show(), p(),
|
|
2723
|
+
f = !0, a.show(), p(), C(a, !0);
|
|
2719
2724
|
return;
|
|
2720
2725
|
}
|
|
2721
|
-
|
|
2726
|
+
D(!0);
|
|
2722
2727
|
}
|
|
2723
2728
|
}, E = () => {
|
|
2724
|
-
f = !1, a?.hide(), p();
|
|
2729
|
+
f = !1, a?.hide(), a?.clearLabels(), p();
|
|
2725
2730
|
}, I = async () => {
|
|
2726
2731
|
if (!r.value) return { status: "hidden", labelCount: 0 };
|
|
2727
2732
|
const w = await P();
|
|
@@ -2733,7 +2738,7 @@ function zo(e, t, n) {
|
|
|
2733
2738
|
};
|
|
2734
2739
|
const L = await C(w, !1);
|
|
2735
2740
|
return L || { status: "busy", labelCount: w.getState().labelCount };
|
|
2736
|
-
},
|
|
2741
|
+
}, N = () => {
|
|
2737
2742
|
if (!a) return { status: "empty", labelCount: 0 };
|
|
2738
2743
|
const w = a.clearLabels();
|
|
2739
2744
|
return p(), w;
|
|
@@ -2749,9 +2754,9 @@ function zo(e, t, n) {
|
|
|
2749
2754
|
}), {
|
|
2750
2755
|
contourVisible: r,
|
|
2751
2756
|
contourState: o,
|
|
2752
|
-
setContourVisible:
|
|
2757
|
+
setContourVisible: D,
|
|
2753
2758
|
loadLabels: I,
|
|
2754
|
-
clearLabels:
|
|
2759
|
+
clearLabels: N,
|
|
2755
2760
|
getLegendData: x,
|
|
2756
2761
|
reapply: k,
|
|
2757
2762
|
remove: E
|
|
@@ -2906,66 +2911,66 @@ function Zo(e, t, n) {
|
|
|
2906
2911
|
}), i = Ot(t);
|
|
2907
2912
|
let o = null, a = null, l = i, s = null, u = null, c = null, d = null, f = null, g = 0, b = 0;
|
|
2908
2913
|
const y = () => {
|
|
2909
|
-
const
|
|
2910
|
-
return
|
|
2914
|
+
const T = e.value;
|
|
2915
|
+
return T && T.entities ? T : null;
|
|
2911
2916
|
}, p = () => {
|
|
2912
2917
|
f !== null && (cancelAnimationFrame(f), f = null);
|
|
2913
2918
|
}, C = () => {
|
|
2914
|
-
const
|
|
2915
|
-
|
|
2919
|
+
const T = y();
|
|
2920
|
+
T && (s && T.entities.remove(s), u && T.entities.remove(u), c && T.entities.remove(c)), s = null, u = null, c = null, d = null;
|
|
2916
2921
|
}, v = () => {
|
|
2917
2922
|
a && (r.value = { ...a.state });
|
|
2918
|
-
}, S = (
|
|
2923
|
+
}, S = (T) => {
|
|
2919
2924
|
if (!d) return;
|
|
2920
|
-
const
|
|
2921
|
-
|
|
2922
|
-
|
|
2925
|
+
const F = A();
|
|
2926
|
+
F && d.setValue(
|
|
2927
|
+
F.Cartesian3.fromDegrees(T.lng, T.lat, T.altitude)
|
|
2923
2928
|
);
|
|
2924
|
-
}, P = (
|
|
2929
|
+
}, P = (T) => {
|
|
2925
2930
|
if (!u || !o || !a) return;
|
|
2926
|
-
const
|
|
2927
|
-
if (!
|
|
2928
|
-
const V = a.state.currentTime, Q = l.trailTime > 0 ? Math.max(0, V - l.trailTime) : 0,
|
|
2931
|
+
const F = A();
|
|
2932
|
+
if (!F) return;
|
|
2933
|
+
const V = a.state.currentTime, Q = l.trailTime > 0 ? Math.max(0, V - l.trailTime) : 0, le = be(o, o.minTime + Q), se = o.points.slice(le.index, T.index + 1), Pe = Yo(F, se);
|
|
2929
2934
|
Pe.push(
|
|
2930
|
-
|
|
2935
|
+
F.Cartesian3.fromDegrees(T.lng, T.lat, T.altitude)
|
|
2931
2936
|
), u.polyline && (u.polyline.positions = Pe);
|
|
2932
|
-
},
|
|
2933
|
-
const
|
|
2934
|
-
if (!
|
|
2937
|
+
}, D = (T) => {
|
|
2938
|
+
const F = e.value;
|
|
2939
|
+
if (!F?.camera) return;
|
|
2935
2940
|
const V = A();
|
|
2936
|
-
V &&
|
|
2941
|
+
V && F.camera.setView({
|
|
2937
2942
|
destination: V.Cartesian3.fromDegrees(
|
|
2938
|
-
|
|
2939
|
-
|
|
2943
|
+
T.lng,
|
|
2944
|
+
T.lat,
|
|
2940
2945
|
l.followHeight
|
|
2941
2946
|
),
|
|
2942
2947
|
orientation: { heading: 0, pitch: V.Math.toRadians(-90), roll: 0 }
|
|
2943
2948
|
});
|
|
2944
|
-
}, k = (
|
|
2949
|
+
}, k = (T) => {
|
|
2945
2950
|
if (!a || !o || a.state.status !== "playing") {
|
|
2946
2951
|
p();
|
|
2947
2952
|
return;
|
|
2948
2953
|
}
|
|
2949
2954
|
f = requestAnimationFrame(k);
|
|
2950
|
-
const
|
|
2951
|
-
Math.max((
|
|
2955
|
+
const F = Math.min(
|
|
2956
|
+
Math.max((T - g) / 1e3, 0),
|
|
2952
2957
|
Xo
|
|
2953
2958
|
);
|
|
2954
|
-
g =
|
|
2959
|
+
g = T, a.tick(F);
|
|
2955
2960
|
const V = be(o, o.minTime + a.state.currentTime);
|
|
2956
|
-
S(V),
|
|
2961
|
+
S(V), T - b >= qo && (P(V), b = T), l.follow && D(V), v();
|
|
2957
2962
|
}, E = () => {
|
|
2958
2963
|
f === null && (g = performance.now(), b = 0, f = requestAnimationFrame(k));
|
|
2959
|
-
}, I = (
|
|
2964
|
+
}, I = (T, F) => {
|
|
2960
2965
|
if (!o) return;
|
|
2961
|
-
const V = !Go(
|
|
2962
|
-
s = Wo(
|
|
2966
|
+
const V = !Go(T);
|
|
2967
|
+
s = Wo(F, o.displayPoints, l, V), u = Ho(F, l, V), c = jo(F, l, V), d = c.position ?? null, T.entities.add(s), T.entities.add(u), T.entities.add(c);
|
|
2963
2968
|
const Q = be(
|
|
2964
2969
|
o,
|
|
2965
2970
|
o.minTime + (a ? a.state.currentTime : 0)
|
|
2966
2971
|
);
|
|
2967
2972
|
S(Q), P(Q);
|
|
2968
|
-
},
|
|
2973
|
+
}, N = (T, F) => {
|
|
2969
2974
|
const V = y(), Q = A();
|
|
2970
2975
|
if (!V || !Q) return;
|
|
2971
2976
|
vt.loadScripts(
|
|
@@ -2973,16 +2978,16 @@ function Zo(e, t, n) {
|
|
|
2973
2978
|
n?.serverUrl,
|
|
2974
2979
|
n?.libsUrl || Ke
|
|
2975
2980
|
).catch(
|
|
2976
|
-
(
|
|
2977
|
-
), l = Ot({ ...i, ...
|
|
2978
|
-
let
|
|
2981
|
+
(se) => m.warn("[useMapTrajectory] 轨迹辅助库加载失败:", se)
|
|
2982
|
+
), l = Ot({ ...i, ...F });
|
|
2983
|
+
let le;
|
|
2979
2984
|
try {
|
|
2980
|
-
|
|
2981
|
-
} catch (
|
|
2982
|
-
m.warn("[useMapTrajectory] 轨迹数据无效:",
|
|
2985
|
+
le = $o(T, l);
|
|
2986
|
+
} catch (se) {
|
|
2987
|
+
m.warn("[useMapTrajectory] 轨迹数据无效:", se);
|
|
2983
2988
|
return;
|
|
2984
2989
|
}
|
|
2985
|
-
p(), C(), o =
|
|
2990
|
+
p(), C(), o = le, a = Uo(o, l), I(V, Q), v(), l.autoPlay && x();
|
|
2986
2991
|
}, x = () => {
|
|
2987
2992
|
a && (a.play(), v(), a.state.status === "playing" && E());
|
|
2988
2993
|
}, w = () => {
|
|
@@ -2990,16 +2995,16 @@ function Zo(e, t, n) {
|
|
|
2990
2995
|
}, L = () => {
|
|
2991
2996
|
if (p(), !a || !o) return;
|
|
2992
2997
|
a.stop();
|
|
2993
|
-
const
|
|
2994
|
-
S(
|
|
2995
|
-
},
|
|
2996
|
-
a && (a.setSpeed(
|
|
2997
|
-
},
|
|
2998
|
+
const T = be(o, o.minTime);
|
|
2999
|
+
S(T), P(T), v();
|
|
3000
|
+
}, M = (T) => {
|
|
3001
|
+
a && (a.setSpeed(T), v());
|
|
3002
|
+
}, U = (T) => {
|
|
2998
3003
|
if (!a || !o) return;
|
|
2999
|
-
a.jumpTo(
|
|
3000
|
-
const
|
|
3001
|
-
S(
|
|
3002
|
-
},
|
|
3004
|
+
a.jumpTo(T);
|
|
3005
|
+
const F = be(o, o.minTime + a.state.currentTime);
|
|
3006
|
+
S(F), P(F), v();
|
|
3007
|
+
}, j = () => {
|
|
3003
3008
|
p(), C(), o = null, a = null, r.value = {
|
|
3004
3009
|
status: "idle",
|
|
3005
3010
|
currentTime: 0,
|
|
@@ -3008,11 +3013,11 @@ function Zo(e, t, n) {
|
|
|
3008
3013
|
pointCount: 0
|
|
3009
3014
|
};
|
|
3010
3015
|
}, Y = () => {
|
|
3011
|
-
const
|
|
3012
|
-
!
|
|
3013
|
-
},
|
|
3016
|
+
const T = y(), F = A();
|
|
3017
|
+
!T || !F || !o || !a || (C(), I(T, F));
|
|
3018
|
+
}, ae = () => {
|
|
3014
3019
|
p(), C();
|
|
3015
|
-
},
|
|
3020
|
+
}, fe = () => {
|
|
3016
3021
|
p(), C(), o = null, a = null, r.value = {
|
|
3017
3022
|
status: "idle",
|
|
3018
3023
|
currentTime: 0,
|
|
@@ -3022,19 +3027,19 @@ function Zo(e, t, n) {
|
|
|
3022
3027
|
};
|
|
3023
3028
|
};
|
|
3024
3029
|
return K(() => {
|
|
3025
|
-
|
|
3030
|
+
fe();
|
|
3026
3031
|
}), {
|
|
3027
3032
|
state: r,
|
|
3028
|
-
load:
|
|
3033
|
+
load: N,
|
|
3029
3034
|
play: x,
|
|
3030
3035
|
pause: w,
|
|
3031
3036
|
stop: L,
|
|
3032
|
-
setSpeed:
|
|
3033
|
-
jumpTo:
|
|
3034
|
-
clear:
|
|
3037
|
+
setSpeed: M,
|
|
3038
|
+
jumpTo: U,
|
|
3039
|
+
clear: j,
|
|
3035
3040
|
reapply: Y,
|
|
3036
|
-
remove:
|
|
3037
|
-
destroy:
|
|
3041
|
+
remove: ae,
|
|
3042
|
+
destroy: fe
|
|
3038
3043
|
};
|
|
3039
3044
|
}
|
|
3040
3045
|
function Jo(e) {
|
|
@@ -3103,8 +3108,8 @@ function na(e, t) {
|
|
|
3103
3108
|
v && (o && v.entities.remove(o), a && v.entities.remove(a)), o = null, a = null;
|
|
3104
3109
|
}, c = (v, S) => {
|
|
3105
3110
|
if (!i) return;
|
|
3106
|
-
const P = !Jo(v),
|
|
3107
|
-
o = ea(S,
|
|
3111
|
+
const P = !Jo(v), D = r.outerRing ?? Qo(i);
|
|
3112
|
+
o = ea(S, D, i, r, P), a = r.showOutline ? ta(S, i, r, P) : null, v.entities.add(o), a && v.entities.add(a);
|
|
3108
3113
|
}, d = () => {
|
|
3109
3114
|
const v = s(), S = A();
|
|
3110
3115
|
!v || !S || !i || (u(), c(v, S));
|
|
@@ -3114,8 +3119,8 @@ function na(e, t) {
|
|
|
3114
3119
|
const S = () => d();
|
|
3115
3120
|
v.morphComplete.addEventListener(S), l = () => v.morphComplete.removeEventListener(S);
|
|
3116
3121
|
}, g = (v, S) => {
|
|
3117
|
-
const P = s(),
|
|
3118
|
-
!P || !
|
|
3122
|
+
const P = s(), D = A();
|
|
3123
|
+
!P || !D || !v || !v.length || (r = tt({ ...t, ...S }), i = v, u(), c(P, D), n.value = {
|
|
3119
3124
|
visible: !0,
|
|
3120
3125
|
hasMask: !0,
|
|
3121
3126
|
boundaryCount: v.length
|
|
@@ -3165,7 +3170,7 @@ function W(e, t) {
|
|
|
3165
3170
|
function q(e, t) {
|
|
3166
3171
|
return W(e, t)?.textContent?.trim() ?? "";
|
|
3167
3172
|
}
|
|
3168
|
-
function
|
|
3173
|
+
function ie(e) {
|
|
3169
3174
|
return e?.textContent?.trim() ?? "";
|
|
3170
3175
|
}
|
|
3171
3176
|
function zt(e) {
|
|
@@ -3204,9 +3209,9 @@ function Dn(e) {
|
|
|
3204
3209
|
if (r) {
|
|
3205
3210
|
const o = nt(q(r, "color"));
|
|
3206
3211
|
o && (t.fillColor = o.css, t.fillAlpha = o.alpha);
|
|
3207
|
-
const a =
|
|
3212
|
+
const a = ie(W(r, "fill"));
|
|
3208
3213
|
a === "0" ? t.fill = !1 : a === "1" && (t.fill = !0);
|
|
3209
|
-
const l =
|
|
3214
|
+
const l = ie(W(r, "outline"));
|
|
3210
3215
|
l === "0" ? t.outline = !1 : l === "1" && (t.outline = !0);
|
|
3211
3216
|
}
|
|
3212
3217
|
const i = W(e, "IconStyle");
|
|
@@ -3276,11 +3281,11 @@ function He(e) {
|
|
|
3276
3281
|
return { coordinates: t, invalidCount: n };
|
|
3277
3282
|
}
|
|
3278
3283
|
function sa(e) {
|
|
3279
|
-
const t = W(e, "outerBoundaryIs"), n = t ? W(t, "LinearRing") : null, r = n ? He(
|
|
3284
|
+
const t = W(e, "outerBoundaryIs"), n = t ? W(t, "LinearRing") : null, r = n ? He(ie(W(n, "coordinates"))).coordinates : [];
|
|
3280
3285
|
if (r.length < 3) return null;
|
|
3281
3286
|
const i = [];
|
|
3282
3287
|
for (const o of Tn(e, "innerBoundaryIs")) {
|
|
3283
|
-
const a = W(o, "LinearRing"), l = a ? He(
|
|
3288
|
+
const a = W(o, "LinearRing"), l = a ? He(ie(W(a, "coordinates"))).coordinates : [];
|
|
3284
3289
|
l.length >= 3 && i.push(l);
|
|
3285
3290
|
}
|
|
3286
3291
|
return { type: "Polygon", outer: r, holes: i };
|
|
@@ -3289,13 +3294,13 @@ function Ln(e, t) {
|
|
|
3289
3294
|
switch (e.localName) {
|
|
3290
3295
|
case "Point": {
|
|
3291
3296
|
const n = He(
|
|
3292
|
-
|
|
3297
|
+
ie(W(e, "coordinates"))
|
|
3293
3298
|
).coordinates[0];
|
|
3294
3299
|
n && t.push({ type: "Point", coordinates: n });
|
|
3295
3300
|
break;
|
|
3296
3301
|
}
|
|
3297
3302
|
case "LineString": {
|
|
3298
|
-
const n = He(
|
|
3303
|
+
const n = He(ie(W(e, "coordinates"))).coordinates;
|
|
3299
3304
|
n.length >= 2 && t.push({ type: "LineString", coordinates: n });
|
|
3300
3305
|
break;
|
|
3301
3306
|
}
|
|
@@ -3317,7 +3322,7 @@ function ca(e) {
|
|
|
3317
3322
|
const n = {};
|
|
3318
3323
|
for (const r of xe(t, "SimpleData")) {
|
|
3319
3324
|
const i = r.getAttribute("name");
|
|
3320
|
-
i && (n[i] =
|
|
3325
|
+
i && (n[i] = ie(r));
|
|
3321
3326
|
}
|
|
3322
3327
|
for (const r of Tn(t, "Data")) {
|
|
3323
3328
|
const i = r.getAttribute("name");
|
|
@@ -3386,7 +3391,7 @@ function Vt(e, t = {}) {
|
|
|
3386
3391
|
const r = n.getElementsByTagName("parsererror")[0];
|
|
3387
3392
|
if (r || n.documentElement?.localName === "parsererror")
|
|
3388
3393
|
throw new $(
|
|
3389
|
-
`KML 解析失败:XML 格式错误${ha(
|
|
3394
|
+
`KML 解析失败:XML 格式错误${ha(ie(r ?? null))}`,
|
|
3390
3395
|
G.PARSE_FAILED
|
|
3391
3396
|
);
|
|
3392
3397
|
const i = n.documentElement;
|
|
@@ -3651,10 +3656,10 @@ function xa(e, t) {
|
|
|
3651
3656
|
for (const I of a) E.entities.remove(I.entity);
|
|
3652
3657
|
a = [];
|
|
3653
3658
|
}, d = (E, I) => {
|
|
3654
|
-
const
|
|
3659
|
+
const N = !va(E), x = [];
|
|
3655
3660
|
o.forEach((w, L) => {
|
|
3656
|
-
for (const
|
|
3657
|
-
|
|
3661
|
+
for (const M of Ma(I, w, i, N, L))
|
|
3662
|
+
M.show = l && w.visible, E.entities.add(M), x.push({ entity: M, featureVisible: w.visible });
|
|
3658
3663
|
}), a = x;
|
|
3659
3664
|
}, f = () => {
|
|
3660
3665
|
const E = e.value?.scene;
|
|
@@ -3664,13 +3669,13 @@ function xa(e, t) {
|
|
|
3664
3669
|
}, g = () => {
|
|
3665
3670
|
const E = u();
|
|
3666
3671
|
if (!E || !a.length) return;
|
|
3667
|
-
const I = a.map((
|
|
3672
|
+
const I = a.map((N) => N.entity);
|
|
3668
3673
|
try {
|
|
3669
3674
|
E.flyTo?.(I.length === 1 ? I[0] : I);
|
|
3670
|
-
} catch (
|
|
3671
|
-
m.warn("[useMapKml] 视角定位失败:",
|
|
3675
|
+
} catch (N) {
|
|
3676
|
+
m.warn("[useMapKml] 视角定位失败:", N);
|
|
3672
3677
|
}
|
|
3673
|
-
}, b = async (E, I,
|
|
3678
|
+
}, b = async (E, I, N) => {
|
|
3674
3679
|
const x = u(), w = A();
|
|
3675
3680
|
if (!x || !w) {
|
|
3676
3681
|
const L = new $(
|
|
@@ -3681,33 +3686,33 @@ function xa(e, t) {
|
|
|
3681
3686
|
}
|
|
3682
3687
|
r.value = { ...Ee(), status: "loading", source: E, url: I };
|
|
3683
3688
|
try {
|
|
3684
|
-
o = await
|
|
3685
|
-
const
|
|
3689
|
+
o = await N(), l = !0, c(), d(x, w), f();
|
|
3690
|
+
const M = La(o);
|
|
3686
3691
|
return r.value = {
|
|
3687
3692
|
status: "success",
|
|
3688
3693
|
source: E,
|
|
3689
3694
|
url: I,
|
|
3690
3695
|
featureCount: o.length,
|
|
3691
|
-
...
|
|
3696
|
+
...M,
|
|
3692
3697
|
visible: !0,
|
|
3693
3698
|
error: null
|
|
3694
|
-
}, i.autoFlyTo && g(), { source: E, url: I, featureCount: o.length, ...
|
|
3699
|
+
}, i.autoFlyTo && g(), { source: E, url: I, featureCount: o.length, ...M, features: o };
|
|
3695
3700
|
} catch (L) {
|
|
3696
|
-
const
|
|
3701
|
+
const M = ia(L);
|
|
3697
3702
|
throw c(), o = [], r.value = {
|
|
3698
3703
|
...Ee(),
|
|
3699
3704
|
status: "error",
|
|
3700
3705
|
source: E,
|
|
3701
3706
|
url: I,
|
|
3702
|
-
error:
|
|
3703
|
-
}, m.warn("[useMapKml] 加载失败:",
|
|
3707
|
+
error: M.message
|
|
3708
|
+
}, m.warn("[useMapKml] 加载失败:", M.message), M;
|
|
3704
3709
|
}
|
|
3705
3710
|
}, y = (E, I) => {
|
|
3706
3711
|
i = rt({ ...n, ...I });
|
|
3707
|
-
const
|
|
3712
|
+
const N = typeof E == "string" ? E.trim() : "";
|
|
3708
3713
|
return b(
|
|
3709
3714
|
"url",
|
|
3710
|
-
|
|
3715
|
+
N,
|
|
3711
3716
|
async () => Vt(await ma(E, i.timeout), {
|
|
3712
3717
|
extractProperties: i.extractProperties
|
|
3713
3718
|
}).features
|
|
@@ -3726,10 +3731,10 @@ function xa(e, t) {
|
|
|
3726
3731
|
}, P = () => {
|
|
3727
3732
|
const E = u(), I = A();
|
|
3728
3733
|
!E || !I || !o.length || (c(), d(E, I), l && (r.value = { ...r.value, visible: !0 }));
|
|
3729
|
-
},
|
|
3734
|
+
}, D = () => {
|
|
3730
3735
|
s && (s(), s = null), c(), o = [], l = !0, i = n, r.value = Ee();
|
|
3731
3736
|
}, k = () => {
|
|
3732
|
-
|
|
3737
|
+
D();
|
|
3733
3738
|
};
|
|
3734
3739
|
return K(() => {
|
|
3735
3740
|
k();
|
|
@@ -3741,7 +3746,7 @@ function xa(e, t) {
|
|
|
3741
3746
|
setVisible: v,
|
|
3742
3747
|
flyTo: g,
|
|
3743
3748
|
remove: S,
|
|
3744
|
-
clear:
|
|
3749
|
+
clear: D,
|
|
3745
3750
|
reapply: P,
|
|
3746
3751
|
destroy: k
|
|
3747
3752
|
};
|
|
@@ -3935,12 +3940,12 @@ function Ga(e) {
|
|
|
3935
3940
|
let s, u, c = 0;
|
|
3936
3941
|
const d = z(
|
|
3937
3942
|
() => t.value.trim() ? n.value : []
|
|
3938
|
-
), f = async (
|
|
3943
|
+
), f = async (D) => {
|
|
3939
3944
|
const k = ++c;
|
|
3940
3945
|
try {
|
|
3941
3946
|
const E = await e.searchByText({
|
|
3942
3947
|
field: ["name"],
|
|
3943
|
-
keyword:
|
|
3948
|
+
keyword: D,
|
|
3944
3949
|
limit: 10,
|
|
3945
3950
|
caseSensitive: !1
|
|
3946
3951
|
});
|
|
@@ -3952,25 +3957,25 @@ function Ga(e) {
|
|
|
3952
3957
|
} finally {
|
|
3953
3958
|
k === c && (i.value = !1);
|
|
3954
3959
|
}
|
|
3955
|
-
}, g = (
|
|
3956
|
-
if (t.value =
|
|
3960
|
+
}, g = (D) => {
|
|
3961
|
+
if (t.value = D, s && clearTimeout(s), !D.trim()) {
|
|
3957
3962
|
n.value = [], r.value = !1, o.value = !1;
|
|
3958
3963
|
return;
|
|
3959
3964
|
}
|
|
3960
3965
|
i.value = !0, r.value = !0, s = setTimeout(
|
|
3961
3966
|
() => {
|
|
3962
|
-
f(
|
|
3967
|
+
f(D.trim());
|
|
3963
3968
|
},
|
|
3964
3969
|
e.debounceTime
|
|
3965
3970
|
);
|
|
3966
|
-
}, b = (
|
|
3967
|
-
if (!$e(
|
|
3968
|
-
e.setView(
|
|
3971
|
+
}, b = (D) => $e(D.altitude) ? D.altitude + wr : e.position?.height ?? Le.height, y = (D) => {
|
|
3972
|
+
if (!$e(D.lng) || !$e(D.lat)) return;
|
|
3973
|
+
e.setView(D.lng, D.lat, b(D));
|
|
3969
3974
|
const k = e.addWave({
|
|
3970
3975
|
position: [
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
$e(
|
|
3976
|
+
D.lng,
|
|
3977
|
+
D.lat,
|
|
3978
|
+
$e(D.altitude) ? D.altitude : 0
|
|
3974
3979
|
],
|
|
3975
3980
|
config: {
|
|
3976
3981
|
color: "#0a84ff",
|
|
@@ -3982,14 +3987,14 @@ function Ga(e) {
|
|
|
3982
3987
|
() => e.removeWave(k),
|
|
3983
3988
|
vr
|
|
3984
3989
|
);
|
|
3985
|
-
}, p = (
|
|
3986
|
-
l.value = k, y(
|
|
3987
|
-
}, C = (
|
|
3990
|
+
}, p = (D, k) => {
|
|
3991
|
+
l.value = k, y(D), r.value = !1;
|
|
3992
|
+
}, C = (D) => {
|
|
3988
3993
|
const k = d.value.length;
|
|
3989
|
-
k !== 0 && (a.value = (a.value +
|
|
3994
|
+
k !== 0 && (a.value = (a.value + D + k) % k);
|
|
3990
3995
|
}, v = () => {
|
|
3991
|
-
const
|
|
3992
|
-
k && p(k,
|
|
3996
|
+
const D = a.value, k = d.value[D];
|
|
3997
|
+
k && p(k, D);
|
|
3993
3998
|
}, S = () => {
|
|
3994
3999
|
r.value = !1;
|
|
3995
4000
|
}, P = () => {
|
|
@@ -4169,18 +4174,18 @@ function el(e, t) {
|
|
|
4169
4174
|
libsUrl: e.libsUrl,
|
|
4170
4175
|
mapId: e.mapId,
|
|
4171
4176
|
terrainId: e.terrainId
|
|
4172
|
-
})), { map: c, state: d, initMap: f, setView: g, toggleMapType: b } = Xr(u.value), { loadPoints: y, searchByText: p, updatePoints: C, clearPoints: v, searchByShape: S } = fi(c), { drawEntity: P, deleteEntity:
|
|
4177
|
+
})), { map: c, state: d, initMap: f, setView: g, toggleMapType: b } = Xr(u.value), { loadPoints: y, searchByText: p, updatePoints: C, clearPoints: v, searchByShape: S } = fi(c), { drawEntity: P, deleteEntity: D, redrawAllEntities: k } = Pi(c), {
|
|
4173
4178
|
startDrawing: E,
|
|
4174
4179
|
cancelDrawing: I,
|
|
4175
|
-
clearAllDrawings:
|
|
4180
|
+
clearAllDrawings: N,
|
|
4176
4181
|
removeDrawing: x,
|
|
4177
4182
|
setCallback: w,
|
|
4178
4183
|
getIsDrawing: L
|
|
4179
|
-
} = oo(c), { showPointPopup:
|
|
4184
|
+
} = oo(c), { showPointPopup: M, removePopup: U } = Co(c, void 0, { displayConfig: e.popupConfig }), { addWave: j, removeWave: Y } = bo(c), { addWmtsLayer: ae, addImageryLayer: fe, removeAllLayers: T, setLayerVisible: F } = _o(c), {
|
|
4180
4185
|
contourVisible: V,
|
|
4181
4186
|
contourState: Q,
|
|
4182
|
-
setContourVisible:
|
|
4183
|
-
loadLabels:
|
|
4187
|
+
setContourVisible: le,
|
|
4188
|
+
loadLabels: se,
|
|
4184
4189
|
clearLabels: Pe,
|
|
4185
4190
|
getLegendData: Nn,
|
|
4186
4191
|
reapply: On,
|
|
@@ -4191,33 +4196,33 @@ function el(e, t) {
|
|
|
4191
4196
|
}), ee = Zo(c, void 0, {
|
|
4192
4197
|
serverUrl: e.serverUrl,
|
|
4193
4198
|
libsUrl: e.libsUrl
|
|
4194
|
-
}), ye = na(c),
|
|
4199
|
+
}), ye = na(c), ce = xa(c), Be = ka(c), he = za(c, { enabled: e.lightingConfig === !0 }, { is3D: z(() => d.value.mapType === "3d") });
|
|
4195
4200
|
n.theme.value = e.theme || "dark";
|
|
4196
4201
|
const Vn = Ga({
|
|
4197
4202
|
searchByText: p,
|
|
4198
4203
|
setView: g,
|
|
4199
|
-
addWave:
|
|
4204
|
+
addWave: j,
|
|
4200
4205
|
removeWave: Y,
|
|
4201
4206
|
position: e.position,
|
|
4202
4207
|
debounceTime: e.searchDebounceTime ?? De.DEBOUNCE_DELAY
|
|
4203
4208
|
});
|
|
4204
4209
|
let Ye = 0;
|
|
4205
|
-
const qe = (
|
|
4206
|
-
Ye += 1, n.loadingTitle.value =
|
|
4210
|
+
const qe = (B, Je) => {
|
|
4211
|
+
Ye += 1, n.loadingTitle.value = B, n.loadingSubtitle.value = Je, d.value.isLoading = !0;
|
|
4207
4212
|
}, bt = () => {
|
|
4208
4213
|
d.value.isLoading = !1;
|
|
4209
|
-
}, $n = (
|
|
4210
|
-
qe(
|
|
4214
|
+
}, $n = (B, Je, Zn) => {
|
|
4215
|
+
qe(B, Je);
|
|
4211
4216
|
const Jn = Ye;
|
|
4212
4217
|
setTimeout(() => {
|
|
4213
4218
|
Jn === Ye && bt();
|
|
4214
4219
|
}, Zn);
|
|
4215
4220
|
}, Un = "bigemap.dc-street", Xe = () => {
|
|
4216
|
-
|
|
4217
|
-
}, Et = (
|
|
4218
|
-
n.mapNameVisible.value = !!
|
|
4219
|
-
}, St = (
|
|
4220
|
-
n.theme.value =
|
|
4221
|
+
F(Un, n.mapNameVisible.value);
|
|
4222
|
+
}, Et = (B) => {
|
|
4223
|
+
n.mapNameVisible.value = !!B, Xe();
|
|
4224
|
+
}, St = (B) => {
|
|
4225
|
+
n.theme.value = B;
|
|
4221
4226
|
}, Re = {
|
|
4222
4227
|
map: c,
|
|
4223
4228
|
mapType: n.mapType,
|
|
@@ -4232,24 +4237,24 @@ function el(e, t) {
|
|
|
4232
4237
|
toggleMapTypeCore: b,
|
|
4233
4238
|
redrawAllEntities: k,
|
|
4234
4239
|
setView: g,
|
|
4235
|
-
removeAllLayers:
|
|
4236
|
-
addImageryLayer:
|
|
4237
|
-
addWmtsLayer:
|
|
4240
|
+
removeAllLayers: T,
|
|
4241
|
+
addImageryLayer: fe,
|
|
4242
|
+
addWmtsLayer: ae
|
|
4238
4243
|
}, Gn = {
|
|
4239
4244
|
map: c,
|
|
4240
4245
|
getIsDrawing: L,
|
|
4241
|
-
removePopup:
|
|
4242
|
-
showPointPopup:
|
|
4246
|
+
removePopup: U,
|
|
4247
|
+
showPointPopup: M,
|
|
4243
4248
|
onPointClick: t.onPointClick
|
|
4244
4249
|
}, Wn = () => {
|
|
4245
|
-
|
|
4246
|
-
}, Hn = (
|
|
4247
|
-
n.currentDrawType.value =
|
|
4250
|
+
N(), t.emit("clear-button-click"), t.emit("clear-draw");
|
|
4251
|
+
}, Hn = (B) => {
|
|
4252
|
+
n.currentDrawType.value = B, E(B);
|
|
4248
4253
|
}, Kn = () => {
|
|
4249
4254
|
n.currentDrawType.value = null;
|
|
4250
4255
|
}, jn = () => {
|
|
4251
|
-
w((
|
|
4252
|
-
Kn(),
|
|
4256
|
+
w((B) => {
|
|
4257
|
+
Kn(), B.operation === "draw" || B.operation === "edit" ? t.emit("draw-end", B) : B.operation === "delete" ? t.emit("draw-delete", B) : B.operation === "clear" && t.emit("draw-clear", B);
|
|
4253
4258
|
});
|
|
4254
4259
|
};
|
|
4255
4260
|
let we;
|
|
@@ -4258,7 +4263,7 @@ function el(e, t) {
|
|
|
4258
4263
|
d.value.isLoading = !1, t.emit("ready"), t.emit("init");
|
|
4259
4264
|
}, hr);
|
|
4260
4265
|
}, qn = () => {
|
|
4261
|
-
const
|
|
4266
|
+
const B = {
|
|
4262
4267
|
map: c,
|
|
4263
4268
|
state: d,
|
|
4264
4269
|
setView: g,
|
|
@@ -4272,14 +4277,14 @@ function el(e, t) {
|
|
|
4272
4277
|
clearPoints: v,
|
|
4273
4278
|
startDrawing: E,
|
|
4274
4279
|
stopDrawing: I,
|
|
4275
|
-
clearDrawings:
|
|
4280
|
+
clearDrawings: N,
|
|
4276
4281
|
removeDrawing: x,
|
|
4277
4282
|
drawEntity: P,
|
|
4278
|
-
deleteEntity:
|
|
4283
|
+
deleteEntity: D,
|
|
4279
4284
|
setMapNameVisible: Et,
|
|
4280
|
-
setContourVisible:
|
|
4285
|
+
setContourVisible: le,
|
|
4281
4286
|
contourState: Q,
|
|
4282
|
-
loadContourLabels:
|
|
4287
|
+
loadContourLabels: se,
|
|
4283
4288
|
clearContourLabels: Pe,
|
|
4284
4289
|
getContourLegend: Nn,
|
|
4285
4290
|
trajectoryState: ee.state,
|
|
@@ -4294,11 +4299,11 @@ function el(e, t) {
|
|
|
4294
4299
|
setMask: ye.setMask,
|
|
4295
4300
|
setMaskVisible: ye.setVisible,
|
|
4296
4301
|
clearMask: ye.clear,
|
|
4297
|
-
kmlState:
|
|
4298
|
-
loadKmlFromUrl:
|
|
4299
|
-
loadKmlFromText:
|
|
4300
|
-
setKmlVisible:
|
|
4301
|
-
clearKml:
|
|
4302
|
+
kmlState: ce.state,
|
|
4303
|
+
loadKmlFromUrl: ce.loadFromUrl,
|
|
4304
|
+
loadKmlFromText: ce.loadFromText,
|
|
4305
|
+
setKmlVisible: ce.setVisible,
|
|
4306
|
+
clearKml: ce.clear,
|
|
4302
4307
|
weatherState: Be.state,
|
|
4303
4308
|
setWeather: Be.setWeather,
|
|
4304
4309
|
clearWeather: Be.clear,
|
|
@@ -4307,7 +4312,7 @@ function el(e, t) {
|
|
|
4307
4312
|
setLightingPeriod: he.setPeriod,
|
|
4308
4313
|
setTheme: St
|
|
4309
4314
|
};
|
|
4310
|
-
t.expose(
|
|
4315
|
+
t.expose(B), t.emit("expose", B);
|
|
4311
4316
|
};
|
|
4312
4317
|
let Fe = null, Ze = !1;
|
|
4313
4318
|
K(() => {
|
|
@@ -4316,8 +4321,8 @@ function el(e, t) {
|
|
|
4316
4321
|
const Xn = async () => {
|
|
4317
4322
|
try {
|
|
4318
4323
|
qe("地图加载中", "正在初始化地理数据..."), await f(), d.value.isLoading = !0, await ja(Re), Xe(), Gt(Fe), Fe = Za(Gn), jn(), he.apply(), n.mapType.value = d.value.mapType, e.position && await g(e.position.lng, e.position.lat, e.position.height), Yn(), qn();
|
|
4319
|
-
} catch (
|
|
4320
|
-
throw d.value.isLoading = !1, d.value.error =
|
|
4324
|
+
} catch (B) {
|
|
4325
|
+
throw d.value.isLoading = !1, d.value.error = B instanceof Error ? B : new Error(String(B)), t.emit("error", B), B;
|
|
4321
4326
|
}
|
|
4322
4327
|
};
|
|
4323
4328
|
return {
|
|
@@ -4333,17 +4338,17 @@ function el(e, t) {
|
|
|
4333
4338
|
onDelete: Wn,
|
|
4334
4339
|
handleStartDrawing: Hn,
|
|
4335
4340
|
setMapNameVisible: Et,
|
|
4336
|
-
setContourVisible:
|
|
4341
|
+
setContourVisible: le,
|
|
4337
4342
|
contourVisible: V,
|
|
4338
4343
|
contourState: Q,
|
|
4339
4344
|
trajectoryState: ee.state,
|
|
4340
4345
|
maskState: ye.state,
|
|
4341
|
-
kmlState:
|
|
4346
|
+
kmlState: ce.state,
|
|
4342
4347
|
weatherState: Be.state,
|
|
4343
4348
|
lightingState: he.state,
|
|
4344
4349
|
setTheme: St,
|
|
4345
4350
|
toggleMapType: () => {
|
|
4346
|
-
$n("视图切换中", "正在切换 2D/3D 视图...", 800), Wa(Re), n.mapType.value = d.value.mapType, d.value.mapType === "2d" ? zn() : On(), ee.reapply(),
|
|
4351
|
+
$n("视图切换中", "正在切换 2D/3D 视图...", 800), Wa(Re), n.mapType.value = d.value.mapType, d.value.mapType === "2d" ? zn() : On(), ee.reapply(), ce.reapply(), he.apply();
|
|
4347
4352
|
},
|
|
4348
4353
|
resetView: () => Ha(Re),
|
|
4349
4354
|
toggleMapBaseLayer: async () => {
|
|
@@ -4527,9 +4532,9 @@ const J = /* @__PURE__ */ Z({
|
|
|
4527
4532
|
type: "button",
|
|
4528
4533
|
class: "map-error__retry",
|
|
4529
4534
|
onClick: () => t("retry")
|
|
4530
|
-
}, [
|
|
4535
|
+
}, [R("重新加载")]), h("span", {
|
|
4531
4536
|
class: "map-error__hint"
|
|
4532
|
-
}, [
|
|
4537
|
+
}, [R("若持续失败,请刷新页面")])])])]) : null;
|
|
4533
4538
|
}
|
|
4534
4539
|
}), Dl = /* @__PURE__ */ Z({
|
|
4535
4540
|
name: "AppInput",
|
|
@@ -4673,7 +4678,7 @@ const J = /* @__PURE__ */ Z({
|
|
|
4673
4678
|
class: "results-header"
|
|
4674
4679
|
}, [h("span", {
|
|
4675
4680
|
class: "header-text"
|
|
4676
|
-
}, [
|
|
4681
|
+
}, [R("搜索结果")])]), h("div", {
|
|
4677
4682
|
class: "results-content",
|
|
4678
4683
|
role: "listbox",
|
|
4679
4684
|
"aria-label": "桩号搜索结果"
|
|
@@ -4699,16 +4704,16 @@ const J = /* @__PURE__ */ Z({
|
|
|
4699
4704
|
class: "result-name"
|
|
4700
4705
|
}, [n.name]), n.lng !== void 0 && n.lat !== void 0 ? h("div", {
|
|
4701
4706
|
class: "result-coordinates"
|
|
4702
|
-
}, [n.lng.toFixed(6),
|
|
4707
|
+
}, [n.lng.toFixed(6), R(", "), n.lat.toFixed(6)]) : null, n.altitude ? h("div", {
|
|
4703
4708
|
class: "result-altitude"
|
|
4704
|
-
}, [
|
|
4709
|
+
}, [R("海拔: "), n.altitude, R("m")]) : null]), h("div", {
|
|
4705
4710
|
class: "result-action"
|
|
4706
4711
|
}, [h(J, {
|
|
4707
4712
|
name: "aim",
|
|
4708
4713
|
size: 16
|
|
4709
4714
|
}, null)])]))]), h("div", {
|
|
4710
4715
|
class: "results-footer"
|
|
4711
|
-
}, [h("span", null, [
|
|
4716
|
+
}, [h("span", null, [R("点击结果进行定位")])])]);
|
|
4712
4717
|
}
|
|
4713
4718
|
}), Wt = /* @__PURE__ */ Z({
|
|
4714
4719
|
name: "NoResultsPanel",
|
|
@@ -4737,13 +4742,13 @@ const J = /* @__PURE__ */ Z({
|
|
|
4737
4742
|
size: 32
|
|
4738
4743
|
}, null), h("div", {
|
|
4739
4744
|
class: "no-results-text"
|
|
4740
|
-
}, [e.error ? h("p", null, [
|
|
4745
|
+
}, [e.error ? h("p", null, [R("查询失败,请检查网络后重试")]) : h("p", null, [R('未找到"'), e.keyword, R('"相关桩号'), h("span", {
|
|
4741
4746
|
class: "no-results-hint"
|
|
4742
|
-
}, [
|
|
4747
|
+
}, [R(",请检查桩号格式后重新输入")])])]), e.error ? h("button", {
|
|
4743
4748
|
type: "button",
|
|
4744
4749
|
class: "no-results-retry",
|
|
4745
4750
|
onClick: () => t("clear")
|
|
4746
|
-
}, [
|
|
4751
|
+
}, [R("清空重试")]) : null])]);
|
|
4747
4752
|
}
|
|
4748
4753
|
});
|
|
4749
4754
|
function Il(e) {
|
|
@@ -4864,7 +4869,7 @@ const Ll = /* @__PURE__ */ Z({
|
|
|
4864
4869
|
size: 14
|
|
4865
4870
|
}, null) : r.value && !e.searchError ? h("div", {
|
|
4866
4871
|
class: "results-count"
|
|
4867
|
-
}, [e.filteredList.length,
|
|
4872
|
+
}, [e.filteredList.length, R("个结果")]) : null
|
|
4868
4873
|
})])]) : null, h(tr, {
|
|
4869
4874
|
to: "body"
|
|
4870
4875
|
}, {
|
|
@@ -4955,7 +4960,7 @@ const Ll = /* @__PURE__ */ Z({
|
|
|
4955
4960
|
onClick: () => r("delete")
|
|
4956
4961
|
}, [h("span", {
|
|
4957
4962
|
class: "txt"
|
|
4958
|
-
}, [
|
|
4963
|
+
}, [R("清除绘制图形")]), h(J, {
|
|
4959
4964
|
name: "clear",
|
|
4960
4965
|
size: 18
|
|
4961
4966
|
}, null)]) : null, h("button", {
|
|
@@ -4968,7 +4973,7 @@ const Ll = /* @__PURE__ */ Z({
|
|
|
4968
4973
|
onClick: () => r("toggle-map-type")
|
|
4969
4974
|
}, [h("span", {
|
|
4970
4975
|
class: "txt"
|
|
4971
|
-
}, [
|
|
4976
|
+
}, [R("切换"), e.mapType === "3d" ? "2D" : "3D", R("地图")]), h(J, {
|
|
4972
4977
|
name: e.mapType,
|
|
4973
4978
|
size: e.mapType === "3d" ? 24 : 22
|
|
4974
4979
|
}, null)]), h("button", {
|
|
@@ -4981,7 +4986,7 @@ const Ll = /* @__PURE__ */ Z({
|
|
|
4981
4986
|
onClick: () => r("toggle-map-view")
|
|
4982
4987
|
}, [h("span", {
|
|
4983
4988
|
class: "txt"
|
|
4984
|
-
}, [
|
|
4989
|
+
}, [R("恢复视图")]), h(J, {
|
|
4985
4990
|
name: "view",
|
|
4986
4991
|
size: 20
|
|
4987
4992
|
}, null)]), e.showBaseSwitch ? h("button", {
|
|
@@ -4994,7 +4999,7 @@ const Ll = /* @__PURE__ */ Z({
|
|
|
4994
4999
|
onClick: () => r("toggle-map-base")
|
|
4995
5000
|
}, [h("span", {
|
|
4996
5001
|
class: "txt"
|
|
4997
|
-
}, [
|
|
5002
|
+
}, [R("切换"), e.mapBase === "bigemap" ? "物探地图" : "生产地图"]), h(J, {
|
|
4998
5003
|
name: "base",
|
|
4999
5004
|
size: 20
|
|
5000
5005
|
}, null)]) : null, h("button", {
|
|
@@ -5117,10 +5122,10 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
5117
5122
|
return;
|
|
5118
5123
|
}
|
|
5119
5124
|
try {
|
|
5120
|
-
const
|
|
5125
|
+
const M = w.Cartographic.fromCartesian(x.camera.position);
|
|
5121
5126
|
i.value = {
|
|
5122
5127
|
text: "3D 视图",
|
|
5123
|
-
detail: `视距 ${kl(
|
|
5128
|
+
detail: `视距 ${kl(M.height)}`
|
|
5124
5129
|
};
|
|
5125
5130
|
} catch {
|
|
5126
5131
|
i.value = {
|
|
@@ -5135,14 +5140,14 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
5135
5140
|
if (y = null, !w) return;
|
|
5136
5141
|
const L = Ue(e.map);
|
|
5137
5142
|
if (!L) return;
|
|
5138
|
-
const
|
|
5139
|
-
if (!
|
|
5140
|
-
const
|
|
5141
|
-
if (!
|
|
5142
|
-
const
|
|
5143
|
-
o.value =
|
|
5143
|
+
const M = A();
|
|
5144
|
+
if (!M) return;
|
|
5145
|
+
const U = L.camera.pickEllipsoid(new M.Cartesian2(w.offsetX, w.offsetY), L.scene.globe.ellipsoid);
|
|
5146
|
+
if (!U) return;
|
|
5147
|
+
const j = M.Cartographic.fromCartesian(U);
|
|
5148
|
+
o.value = M.Math.toDegrees(j.longitude).toFixed(6), a.value = M.Math.toDegrees(j.latitude).toFixed(6);
|
|
5144
5149
|
}));
|
|
5145
|
-
},
|
|
5150
|
+
}, D = () => {
|
|
5146
5151
|
!l.value || !s.value || (u.value = s.value.scrollWidth > l.value.clientWidth + 1);
|
|
5147
5152
|
}, k = () => {
|
|
5148
5153
|
t.value = !t.value;
|
|
@@ -5150,7 +5155,7 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
5150
5155
|
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), k());
|
|
5151
5156
|
};
|
|
5152
5157
|
tn(() => {
|
|
5153
|
-
C(), v(), S(),
|
|
5158
|
+
C(), v(), S(), D(), g.push(window.setInterval(v, Ht)), g.push(window.setInterval(S, Ht)), Ue(e.map)?.scene.canvas.addEventListener("mousemove", P), typeof ResizeObserver < "u" && (b = new ResizeObserver(D), s.value && b.observe(s.value), l.value && b.observe(l.value));
|
|
5154
5159
|
}), K(() => {
|
|
5155
5160
|
cancelAnimationFrame(c), p !== 0 && cancelAnimationFrame(p), y = null, b?.disconnect(), g.forEach((w) => window.clearInterval(w)), Ue(e.map)?.scene.canvas.removeEventListener("mousemove", P);
|
|
5156
5161
|
});
|
|
@@ -5158,38 +5163,38 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
5158
5163
|
class: "map-status__item"
|
|
5159
5164
|
}, [h("span", {
|
|
5160
5165
|
class: "map-status__label"
|
|
5161
|
-
}, [
|
|
5166
|
+
}, [R("FPS")]), h("b", {
|
|
5162
5167
|
class: "map-status__value map-status__value--fps"
|
|
5163
5168
|
}, [n.value])]), h("span", {
|
|
5164
5169
|
class: "map-status__dot",
|
|
5165
5170
|
"aria-hidden": "true"
|
|
5166
|
-
}, [
|
|
5171
|
+
}, [R("·")]), h("span", {
|
|
5167
5172
|
class: "map-status__item"
|
|
5168
5173
|
}, [h("span", {
|
|
5169
5174
|
class: "map-status__label"
|
|
5170
|
-
}, [
|
|
5175
|
+
}, [R("内存")]), h("span", {
|
|
5171
5176
|
class: "map-status__value"
|
|
5172
5177
|
}, [r.value])]), h("span", {
|
|
5173
5178
|
class: "map-status__dot",
|
|
5174
5179
|
"aria-hidden": "true"
|
|
5175
|
-
}, [
|
|
5180
|
+
}, [R("·")]), h("span", {
|
|
5176
5181
|
class: "map-status__item"
|
|
5177
5182
|
}, [h("span", {
|
|
5178
5183
|
class: "map-status__label"
|
|
5179
|
-
}, [
|
|
5184
|
+
}, [R("层级")]), h("span", {
|
|
5180
5185
|
class: "map-status__value"
|
|
5181
5186
|
}, [i.value.text, i.value.detail ? h("em", {
|
|
5182
5187
|
class: "map-status__detail"
|
|
5183
|
-
}, [
|
|
5188
|
+
}, [R(" · "), i.value.detail]) : null])]), h("span", {
|
|
5184
5189
|
class: "map-status__dot",
|
|
5185
5190
|
"aria-hidden": "true"
|
|
5186
|
-
}, [
|
|
5191
|
+
}, [R("·")]), h("span", {
|
|
5187
5192
|
class: "map-status__item"
|
|
5188
5193
|
}, [h("span", {
|
|
5189
5194
|
class: "map-status__label"
|
|
5190
|
-
}, [
|
|
5195
|
+
}, [R("坐标")]), h("span", {
|
|
5191
5196
|
class: "map-status__value map-status__value--coords"
|
|
5192
|
-
}, [o.value,
|
|
5197
|
+
}, [o.value, R(", "), a.value])])], N = z(() => t.value && u.value);
|
|
5193
5198
|
return () => e.visible ? h("div", {
|
|
5194
5199
|
class: ["map-status", t.value ? "is-expanded" : "is-collapsed"],
|
|
5195
5200
|
role: "button",
|
|
@@ -5210,12 +5215,12 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
5210
5215
|
ref: l
|
|
5211
5216
|
}, [h("span", {
|
|
5212
5217
|
class: ["map-status__track", {
|
|
5213
|
-
"is-marquee":
|
|
5218
|
+
"is-marquee": N.value
|
|
5214
5219
|
}]
|
|
5215
5220
|
}, [h("span", {
|
|
5216
5221
|
class: "map-status__track-inner",
|
|
5217
5222
|
ref: s
|
|
5218
|
-
}, [I()]),
|
|
5223
|
+
}, [I()]), N.value ? h("span", {
|
|
5219
5224
|
class: "map-status__track-inner",
|
|
5220
5225
|
"aria-hidden": "true"
|
|
5221
5226
|
}, [I()]) : null])])])]) : null;
|
|
@@ -5249,9 +5254,9 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
5249
5254
|
theme: e.theme,
|
|
5250
5255
|
popupConfig: e.popupConfig
|
|
5251
5256
|
}), o = el(i, {
|
|
5252
|
-
emit: (
|
|
5257
|
+
emit: (M, ...U) => t(M, ...U),
|
|
5253
5258
|
expose: n,
|
|
5254
|
-
onPointClick: (
|
|
5259
|
+
onPointClick: (M) => t("point-click", M)
|
|
5255
5260
|
});
|
|
5256
5261
|
await o.init().catch(() => {
|
|
5257
5262
|
});
|
|
@@ -5272,11 +5277,11 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
5272
5277
|
showSearch: v,
|
|
5273
5278
|
search: S,
|
|
5274
5279
|
onDelete: P,
|
|
5275
|
-
handleStartDrawing:
|
|
5280
|
+
handleStartDrawing: D,
|
|
5276
5281
|
toggleMapType: k,
|
|
5277
5282
|
resetView: E,
|
|
5278
5283
|
toggleMapBaseLayer: I,
|
|
5279
|
-
setMapNameVisible:
|
|
5284
|
+
setMapNameVisible: N,
|
|
5280
5285
|
setContourVisible: x,
|
|
5281
5286
|
contourVisible: w,
|
|
5282
5287
|
map: L
|
|
@@ -5311,11 +5316,11 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
5311
5316
|
"onSearch-close": () => {
|
|
5312
5317
|
S.showResults.value = !1;
|
|
5313
5318
|
},
|
|
5314
|
-
"onSearch-navigate": (
|
|
5319
|
+
"onSearch-navigate": (M) => S.moveHighlight(M),
|
|
5315
5320
|
"onSearch-select": () => S.selectHighlighted(),
|
|
5316
5321
|
"onResult-click": S.handleResultClick,
|
|
5317
|
-
"onResult-hover": (
|
|
5318
|
-
S.highlightIndex.value =
|
|
5322
|
+
"onResult-hover": (M) => {
|
|
5323
|
+
S.highlightIndex.value = M;
|
|
5319
5324
|
},
|
|
5320
5325
|
"onResult-leave": () => {
|
|
5321
5326
|
S.highlightIndex.value = -1;
|
|
@@ -5335,9 +5340,9 @@ const Pl = /* @__PURE__ */ Z({
|
|
|
5335
5340
|
"onToggle-map-type": k,
|
|
5336
5341
|
"onToggle-map-base": I,
|
|
5337
5342
|
"onToggle-map-view": E,
|
|
5338
|
-
"onToggle-map-name": (
|
|
5343
|
+
"onToggle-map-name": (M) => N(M),
|
|
5339
5344
|
"onToggle-contour": () => x(!w.value),
|
|
5340
|
-
"onStart-drawing":
|
|
5345
|
+
"onStart-drawing": D
|
|
5341
5346
|
}, null) : null, r.default ? r.default() : null]);
|
|
5342
5347
|
}
|
|
5343
5348
|
}), Rl = Object.fromEntries(An.map((e) => [e, {
|
|
@@ -5995,7 +6000,7 @@ export {
|
|
|
5995
6000
|
ur as DEFAULT_TRAJECTORY_CONFIG,
|
|
5996
6001
|
Zl as ErrorCode,
|
|
5997
6002
|
nn as EventBus,
|
|
5998
|
-
|
|
6003
|
+
re as GEOMETRY_CONFIG,
|
|
5999
6004
|
_n as GameLoading,
|
|
6000
6005
|
kn as ICON_MAP,
|
|
6001
6006
|
te as IconManager,
|