bigmap-plugin 1.0.4 → 1.0.5
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 +5 -1
- package/dist/bigmap-plugin.js +648 -633
- package/dist/bigmap-plugin.umd.cjs +9 -9
- package/dist/index.d.ts +33 -1
- package/package.json +1 -1
package/dist/bigmap-plugin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as T, shallowRef as we, onBeforeUnmount as
|
|
1
|
+
import { ref as T, shallowRef as we, onBeforeUnmount as xn, onUnmounted as G, isRef as Qe, watch as Ye, computed as R, defineComponent as U, createVNode as f, createTextVNode as L, useSlots as An, mergeProps as qe, onMounted as Ft, Teleport as Ln, Fragment as kn, Suspense as _n } from "vue";
|
|
2
2
|
const ct = {
|
|
3
3
|
debug: 10,
|
|
4
4
|
info: 20,
|
|
@@ -6,7 +6,7 @@ const ct = {
|
|
|
6
6
|
error: 40,
|
|
7
7
|
silent: Number.POSITIVE_INFINITY
|
|
8
8
|
}, Me = "[sems-map]";
|
|
9
|
-
function
|
|
9
|
+
function Pn() {
|
|
10
10
|
try {
|
|
11
11
|
const e = typeof process < "u" ? process.env : void 0;
|
|
12
12
|
if (e && e.NODE_ENV === "production") return "warn";
|
|
@@ -14,11 +14,11 @@ function _n() {
|
|
|
14
14
|
}
|
|
15
15
|
return "debug";
|
|
16
16
|
}
|
|
17
|
-
let et =
|
|
18
|
-
function
|
|
17
|
+
let et = Pn();
|
|
18
|
+
function Ko(e) {
|
|
19
19
|
et = e;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Xo() {
|
|
22
22
|
return et;
|
|
23
23
|
}
|
|
24
24
|
function Ie(e) {
|
|
@@ -116,7 +116,7 @@ class Nt {
|
|
|
116
116
|
}));
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
const
|
|
119
|
+
const Zo = new Nt(), Ce = /* @__PURE__ */ new Map();
|
|
120
120
|
function ee(e) {
|
|
121
121
|
Ce.set(e.type, e);
|
|
122
122
|
}
|
|
@@ -231,22 +231,22 @@ ee({
|
|
|
231
231
|
material: t.fill
|
|
232
232
|
})
|
|
233
233
|
});
|
|
234
|
-
function
|
|
234
|
+
function Jo(e) {
|
|
235
235
|
Ce.set(e.type, e);
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Bn(e) {
|
|
238
238
|
return Ce.get(e);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Rn() {
|
|
241
241
|
return [...Ce.values()];
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function zn() {
|
|
244
244
|
return [...Ce.values()].filter((e) => e.inDefaultToolbar !== !1).sort(
|
|
245
245
|
(e, t) => (e.toolbarOrder ?? Number.MAX_SAFE_INTEGER) - (t.toolbarOrder ?? Number.MAX_SAFE_INTEGER)
|
|
246
246
|
);
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
return
|
|
248
|
+
function Fn() {
|
|
249
|
+
return zn().map((e) => ({
|
|
250
250
|
icon: e.type,
|
|
251
251
|
name: e.name,
|
|
252
252
|
size: e.defaultSize
|
|
@@ -276,10 +276,10 @@ const tt = "/libs", ye = {
|
|
|
276
276
|
DEBOUNCE_DELAY: 300,
|
|
277
277
|
/** 点位网格索引的网格尺寸(经纬度) */
|
|
278
278
|
GRID_SIZE: 0.1
|
|
279
|
-
}, Vt =
|
|
279
|
+
}, Vt = Fn(), Ot = ["bigemap.dc-satellite", "bigemap.dc-street"], Nn = {
|
|
280
280
|
spacing: 150,
|
|
281
281
|
width: 2
|
|
282
|
-
},
|
|
282
|
+
}, Vn = {
|
|
283
283
|
autoPlay: !1,
|
|
284
284
|
speed: 1,
|
|
285
285
|
loop: !1,
|
|
@@ -294,7 +294,7 @@ const tt = "/libs", ye = {
|
|
|
294
294
|
lineColor: "#0a84ff",
|
|
295
295
|
lineWidth: 4,
|
|
296
296
|
maxPoints: 2e4
|
|
297
|
-
},
|
|
297
|
+
}, On = {
|
|
298
298
|
fillColor: "#000000",
|
|
299
299
|
fillAlpha: 0.8,
|
|
300
300
|
outlineColor: "#44d5ff",
|
|
@@ -302,7 +302,7 @@ const tt = "/libs", ye = {
|
|
|
302
302
|
outlineWidth: 4,
|
|
303
303
|
showOutline: !0
|
|
304
304
|
// outerRing: 默认不指定,运行时按保留区域边界自动外扩推导(避开"整环球"劣化三角剖分无法渲染)
|
|
305
|
-
},
|
|
305
|
+
}, $t = {
|
|
306
306
|
containerId: "bigmap-container",
|
|
307
307
|
// serverUrl 由使用方传入(地图资源/瓦片服务地址),插件核心不再内置默认地址
|
|
308
308
|
libsUrl: tt,
|
|
@@ -310,6 +310,7 @@ const tt = "/libs", ye = {
|
|
|
310
310
|
position: ye,
|
|
311
311
|
mapId: "bigemap.cebjohn0",
|
|
312
312
|
terrainId: "bigemap.dc-terrain",
|
|
313
|
+
baseLayers: Ot,
|
|
313
314
|
// ---------------- UI / 功能默认值 ----------------
|
|
314
315
|
showSearch: !1,
|
|
315
316
|
showControls: !0,
|
|
@@ -326,7 +327,7 @@ const tt = "/libs", ye = {
|
|
|
326
327
|
CAMERA_FOV_DEGREES: 60,
|
|
327
328
|
/** 相机最小高度(m) */
|
|
328
329
|
MIN_CAMERA_HEIGHT: 1e3
|
|
329
|
-
},
|
|
330
|
+
}, $n = 500, Gn = 800, Wn = 200, Un = 900, Hn = 1e4, jn = 100, Yn = 1e3, Gt = {
|
|
330
331
|
/** 近处可见距离(m),同时作为 disableDepthTestDistance:近距图标不穿地 */
|
|
331
332
|
NEAR: 3e3,
|
|
332
333
|
/** 近处缩放值 */
|
|
@@ -335,7 +336,7 @@ const tt = "/libs", ye = {
|
|
|
335
336
|
FAR: 1e5,
|
|
336
337
|
/** 远处缩放值 */
|
|
337
338
|
FAR_VALUE: 0.1
|
|
338
|
-
},
|
|
339
|
+
}, qn = 6, Kn = 1001, $ = {
|
|
339
340
|
1: { color: "#9E9E9E", text: "未发布" },
|
|
340
341
|
2: { color: "#2196F3", text: "已发布" },
|
|
341
342
|
3: { color: "#FF9800", text: "未完成" },
|
|
@@ -350,8 +351,8 @@ const tt = "/libs", ye = {
|
|
|
350
351
|
12: { color: "#673AB7", text: "已变观" },
|
|
351
352
|
13: { color: "#607D8B", text: "任务终止" },
|
|
352
353
|
default: { color: "#2196F3", text: "未知状态" }
|
|
353
|
-
},
|
|
354
|
-
function
|
|
354
|
+
}, Qo = (e) => $[e] || $.default;
|
|
355
|
+
function Xn(e) {
|
|
355
356
|
if (!e) return {};
|
|
356
357
|
const t = {};
|
|
357
358
|
for (const n of Object.keys(e)) {
|
|
@@ -361,17 +362,17 @@ function Kn(e) {
|
|
|
361
362
|
return t;
|
|
362
363
|
}
|
|
363
364
|
function Ke(...e) {
|
|
364
|
-
const t = {
|
|
365
|
+
const t = { ...$t };
|
|
365
366
|
for (const n of e) {
|
|
366
|
-
const r =
|
|
367
|
+
const r = Xn(n);
|
|
367
368
|
Object.assign(t, r), r.geoserver && (t.geoserver = { ...t.geoserver || {}, ...r.geoserver });
|
|
368
369
|
}
|
|
369
370
|
return t;
|
|
370
371
|
}
|
|
371
|
-
function
|
|
372
|
+
function Zn(e, t) {
|
|
372
373
|
return Ke(e, t);
|
|
373
374
|
}
|
|
374
|
-
class
|
|
375
|
+
class Jn {
|
|
375
376
|
constructor(t) {
|
|
376
377
|
this.config = Ke(t);
|
|
377
378
|
}
|
|
@@ -403,10 +404,10 @@ class Zn {
|
|
|
403
404
|
* 重置为默认配置
|
|
404
405
|
*/
|
|
405
406
|
reset() {
|
|
406
|
-
this.config = {
|
|
407
|
+
this.config = { ...$t };
|
|
407
408
|
}
|
|
408
409
|
}
|
|
409
|
-
class
|
|
410
|
+
class Qn {
|
|
410
411
|
constructor() {
|
|
411
412
|
this.resources = /* @__PURE__ */ new Set();
|
|
412
413
|
}
|
|
@@ -445,7 +446,7 @@ class Jn {
|
|
|
445
446
|
return this.resources.size;
|
|
446
447
|
}
|
|
447
448
|
}
|
|
448
|
-
function
|
|
449
|
+
function er(e) {
|
|
449
450
|
return {
|
|
450
451
|
isReady: !1,
|
|
451
452
|
isLoading: !1,
|
|
@@ -455,13 +456,13 @@ function Qn(e) {
|
|
|
455
456
|
error: null
|
|
456
457
|
};
|
|
457
458
|
}
|
|
458
|
-
function
|
|
459
|
+
function tr(e) {
|
|
459
460
|
return {
|
|
460
|
-
configManager: new
|
|
461
|
+
configManager: new Jn(e),
|
|
461
462
|
eventBus: new Nt(),
|
|
462
|
-
resourceManager: new
|
|
463
|
+
resourceManager: new Qn(),
|
|
463
464
|
map: we(null),
|
|
464
|
-
state: T(
|
|
465
|
+
state: T(er(e.mapType || "3d")),
|
|
465
466
|
cancelled: { value: !1 },
|
|
466
467
|
destroyed: { value: !1 },
|
|
467
468
|
initializing: { value: !1 }
|
|
@@ -528,7 +529,7 @@ function ht(e, t, n) {
|
|
|
528
529
|
return e.path;
|
|
529
530
|
}
|
|
530
531
|
const xe = 3e4;
|
|
531
|
-
class
|
|
532
|
+
class nr {
|
|
532
533
|
constructor() {
|
|
533
534
|
this.loaded = /* @__PURE__ */ new Set(), this.pending = /* @__PURE__ */ new Map();
|
|
534
535
|
}
|
|
@@ -617,9 +618,9 @@ class tr {
|
|
|
617
618
|
this.loaded.clear(), this.pending.clear();
|
|
618
619
|
}
|
|
619
620
|
}
|
|
620
|
-
const
|
|
621
|
+
const Wt = new nr();
|
|
621
622
|
let pe = null;
|
|
622
|
-
function
|
|
623
|
+
function rr(e) {
|
|
623
624
|
pe = e;
|
|
624
625
|
}
|
|
625
626
|
function D() {
|
|
@@ -631,7 +632,7 @@ function P() {
|
|
|
631
632
|
throw new Error("bmgl 库未就绪:请确保地图初始化完成后再调用该能力");
|
|
632
633
|
return e;
|
|
633
634
|
}
|
|
634
|
-
async function
|
|
635
|
+
async function ir(e = 3e3) {
|
|
635
636
|
const t = D();
|
|
636
637
|
return t || new Promise((n, r) => {
|
|
637
638
|
const i = Date.now(), a = setInterval(() => {
|
|
@@ -708,22 +709,22 @@ class oe {
|
|
|
708
709
|
}
|
|
709
710
|
}
|
|
710
711
|
const _e = oe.getInstance();
|
|
711
|
-
function
|
|
712
|
+
function ar(e, t = 3e3) {
|
|
712
713
|
return new Promise((n, r) => {
|
|
713
714
|
const i = Date.now(), a = setInterval(() => {
|
|
714
715
|
document.getElementById(e) ? (clearInterval(a), n()) : Date.now() - i > t && (clearInterval(a), r(new Error(`容器未找到: ${e}`)));
|
|
715
716
|
}, 16);
|
|
716
717
|
});
|
|
717
718
|
}
|
|
718
|
-
async function
|
|
719
|
+
async function or(e) {
|
|
719
720
|
const t = e.configManager.get("containerId");
|
|
720
721
|
if (!t) throw new Error("容器ID未定义");
|
|
721
|
-
return await
|
|
722
|
+
return await ar(t), t;
|
|
722
723
|
}
|
|
723
|
-
async function
|
|
724
|
+
async function lr(e) {
|
|
724
725
|
const t = e.configManager.get("serverUrl"), n = e.configManager.get("accessToken"), r = e.configManager.get("libsUrl"), i = e.configManager.get("extraLibs");
|
|
725
726
|
try {
|
|
726
|
-
await
|
|
727
|
+
await Wt.loadScripts(
|
|
727
728
|
["bigemap-3d", "bmgl-plot", "circle-wave"],
|
|
728
729
|
t,
|
|
729
730
|
r,
|
|
@@ -737,12 +738,12 @@ async function or(e) {
|
|
|
737
738
|
}
|
|
738
739
|
const a = D();
|
|
739
740
|
if (!a) throw new Error("BMGL 库加载失败");
|
|
740
|
-
|
|
741
|
+
rr(a), a.Config.HTTP_URL = t, n && (console.log("accessToken", n), a.Config.accessToken = n), sr(a);
|
|
741
742
|
}
|
|
742
|
-
function
|
|
743
|
+
function sr(e) {
|
|
743
744
|
e.RequestScheduler && (e.RequestScheduler.maximumRequests = 120, e.RequestScheduler.maximumRequestsPerServer = 18);
|
|
744
745
|
}
|
|
745
|
-
function
|
|
746
|
+
function cr(e) {
|
|
746
747
|
const t = D(), n = e.configManager.get("containerId");
|
|
747
748
|
if (!t || !n)
|
|
748
749
|
throw new Error("地图实例创建失败:BMGL 库或容器 ID 未就绪");
|
|
@@ -753,14 +754,14 @@ function sr(e) {
|
|
|
753
754
|
selectionIndicator: !1,
|
|
754
755
|
infoBox: !1
|
|
755
756
|
});
|
|
756
|
-
return
|
|
757
|
+
return ur(r, e.state.value.mapType), r;
|
|
757
758
|
}
|
|
758
|
-
function
|
|
759
|
+
function ur(e, t) {
|
|
759
760
|
t === "3d" && (e.scene.globe.depthTestAgainstTerrain = !0);
|
|
760
761
|
const n = e.scene, r = e.scene.globe;
|
|
761
762
|
n.preloadFlightDestinations = !0, r.tileCacheSize = 1e3, r.preloadAncestors = !0, r.preloadSiblings = !0, r.maximumScreenSpaceError = 1.5;
|
|
762
763
|
}
|
|
763
|
-
async function
|
|
764
|
+
async function dr(e, t, n) {
|
|
764
765
|
if (_e.has(n))
|
|
765
766
|
try {
|
|
766
767
|
await _e.unregister(n);
|
|
@@ -769,41 +770,41 @@ async function ur(e, t, n) {
|
|
|
769
770
|
}
|
|
770
771
|
_e.register(n, t, e.eventBus, e.resourceManager);
|
|
771
772
|
}
|
|
772
|
-
function
|
|
773
|
+
function Ut(e) {
|
|
773
774
|
return typeof e == "number" && !Number.isNaN(e) ? e : 1e4;
|
|
774
775
|
}
|
|
775
|
-
function
|
|
776
|
+
function Ht(e, t, n) {
|
|
776
777
|
const r = D();
|
|
777
778
|
if (!r) throw new Error("BMGL 库未加载,无法构造相机目标位置");
|
|
778
779
|
return r.Cartesian3.fromDegrees(e, t, n);
|
|
779
780
|
}
|
|
780
|
-
function
|
|
781
|
+
function jt() {
|
|
781
782
|
return {
|
|
782
783
|
heading: Oe.heading,
|
|
783
784
|
pitch: Oe.pitch,
|
|
784
785
|
roll: Oe.roll
|
|
785
786
|
};
|
|
786
787
|
}
|
|
787
|
-
function
|
|
788
|
+
function fr(e) {
|
|
788
789
|
const t = e.configManager.get("position");
|
|
789
790
|
t && e.map.value?.camera.flyTo({
|
|
790
|
-
destination:
|
|
791
|
+
destination: Ht(
|
|
791
792
|
t.lng,
|
|
792
793
|
t.lat,
|
|
793
|
-
|
|
794
|
+
Ut(t.height)
|
|
794
795
|
),
|
|
795
|
-
orientation:
|
|
796
|
+
orientation: jt(),
|
|
796
797
|
duration: nt.FLY_TO
|
|
797
798
|
});
|
|
798
799
|
}
|
|
799
|
-
function
|
|
800
|
+
function hr(e, t, n, r) {
|
|
800
801
|
e.map.value && e.map.value.camera.flyTo({
|
|
801
|
-
destination:
|
|
802
|
-
orientation:
|
|
802
|
+
destination: Ht(t, n, Ut(r)),
|
|
803
|
+
orientation: jt(),
|
|
803
804
|
duration: nt.FLY_TO
|
|
804
805
|
});
|
|
805
806
|
}
|
|
806
|
-
function
|
|
807
|
+
function gr(e) {
|
|
807
808
|
const t = D();
|
|
808
809
|
if (!e.map.value || !t) return null;
|
|
809
810
|
const n = e.map.value.camera.computeViewRectangle();
|
|
@@ -812,9 +813,9 @@ function hr(e) {
|
|
|
812
813
|
maxx: t.Math.toDegrees(n.east),
|
|
813
814
|
miny: t.Math.toDegrees(n.south),
|
|
814
815
|
maxy: t.Math.toDegrees(n.north)
|
|
815
|
-
} :
|
|
816
|
+
} : pr(e);
|
|
816
817
|
}
|
|
817
|
-
function
|
|
818
|
+
function pr(e) {
|
|
818
819
|
const t = D();
|
|
819
820
|
if (!t) return null;
|
|
820
821
|
const n = e.map.value, r = n.scene.globe.ellipsoid;
|
|
@@ -838,14 +839,14 @@ function gr(e) {
|
|
|
838
839
|
return null;
|
|
839
840
|
}
|
|
840
841
|
}
|
|
841
|
-
function
|
|
842
|
+
function mr(e) {
|
|
842
843
|
return e.initializing.value || !!e.map.value || e.destroyed.value;
|
|
843
844
|
}
|
|
844
|
-
async function
|
|
845
|
-
if (!
|
|
845
|
+
async function vr(e) {
|
|
846
|
+
if (!mr(e)) {
|
|
846
847
|
e.cancelled.value = !1, e.initializing.value = !0, e.state.value.isLoading = !0, e.state.value.error = null;
|
|
847
848
|
try {
|
|
848
|
-
await
|
|
849
|
+
await wr(e);
|
|
849
850
|
} catch (t) {
|
|
850
851
|
throw e.state.value.error = t instanceof Error ? t : new Error(String(t)), await e.eventBus.emit("map:error", t), t;
|
|
851
852
|
} finally {
|
|
@@ -853,17 +854,17 @@ async function mr(e) {
|
|
|
853
854
|
}
|
|
854
855
|
}
|
|
855
856
|
}
|
|
856
|
-
async function
|
|
857
|
-
const t = await
|
|
858
|
-
if (await
|
|
859
|
-
const n =
|
|
857
|
+
async function wr(e) {
|
|
858
|
+
const t = await or(e);
|
|
859
|
+
if (await lr(e), e.cancelled.value) return;
|
|
860
|
+
const n = cr(e);
|
|
860
861
|
if (e.cancelled.value) {
|
|
861
|
-
|
|
862
|
+
yr(n);
|
|
862
863
|
return;
|
|
863
864
|
}
|
|
864
|
-
e.map.value = n, await
|
|
865
|
+
e.map.value = n, await dr(e, n, t), await fr(e), !e.cancelled.value && (e.state.value.isReady = !0, await e.eventBus.emit("map:ready"));
|
|
865
866
|
}
|
|
866
|
-
function
|
|
867
|
+
function yr(e) {
|
|
867
868
|
try {
|
|
868
869
|
e.destroy();
|
|
869
870
|
} catch (t) {
|
|
@@ -880,7 +881,7 @@ async function gt(e) {
|
|
|
880
881
|
m.error("[useMap] 销毁地图失败:", n);
|
|
881
882
|
}
|
|
882
883
|
}
|
|
883
|
-
function
|
|
884
|
+
function Yt(e, t, n) {
|
|
884
885
|
const r = D();
|
|
885
886
|
if (!r) throw new Error("BMGL 库未加载,无法构造目标视角");
|
|
886
887
|
return {
|
|
@@ -888,7 +889,7 @@ function jt(e, t, n) {
|
|
|
888
889
|
orientation: { heading: 0, pitch: r.Math.toRadians(-90), roll: 0 }
|
|
889
890
|
};
|
|
890
891
|
}
|
|
891
|
-
function
|
|
892
|
+
function Cr(e) {
|
|
892
893
|
const t = e.map.value;
|
|
893
894
|
if (!(!t || !e.state.value.isReady || e.state.value.mapType === "2d"))
|
|
894
895
|
try {
|
|
@@ -896,7 +897,7 @@ function yr(e) {
|
|
|
896
897
|
if (!n) throw new Error("BMGL 库未加载,无法切换 2D 模式");
|
|
897
898
|
const r = n.Cartographic.fromCartesian(t.camera.position);
|
|
898
899
|
t.scene.morphTo2D?.(0), e.state.value.mapType = "2d", e.eventBus.emit("map:mode-changed", "2d"), t.camera.setView(
|
|
899
|
-
|
|
900
|
+
Yt(
|
|
900
901
|
n.Math.toDegrees(r.longitude),
|
|
901
902
|
n.Math.toDegrees(r.latitude),
|
|
902
903
|
r.height
|
|
@@ -906,14 +907,14 @@ function yr(e) {
|
|
|
906
907
|
m.error("切换到2D模式失败:", n);
|
|
907
908
|
}
|
|
908
909
|
}
|
|
909
|
-
function
|
|
910
|
+
function br(e) {
|
|
910
911
|
const t = D();
|
|
911
912
|
if (!t) throw new Error("BMGL 库未加载,无法计算 3D 目标视图");
|
|
912
913
|
const n = t.Cartographic.fromCartesian(e.map.value.camera.position), r = {
|
|
913
914
|
lng: t.Math.toDegrees(n.longitude),
|
|
914
915
|
lat: t.Math.toDegrees(n.latitude),
|
|
915
916
|
height: Math.max(n.height, 1e4)
|
|
916
|
-
}, i =
|
|
917
|
+
}, i = gr(e);
|
|
917
918
|
if (!i) return r;
|
|
918
919
|
const a = (i.minx + i.maxx) / 2, o = (i.miny + i.maxy) / 2, l = (i.maxx - i.minx) * Math.cos(o * Math.PI / 180) * Q.METERS_PER_DEGREE_LAT_APPROX, c = (i.maxy - i.miny) * Q.METERS_PER_DEGREE_LAT_APPROX, u = Math.max(l, c), s = t.Math.toRadians(Q.CAMERA_FOV_DEGREES), d = Math.max(
|
|
919
920
|
u / (2 * Math.tan(s / 2)),
|
|
@@ -921,33 +922,33 @@ function Cr(e) {
|
|
|
921
922
|
);
|
|
922
923
|
return { lng: a, lat: o, height: d };
|
|
923
924
|
}
|
|
924
|
-
function
|
|
925
|
+
function Er(e) {
|
|
925
926
|
const t = e.map.value;
|
|
926
927
|
if (!(!t || !e.state.value.isReady || e.state.value.mapType === "3d"))
|
|
927
928
|
try {
|
|
928
|
-
const n =
|
|
929
|
+
const n = br(e);
|
|
929
930
|
t.scene.morphTo3D?.(0), e.state.value.mapType = "3d", e.eventBus.emit("map:mode-changed", "3d"), setTimeout(() => {
|
|
930
931
|
e.map.value && e.map.value.camera.setView(
|
|
931
|
-
|
|
932
|
+
Yt(n.lng, n.lat, n.height)
|
|
932
933
|
);
|
|
933
934
|
}, Gn);
|
|
934
935
|
} catch (n) {
|
|
935
936
|
m.error("切换到3D模式失败:", n);
|
|
936
937
|
}
|
|
937
938
|
}
|
|
938
|
-
function Er(e) {
|
|
939
|
-
e.state.value.mapType === "2d" ? br(e) : yr(e);
|
|
940
|
-
}
|
|
941
939
|
function Sr(e) {
|
|
942
|
-
|
|
943
|
-
|
|
940
|
+
e.state.value.mapType === "2d" ? Er(e) : Cr(e);
|
|
941
|
+
}
|
|
942
|
+
function Dr(e) {
|
|
943
|
+
const t = tr(e), n = (i, a, o) => hr(t, i, a, o), r = () => Sr(t);
|
|
944
|
+
return xn(() => {
|
|
944
945
|
gt(t);
|
|
945
946
|
}), {
|
|
946
947
|
// 状态
|
|
947
948
|
map: t.map,
|
|
948
949
|
state: t.state,
|
|
949
950
|
// 方法
|
|
950
|
-
initMap: () =>
|
|
951
|
+
initMap: () => vr(t),
|
|
951
952
|
setView: n,
|
|
952
953
|
toggleMapType: r,
|
|
953
954
|
destroy: () => gt(t),
|
|
@@ -958,7 +959,7 @@ function Sr(e) {
|
|
|
958
959
|
emit: t.eventBus.emit.bind(t.eventBus)
|
|
959
960
|
};
|
|
960
961
|
}
|
|
961
|
-
function
|
|
962
|
+
function Tr(e) {
|
|
962
963
|
return {
|
|
963
964
|
billboardCollection: null,
|
|
964
965
|
billboardMap: /* @__PURE__ */ new Map(),
|
|
@@ -969,27 +970,27 @@ function Dr(e) {
|
|
|
969
970
|
scaleByDistance: null
|
|
970
971
|
};
|
|
971
972
|
}
|
|
972
|
-
function
|
|
973
|
+
function qt(e, t, n) {
|
|
973
974
|
const r = Math.floor(t / e), i = Math.floor(n / e);
|
|
974
975
|
return `${r},${i}`;
|
|
975
976
|
}
|
|
976
977
|
function pt(e, t) {
|
|
977
|
-
const n =
|
|
978
|
+
const n = qt(e.gridSize, t.lng, t.lat), r = e.gridIndex?.get(n);
|
|
978
979
|
r ? r.push(t) : e.gridIndex?.set(n, [t]);
|
|
979
980
|
}
|
|
980
981
|
function mt(e, t) {
|
|
981
982
|
if (!e.gridIndex) return;
|
|
982
|
-
const n =
|
|
983
|
+
const n = qt(e.gridSize, t.lng, t.lat), r = e.gridIndex.get(n);
|
|
983
984
|
if (!r) return;
|
|
984
985
|
const i = r.indexOf(t);
|
|
985
986
|
i > -1 && r.splice(i, 1), r.length === 0 && e.gridIndex.delete(n);
|
|
986
987
|
}
|
|
987
|
-
const
|
|
988
|
-
function
|
|
988
|
+
const Mr = 1e5;
|
|
989
|
+
function Ir(e, t) {
|
|
989
990
|
const n = [];
|
|
990
991
|
if (!e.gridIndex) return n;
|
|
991
992
|
const r = Math.floor(t.west / e.gridSize), i = Math.floor(t.south / e.gridSize), a = Math.floor(t.east / e.gridSize), o = Math.floor(t.north / e.gridSize), l = (a - r + 1) * (o - i + 1), c = (u) => u.lng >= t.west && u.lng <= t.east && u.lat >= t.south && u.lat <= t.north;
|
|
992
|
-
if (l >
|
|
993
|
+
if (l > Mr) {
|
|
993
994
|
for (const u of e.pointDataCache)
|
|
994
995
|
c(u) && n.push(u);
|
|
995
996
|
return n;
|
|
@@ -1002,13 +1003,13 @@ function Mr(e, t) {
|
|
|
1002
1003
|
}
|
|
1003
1004
|
return n;
|
|
1004
1005
|
}
|
|
1005
|
-
function
|
|
1006
|
+
function xr(e) {
|
|
1006
1007
|
let t = 1 / 0, n = 1 / 0, r = -1 / 0, i = -1 / 0;
|
|
1007
1008
|
for (const [a, o] of e)
|
|
1008
1009
|
a < t && (t = a), o < n && (n = o), a > r && (r = a), o > i && (i = o);
|
|
1009
1010
|
return { west: t, south: n, east: r, north: i };
|
|
1010
1011
|
}
|
|
1011
|
-
function
|
|
1012
|
+
function Ar(e) {
|
|
1012
1013
|
const [t, n] = e.center, r = e.radius / (Q.METERS_PER_DEGREE_LAT * Math.cos(n * Math.PI / 180)), i = e.radius / Q.METERS_PER_DEGREE_LAT;
|
|
1013
1014
|
return {
|
|
1014
1015
|
west: t - r,
|
|
@@ -1017,8 +1018,8 @@ function xr(e) {
|
|
|
1017
1018
|
north: n + i
|
|
1018
1019
|
};
|
|
1019
1020
|
}
|
|
1020
|
-
function
|
|
1021
|
-
return e.type === "circle" ?
|
|
1021
|
+
function Lr(e) {
|
|
1022
|
+
return e.type === "circle" ? Ar(e) : xr(e.coordinates);
|
|
1022
1023
|
}
|
|
1023
1024
|
function kr(e, t) {
|
|
1024
1025
|
const [n, r] = e;
|
|
@@ -1029,20 +1030,20 @@ function kr(e, t) {
|
|
|
1029
1030
|
}
|
|
1030
1031
|
return i;
|
|
1031
1032
|
}
|
|
1032
|
-
function
|
|
1033
|
+
function _r(e, t) {
|
|
1033
1034
|
const [n, r] = t.center, i = t.radius * t.radius, a = (e.lng - n) * Q.METERS_PER_DEGREE_LAT * Math.cos(r * Math.PI / 180), o = (e.lat - r) * Q.METERS_PER_DEGREE_LAT;
|
|
1034
1035
|
return a * a + o * o <= i;
|
|
1035
1036
|
}
|
|
1036
|
-
function _r(e, t) {
|
|
1037
|
-
return t.type === "circle" ? e.filter((n) => Lr(n, t)) : t.type === "polygon" || t.type === "triangle" ? e.filter((n) => kr([n.lng, n.lat], t.coordinates)) : e;
|
|
1038
|
-
}
|
|
1039
1037
|
function Pr(e, t) {
|
|
1040
|
-
|
|
1041
|
-
const n = Ar(t);
|
|
1042
|
-
let r = Mr(e, n);
|
|
1043
|
-
return t.type !== "rectangle" && (r = _r(r, t)), r;
|
|
1038
|
+
return t.type === "circle" ? e.filter((n) => _r(n, t)) : t.type === "polygon" || t.type === "triangle" ? e.filter((n) => kr([n.lng, n.lat], t.coordinates)) : e;
|
|
1044
1039
|
}
|
|
1045
1040
|
function Br(e, t) {
|
|
1041
|
+
if (!e.gridIndex || e.pointDataCache.length === 0) return [];
|
|
1042
|
+
const n = Lr(t);
|
|
1043
|
+
let r = Ir(e, n);
|
|
1044
|
+
return t.type !== "rectangle" && (r = Pr(r, t)), r;
|
|
1045
|
+
}
|
|
1046
|
+
function Rr(e, t) {
|
|
1046
1047
|
const { field: n, keyword: r, limit: i = 10, caseSensitive: a = !1 } = t, o = a ? r.trim() : r.trim().toLowerCase(), l = Array.isArray(n) ? n : [n], c = [];
|
|
1047
1048
|
for (const u of e.pointDataCache)
|
|
1048
1049
|
if (l.some((d) => {
|
|
@@ -1052,25 +1053,25 @@ function Br(e, t) {
|
|
|
1052
1053
|
break;
|
|
1053
1054
|
return c;
|
|
1054
1055
|
}
|
|
1055
|
-
const
|
|
1056
|
+
const zr = {
|
|
1056
1057
|
lng: "lng",
|
|
1057
1058
|
lat: "lat",
|
|
1058
1059
|
altitude: "altitude",
|
|
1059
1060
|
id: "id"
|
|
1060
1061
|
};
|
|
1061
1062
|
let vt = 0, wt = !1, yt = !1;
|
|
1062
|
-
function
|
|
1063
|
+
function Fr() {
|
|
1063
1064
|
return wt || (wt = !0, m.warn(
|
|
1064
1065
|
"[useMapPoint] 检测到未提供 id 的点位,已启用自增 id 自动生成;建议通过 fieldMapping.id 提供稳定 id 以支持 updatePoints 精确定位"
|
|
1065
1066
|
)), vt += 1, `__auto_${vt}`;
|
|
1066
1067
|
}
|
|
1067
|
-
function
|
|
1068
|
+
function Nr() {
|
|
1068
1069
|
return typeof MessageChannel < "u" ? new Promise((e) => {
|
|
1069
1070
|
const t = new MessageChannel();
|
|
1070
1071
|
t.port1.onmessage = () => e(), t.port2.postMessage(0);
|
|
1071
1072
|
}) : new Promise((e) => setTimeout(e, 0));
|
|
1072
1073
|
}
|
|
1073
|
-
function
|
|
1074
|
+
function Vr(e, t) {
|
|
1074
1075
|
if (!t.scaleByDistance) {
|
|
1075
1076
|
const n = Gt;
|
|
1076
1077
|
t.scaleByDistance = new e.NearFarScalar(
|
|
@@ -1082,8 +1083,8 @@ function Nr(e, t) {
|
|
|
1082
1083
|
}
|
|
1083
1084
|
return t.scaleByDistance;
|
|
1084
1085
|
}
|
|
1085
|
-
function
|
|
1086
|
-
const t =
|
|
1086
|
+
function Or(e) {
|
|
1087
|
+
const t = Tr(me.GRID_SIZE), n = async () => {
|
|
1087
1088
|
if (!t.billboardCollection && e.value) {
|
|
1088
1089
|
const u = D();
|
|
1089
1090
|
u && (t.billboardCollection = e.value.scene.primitives.add(
|
|
@@ -1116,7 +1117,7 @@ function Vr(e) {
|
|
|
1116
1117
|
image: s.icon,
|
|
1117
1118
|
width: s.width || d.width,
|
|
1118
1119
|
height: s.height || d.height,
|
|
1119
|
-
scaleByDistance:
|
|
1120
|
+
scaleByDistance: Vr(u, t),
|
|
1120
1121
|
id: h,
|
|
1121
1122
|
disableDepthTestDistance: Gt.NEAR,
|
|
1122
1123
|
verticalOrigin: u.VerticalOrigin.BOTTOM
|
|
@@ -1131,7 +1132,7 @@ function Vr(e) {
|
|
|
1131
1132
|
width: s?.width || 20,
|
|
1132
1133
|
height: s?.height || 20,
|
|
1133
1134
|
fieldMapping: {
|
|
1134
|
-
...
|
|
1135
|
+
...zr,
|
|
1135
1136
|
...s?.fieldMapping || {}
|
|
1136
1137
|
}
|
|
1137
1138
|
}, p = performance.now();
|
|
@@ -1147,7 +1148,7 @@ function Vr(e) {
|
|
|
1147
1148
|
));
|
|
1148
1149
|
continue;
|
|
1149
1150
|
}
|
|
1150
|
-
const M = V[w.fieldMapping.id], I = M != null && M !== "" ? String(M) :
|
|
1151
|
+
const M = V[w.fieldMapping.id], I = M != null && M !== "" ? String(M) : Fr(), O = i(I), { billboard: _, position: q, lng: Z, lat: se, altitude: ce } = a(
|
|
1151
1152
|
C,
|
|
1152
1153
|
V,
|
|
1153
1154
|
w,
|
|
@@ -1164,7 +1165,7 @@ function Vr(e) {
|
|
|
1164
1165
|
};
|
|
1165
1166
|
O !== void 0 ? t.pointDataCache[O] = J : (t.cacheIdIndex.set(I, t.pointDataCache.length), t.pointDataCache.push(J)), pt(t, J);
|
|
1166
1167
|
}
|
|
1167
|
-
z + b < v && performance.now() - S >= B && (await
|
|
1168
|
+
z + b < v && performance.now() - S >= B && (await Nr(), S = performance.now());
|
|
1168
1169
|
}
|
|
1169
1170
|
x > 0 && m.warn(`[useMapPoint] 本次加载跳过 ${x} 个缺失 icon 的点位`), console.log(
|
|
1170
1171
|
`[useMapPoint] ${h} ${y.length} 个点位 billboard 渲染耗时:${(performance.now() - p).toFixed(0)}ms`
|
|
@@ -1199,7 +1200,7 @@ function Vr(e) {
|
|
|
1199
1200
|
}, c = async () => {
|
|
1200
1201
|
r();
|
|
1201
1202
|
};
|
|
1202
|
-
return
|
|
1203
|
+
return G(() => {
|
|
1203
1204
|
try {
|
|
1204
1205
|
const u = e.value?.scene;
|
|
1205
1206
|
if (u?.primitives && t.billboardCollection)
|
|
@@ -1217,21 +1218,21 @@ function Vr(e) {
|
|
|
1217
1218
|
}
|
|
1218
1219
|
}), {
|
|
1219
1220
|
loadPoints: o,
|
|
1220
|
-
searchByShape: (u) =>
|
|
1221
|
-
searchByText: (u) =>
|
|
1221
|
+
searchByShape: (u) => Br(t, u),
|
|
1222
|
+
searchByText: (u) => Rr(t, u),
|
|
1222
1223
|
updatePoints: l,
|
|
1223
1224
|
clearPoints: c
|
|
1224
1225
|
};
|
|
1225
1226
|
}
|
|
1226
|
-
function
|
|
1227
|
+
function $r(e) {
|
|
1227
1228
|
return e?.rectangle ? "rectangle" : e?.polygon ? "polygon" : e?.polyline ? "polyline" : e?.ellipse || e?.position && e?.billboard ? "circle" : "polygon";
|
|
1228
1229
|
}
|
|
1229
|
-
function
|
|
1230
|
+
function Kt(e) {
|
|
1230
1231
|
if (e.length === 0) return e;
|
|
1231
1232
|
const t = e[0], n = e[e.length - 1];
|
|
1232
1233
|
return (Array.isArray(t) ? t[0] === n[0] && t[1] === n[1] : t.lng === n.lng && t.lat === n.lat) ? [...e] : [...e, t];
|
|
1233
1234
|
}
|
|
1234
|
-
function
|
|
1235
|
+
function el(e, t = 0) {
|
|
1235
1236
|
const n = D();
|
|
1236
1237
|
return n ? n.Cartesian3.fromDegrees(e.lng, e.lat, t) : null;
|
|
1237
1238
|
}
|
|
@@ -1248,7 +1249,7 @@ function rt(e) {
|
|
|
1248
1249
|
const n = t.Cartographic.fromCartesian(e);
|
|
1249
1250
|
return Gr(n);
|
|
1250
1251
|
}
|
|
1251
|
-
function
|
|
1252
|
+
function Xt(e, t) {
|
|
1252
1253
|
return [
|
|
1253
1254
|
[e.lng, e.lat],
|
|
1254
1255
|
[t.lng, e.lat],
|
|
@@ -1271,17 +1272,17 @@ const be = {
|
|
|
1271
1272
|
function N(e, t) {
|
|
1272
1273
|
return P().Color.fromCssColorString(e).withAlpha(t);
|
|
1273
1274
|
}
|
|
1274
|
-
function
|
|
1275
|
+
function Zt(e) {
|
|
1275
1276
|
const t = P();
|
|
1276
1277
|
return e.map(
|
|
1277
1278
|
(n) => Array.isArray(n) ? t.Cartesian3.fromDegrees(n[0], n[1]) : t.Cartesian3.fromDegrees(n.lng, n.lat)
|
|
1278
1279
|
);
|
|
1279
1280
|
}
|
|
1280
|
-
function
|
|
1281
|
+
function Wr(e, t = !0) {
|
|
1281
1282
|
const n = P(), r = be;
|
|
1282
1283
|
if (!e.coordinates || e.coordinates.length < 3)
|
|
1283
1284
|
throw new Error("多边形需要至少3个坐标点");
|
|
1284
|
-
const i =
|
|
1285
|
+
const i = Kt(e.coordinates), a = Zt(i), o = new n.Entity({
|
|
1285
1286
|
polygon: {
|
|
1286
1287
|
hierarchy: new n.PolygonHierarchy(a),
|
|
1287
1288
|
material: N(
|
|
@@ -1307,7 +1308,7 @@ function $r(e, t = !0) {
|
|
|
1307
1308
|
closedCoordinates: i
|
|
1308
1309
|
};
|
|
1309
1310
|
}
|
|
1310
|
-
function
|
|
1311
|
+
function Ur(e, t = !0) {
|
|
1311
1312
|
const n = P(), r = be;
|
|
1312
1313
|
if (!e.lineCoordinates || e.lineCoordinates.length < 4)
|
|
1313
1314
|
throw new Error("线段需要至少2个点");
|
|
@@ -1323,7 +1324,7 @@ function Wr(e, t = !0) {
|
|
|
1323
1324
|
}
|
|
1324
1325
|
}) };
|
|
1325
1326
|
}
|
|
1326
|
-
function
|
|
1327
|
+
function Hr(e) {
|
|
1327
1328
|
const t = P(), n = be;
|
|
1328
1329
|
if (!e.center) throw new Error("圆形需要中心点坐标");
|
|
1329
1330
|
const r = e.radius ?? n.radius;
|
|
@@ -1349,7 +1350,7 @@ function Ur(e) {
|
|
|
1349
1350
|
}
|
|
1350
1351
|
}), center: e.center, radius: r };
|
|
1351
1352
|
}
|
|
1352
|
-
function
|
|
1353
|
+
function jr(e, t = !0) {
|
|
1353
1354
|
const n = P(), r = be;
|
|
1354
1355
|
if (!e.coordinates || e.coordinates.length < 2)
|
|
1355
1356
|
throw new Error("矩形需要两个对角点坐标");
|
|
@@ -1366,9 +1367,9 @@ function Hr(e, t = !0) {
|
|
|
1366
1367
|
e.fillAlpha ?? r.fillAlpha
|
|
1367
1368
|
)
|
|
1368
1369
|
}
|
|
1369
|
-
}), c =
|
|
1370
|
+
}), c = Xt(i, a), u = new n.Entity({
|
|
1370
1371
|
polyline: {
|
|
1371
|
-
positions:
|
|
1372
|
+
positions: Zt(c),
|
|
1372
1373
|
width: e.strokeWidth ?? r.strokeWidth,
|
|
1373
1374
|
material: N(
|
|
1374
1375
|
e.strokeColor ?? r.strokeColor,
|
|
@@ -1379,7 +1380,7 @@ function Hr(e, t = !0) {
|
|
|
1379
1380
|
});
|
|
1380
1381
|
return { fillEntity: l, strokeEntity: u, coordinates: c };
|
|
1381
1382
|
}
|
|
1382
|
-
function
|
|
1383
|
+
function Yr(e) {
|
|
1383
1384
|
const t = P(), n = be;
|
|
1384
1385
|
if (!e.point) throw new Error("点需要坐标");
|
|
1385
1386
|
return { entity: new t.Entity({
|
|
@@ -1391,42 +1392,42 @@ function jr(e) {
|
|
|
1391
1392
|
}
|
|
1392
1393
|
}), point: [e.point.lng, e.point.lat] };
|
|
1393
1394
|
}
|
|
1394
|
-
function
|
|
1395
|
+
function qr(e) {
|
|
1395
1396
|
const t = P();
|
|
1396
1397
|
return !!(t.SceneMode && e.scene.mode === t.SceneMode.SCENE2D);
|
|
1397
1398
|
}
|
|
1398
|
-
const
|
|
1399
|
+
const Kr = {
|
|
1399
1400
|
polygon: (e, t, n) => {
|
|
1400
|
-
const r =
|
|
1401
|
+
const r = Wr(e, t), i = n.entities.add(r.fillEntity), a = n.entities.add(r.strokeEntity);
|
|
1401
1402
|
return { nativeEntity: { fill: i, stroke: a }, coordinates: r.closedCoordinates };
|
|
1402
1403
|
},
|
|
1403
1404
|
line: (e, t, n) => {
|
|
1404
|
-
const r =
|
|
1405
|
+
const r = Ur(e, t);
|
|
1405
1406
|
return {
|
|
1406
1407
|
nativeEntity: n.entities.add(r.entity),
|
|
1407
1408
|
coordinates: e.lineCoordinates ?? []
|
|
1408
1409
|
};
|
|
1409
1410
|
},
|
|
1410
1411
|
circle: (e, t, n) => {
|
|
1411
|
-
const r =
|
|
1412
|
+
const r = Hr(e);
|
|
1412
1413
|
return {
|
|
1413
1414
|
nativeEntity: n.entities.add(r.entity),
|
|
1414
1415
|
coordinates: { center: r.center, radius: r.radius }
|
|
1415
1416
|
};
|
|
1416
1417
|
},
|
|
1417
1418
|
rectangle: (e, t, n) => {
|
|
1418
|
-
const r =
|
|
1419
|
+
const r = jr(e, t), i = n.entities.add(r.fillEntity), a = n.entities.add(r.strokeEntity);
|
|
1419
1420
|
return { nativeEntity: { fill: i, stroke: a }, coordinates: r.coordinates };
|
|
1420
1421
|
},
|
|
1421
1422
|
point: (e, t, n) => {
|
|
1422
|
-
const r =
|
|
1423
|
+
const r = Yr(e);
|
|
1423
1424
|
return { nativeEntity: n.entities.add(r.entity), coordinates: r.point };
|
|
1424
1425
|
}
|
|
1425
1426
|
};
|
|
1426
1427
|
function Ct(e, t, n) {
|
|
1427
|
-
const r =
|
|
1428
|
+
const r = Kr[e];
|
|
1428
1429
|
if (!r) throw new Error(`不支持的实体类型: ${e}`);
|
|
1429
|
-
return r(t, !
|
|
1430
|
+
return r(t, !qr(n), n);
|
|
1430
1431
|
}
|
|
1431
1432
|
function Pe(e, t) {
|
|
1432
1433
|
try {
|
|
@@ -1447,11 +1448,11 @@ function Be(e, t, n, r) {
|
|
|
1447
1448
|
alpha: e.strokeAlpha !== void 0 ? e.strokeAlpha : r
|
|
1448
1449
|
};
|
|
1449
1450
|
}
|
|
1450
|
-
function
|
|
1451
|
-
const n = P(), { fill: r, stroke: i } = e.nativeEntity, a =
|
|
1451
|
+
function Xr(e, t) {
|
|
1452
|
+
const n = P(), { fill: r, stroke: i } = e.nativeEntity, a = Kt(t.coordinates), o = a.map((l) => n.Cartesian3.fromDegrees(l.lng, l.lat));
|
|
1452
1453
|
r.polygon.hierarchy = new n.PolygonHierarchy(o), i.polyline.positions = o, e.coordinates = a;
|
|
1453
1454
|
}
|
|
1454
|
-
function
|
|
1455
|
+
function Zr(e, t) {
|
|
1455
1456
|
const { fill: n, stroke: r } = e.nativeEntity;
|
|
1456
1457
|
if (t.fillColor !== void 0 || t.fillAlpha !== void 0) {
|
|
1457
1458
|
const { color: i, alpha: a } = it(t, e, "#ff0000", 0.1);
|
|
@@ -1461,9 +1462,9 @@ function Xr(e, t) {
|
|
|
1461
1462
|
const { color: i, alpha: a } = Be(t, e, "#00ff00", 1);
|
|
1462
1463
|
r.polyline.material = N(i, a);
|
|
1463
1464
|
}
|
|
1464
|
-
t.strokeWidth !== void 0 && (r.polyline.width = t.strokeWidth), t.coordinates && t.coordinates.length >= 3 &&
|
|
1465
|
+
t.strokeWidth !== void 0 && (r.polyline.width = t.strokeWidth), t.coordinates && t.coordinates.length >= 3 && Xr(e, t);
|
|
1465
1466
|
}
|
|
1466
|
-
function
|
|
1467
|
+
function Jr(e, t) {
|
|
1467
1468
|
const n = P(), { fill: r, stroke: i } = e.nativeEntity, [a, o] = t.coordinates;
|
|
1468
1469
|
r.rectangle.coordinates = n.Rectangle.fromDegrees(
|
|
1469
1470
|
Math.min(a.lng, o.lng),
|
|
@@ -1471,12 +1472,12 @@ function Zr(e, t) {
|
|
|
1471
1472
|
Math.max(a.lng, o.lng),
|
|
1472
1473
|
Math.max(a.lat, o.lat)
|
|
1473
1474
|
);
|
|
1474
|
-
const l =
|
|
1475
|
+
const l = Xt(a, o);
|
|
1475
1476
|
i.polyline.positions = l.map(
|
|
1476
1477
|
(c) => n.Cartesian3.fromDegrees(c[0], c[1])
|
|
1477
1478
|
), e.coordinates = l;
|
|
1478
1479
|
}
|
|
1479
|
-
function
|
|
1480
|
+
function Qr(e, t) {
|
|
1480
1481
|
const { fill: n, stroke: r } = e.nativeEntity;
|
|
1481
1482
|
if (t.fillColor !== void 0 || t.fillAlpha !== void 0) {
|
|
1482
1483
|
const { color: i, alpha: a } = it(t, e, "#ff0000", 0.1);
|
|
@@ -1486,9 +1487,9 @@ function Jr(e, t) {
|
|
|
1486
1487
|
const { color: i, alpha: a } = Be(t, e, "#00ff00", 1);
|
|
1487
1488
|
r.polyline.material = N(i, a);
|
|
1488
1489
|
}
|
|
1489
|
-
t.strokeWidth !== void 0 && (r.polyline.width = t.strokeWidth), t.coordinates && t.coordinates.length >= 2 &&
|
|
1490
|
+
t.strokeWidth !== void 0 && (r.polyline.width = t.strokeWidth), t.coordinates && t.coordinates.length >= 2 && Jr(e, t);
|
|
1490
1491
|
}
|
|
1491
|
-
function
|
|
1492
|
+
function ei(e, t) {
|
|
1492
1493
|
const n = P(), i = e.nativeEntity.polyline;
|
|
1493
1494
|
if (i) {
|
|
1494
1495
|
if (t.strokeColor !== void 0 || t.strokeAlpha !== void 0) {
|
|
@@ -1500,7 +1501,7 @@ function Qr(e, t) {
|
|
|
1500
1501
|
), e.coordinates = t.lineCoordinates);
|
|
1501
1502
|
}
|
|
1502
1503
|
}
|
|
1503
|
-
function
|
|
1504
|
+
function ti(e, t) {
|
|
1504
1505
|
const n = P(), r = e.nativeEntity;
|
|
1505
1506
|
if (t.fillColor !== void 0 || t.fillAlpha !== void 0) {
|
|
1506
1507
|
const { color: i, alpha: a } = it(t, e, "#ff0000", 0.1);
|
|
@@ -1522,25 +1523,25 @@ function ei(e, t) {
|
|
|
1522
1523
|
};
|
|
1523
1524
|
}
|
|
1524
1525
|
}
|
|
1525
|
-
function
|
|
1526
|
+
function ni(e, t) {
|
|
1526
1527
|
const n = P(), r = e.nativeEntity, i = r.point;
|
|
1527
1528
|
i && (t.pointColor !== void 0 && (i.color = N(t.pointColor, 1)), t.pixelSize !== void 0 && (i.pixelSize = t.pixelSize), t.point && (r.position = n.Cartesian3.fromDegrees(
|
|
1528
1529
|
t.point.lng,
|
|
1529
1530
|
t.point.lat
|
|
1530
1531
|
), e.coordinates = [t.point.lng, t.point.lat]));
|
|
1531
1532
|
}
|
|
1532
|
-
function
|
|
1533
|
+
function ri(e, t) {
|
|
1533
1534
|
const n = e.nativeEntity;
|
|
1534
1535
|
e.type === "polygon" || e.type === "rectangle" ? (n.fill.show = t, n.stroke.show = t) : n.show = t;
|
|
1535
1536
|
}
|
|
1536
|
-
function
|
|
1537
|
-
e === "polygon" ?
|
|
1537
|
+
function ii(e, t, n) {
|
|
1538
|
+
e === "polygon" ? Zr(t, n) : e === "rectangle" ? Qr(t, n) : e === "line" ? ei(t, n) : e === "circle" ? ti(t, n) : e === "point" && ni(t, n);
|
|
1538
1539
|
}
|
|
1539
|
-
function
|
|
1540
|
+
function ai(e, t) {
|
|
1540
1541
|
const n = t.coordinates;
|
|
1541
1542
|
n && ((e.type === "polygon" || e.type === "rectangle") && !e.coordinates && Array.isArray(n) && (e.coordinates = n), e.type === "line" && !e.lineCoordinates && t.type === "line" && Array.isArray(n) && (e.lineCoordinates = n), e.type === "circle" && !e.center && t.type === "circle" && !Array.isArray(n) && (e.center = n.center, e.radius = n.radius || 1e3), e.type === "point" && !e.point && t.type === "point" && Array.isArray(n) && (e.point = n));
|
|
1542
1543
|
}
|
|
1543
|
-
async function
|
|
1544
|
+
async function oi(e, t, n, r, i) {
|
|
1544
1545
|
Pe(t, r);
|
|
1545
1546
|
const a = {
|
|
1546
1547
|
...t.options,
|
|
@@ -1548,15 +1549,15 @@ async function ai(e, t, n, r, i) {
|
|
|
1548
1549
|
id: e,
|
|
1549
1550
|
type: n.type
|
|
1550
1551
|
};
|
|
1551
|
-
return
|
|
1552
|
+
return ai(a, t), await i(a) !== null;
|
|
1552
1553
|
}
|
|
1553
|
-
function
|
|
1554
|
+
function li(e) {
|
|
1554
1555
|
const t = /* @__PURE__ */ new Map();
|
|
1555
1556
|
let n = "";
|
|
1556
1557
|
const r = () => !e.value || !e.value.entities ? (m.warn("地图实例未就绪"), !1) : !0, i = async () => {
|
|
1557
1558
|
if (r()) return !0;
|
|
1558
1559
|
try {
|
|
1559
|
-
return await
|
|
1560
|
+
return await ir(), r();
|
|
1560
1561
|
} catch {
|
|
1561
1562
|
return !1;
|
|
1562
1563
|
}
|
|
@@ -1595,7 +1596,7 @@ function oi(e) {
|
|
|
1595
1596
|
return m.warn(`实体未找到:${s}`), !1;
|
|
1596
1597
|
if (!await i()) return !1;
|
|
1597
1598
|
const g = e.value;
|
|
1598
|
-
return g ? d.type && d.type !== h.type ? await
|
|
1599
|
+
return g ? d.type && d.type !== h.type ? await oi(s, h, d, g, a) : (ii(h.type, h, d), d.name !== void 0 && (h.options.name = d.name), d.visible !== void 0 && ri(h, d.visible), h.options = { ...h.options, ...d }, t.set(s, h), !0) : !1;
|
|
1599
1600
|
} catch (h) {
|
|
1600
1601
|
return m.error(`修改实体失败 (${s}):`, h), !1;
|
|
1601
1602
|
}
|
|
@@ -1610,7 +1611,7 @@ function oi(e) {
|
|
|
1610
1611
|
m.warn(`重绘实体失败 (${d}):`, g);
|
|
1611
1612
|
}
|
|
1612
1613
|
};
|
|
1613
|
-
return
|
|
1614
|
+
return G(() => {
|
|
1614
1615
|
try {
|
|
1615
1616
|
t.clear(), n = "";
|
|
1616
1617
|
} catch (s) {
|
|
@@ -1624,7 +1625,7 @@ function oi(e) {
|
|
|
1624
1625
|
getCurrentEntityId: l
|
|
1625
1626
|
};
|
|
1626
1627
|
}
|
|
1627
|
-
function
|
|
1628
|
+
function si() {
|
|
1628
1629
|
return {
|
|
1629
1630
|
drawInstance: null,
|
|
1630
1631
|
editInstance: null,
|
|
@@ -1652,7 +1653,7 @@ const fe = {
|
|
|
1652
1653
|
function Ae(e, t, n, r) {
|
|
1653
1654
|
return typeof e != "number" || Number.isNaN(e) ? r : Math.min(n, Math.max(t, e));
|
|
1654
1655
|
}
|
|
1655
|
-
class
|
|
1656
|
+
class ci {
|
|
1656
1657
|
constructor(t) {
|
|
1657
1658
|
this.config = { ...fe, ...t }, this.config.fillAlpha = Ae(
|
|
1658
1659
|
this.config.fillAlpha,
|
|
@@ -1706,7 +1707,7 @@ class si {
|
|
|
1706
1707
|
config: this.config,
|
|
1707
1708
|
shared: { fill: n, border: r, label: i, width: a }
|
|
1708
1709
|
}, l = { repeat: !0 };
|
|
1709
|
-
for (const c of
|
|
1710
|
+
for (const c of Rn())
|
|
1710
1711
|
c.buildConfig && (l[c.type] = c.buildConfig(o));
|
|
1711
1712
|
return l;
|
|
1712
1713
|
}
|
|
@@ -1726,12 +1727,12 @@ class si {
|
|
|
1726
1727
|
};
|
|
1727
1728
|
}
|
|
1728
1729
|
}
|
|
1729
|
-
function
|
|
1730
|
+
function Jt(e) {
|
|
1730
1731
|
return e.map((t) => rt(t)).filter((t) => t !== null);
|
|
1731
1732
|
}
|
|
1732
|
-
function
|
|
1733
|
+
function ui(e) {
|
|
1733
1734
|
try {
|
|
1734
|
-
const t = e.polygon.hierarchy.getValue().positions || [], n =
|
|
1735
|
+
const t = e.polygon.hierarchy.getValue().positions || [], n = Jt(t);
|
|
1735
1736
|
return {
|
|
1736
1737
|
type: "polygon",
|
|
1737
1738
|
path: n.map((r) => [r.lng, r.lat]),
|
|
@@ -1742,7 +1743,7 @@ function ci(e) {
|
|
|
1742
1743
|
return m.error("提取多边形数据失败:", t), null;
|
|
1743
1744
|
}
|
|
1744
1745
|
}
|
|
1745
|
-
function
|
|
1746
|
+
function di(e) {
|
|
1746
1747
|
const t = P();
|
|
1747
1748
|
try {
|
|
1748
1749
|
const n = e.rectangle.coordinates.getValue(), r = t.Math.toDegrees(n.west), i = t.Math.toDegrees(n.south), a = t.Math.toDegrees(n.east), o = t.Math.toDegrees(n.north);
|
|
@@ -1767,9 +1768,9 @@ function ui(e) {
|
|
|
1767
1768
|
return m.error("提取矩形数据失败:", n), null;
|
|
1768
1769
|
}
|
|
1769
1770
|
}
|
|
1770
|
-
function
|
|
1771
|
+
function fi(e) {
|
|
1771
1772
|
try {
|
|
1772
|
-
const t = e.polyline.positions.getValue(), n =
|
|
1773
|
+
const t = e.polyline.positions.getValue(), n = Jt(t);
|
|
1773
1774
|
return {
|
|
1774
1775
|
type: "polyline",
|
|
1775
1776
|
path: n.map((r) => [r.lng, r.lat]),
|
|
@@ -1780,7 +1781,7 @@ function di(e) {
|
|
|
1780
1781
|
return m.error("提取折线数据失败:", t), null;
|
|
1781
1782
|
}
|
|
1782
1783
|
}
|
|
1783
|
-
function
|
|
1784
|
+
function hi(e) {
|
|
1784
1785
|
try {
|
|
1785
1786
|
const t = rt(e.position.getValue());
|
|
1786
1787
|
if (!t) return null;
|
|
@@ -1795,7 +1796,7 @@ function fi(e) {
|
|
|
1795
1796
|
return m.error("提取圆形数据失败:", t), null;
|
|
1796
1797
|
}
|
|
1797
1798
|
}
|
|
1798
|
-
function
|
|
1799
|
+
function gi(e) {
|
|
1799
1800
|
try {
|
|
1800
1801
|
const t = rt(e.position.getValue());
|
|
1801
1802
|
return t ? {
|
|
@@ -1808,29 +1809,29 @@ function hi(e) {
|
|
|
1808
1809
|
return null;
|
|
1809
1810
|
}
|
|
1810
1811
|
}
|
|
1811
|
-
function
|
|
1812
|
-
return e ? e.polygon ?
|
|
1813
|
-
}
|
|
1814
|
-
function gi(e) {
|
|
1815
|
-
return Or(e);
|
|
1812
|
+
function Qt(e) {
|
|
1813
|
+
return e ? e.polygon ? ui(e) : e.rectangle ? di(e) : e.polyline ? fi(e) : e.position && e.ellipse ? hi(e) : e.billboard && e.position ? gi(e) : null : null;
|
|
1816
1814
|
}
|
|
1817
1815
|
function pi(e) {
|
|
1818
|
-
return
|
|
1816
|
+
return $r(e);
|
|
1819
1817
|
}
|
|
1820
1818
|
function mi(e) {
|
|
1819
|
+
return e.editInstance && (e.editInstance.isEditing || e.editInstance._isEditing || e.editInstance.editing) || !1;
|
|
1820
|
+
}
|
|
1821
|
+
function vi(e) {
|
|
1821
1822
|
typeof e.finish == "function" ? e.finish() : typeof e.stop == "function" ? e.stop() : typeof e.disable == "function" ? e.disable() : typeof e.end == "function" ? e.end() : e.isEditing = !1;
|
|
1822
1823
|
}
|
|
1823
1824
|
function Ee(e, t = !1) {
|
|
1824
1825
|
if (e.editInstance) {
|
|
1825
1826
|
t && e.currentDrawId && (e.lastEditedEntity = e.mapInstance?.entities.getById(e.currentDrawId) ?? null);
|
|
1826
1827
|
try {
|
|
1827
|
-
|
|
1828
|
+
vi(e.editInstance);
|
|
1828
1829
|
} catch (n) {
|
|
1829
1830
|
m.error("结束编辑状态失败:", n);
|
|
1830
1831
|
} finally {
|
|
1831
1832
|
e.isEditing = !1;
|
|
1832
1833
|
}
|
|
1833
|
-
t && e.lastEditedEntity &&
|
|
1834
|
+
t && e.lastEditedEntity && wi(e);
|
|
1834
1835
|
}
|
|
1835
1836
|
}
|
|
1836
1837
|
function re(e, t) {
|
|
@@ -1843,10 +1844,10 @@ function re(e, t) {
|
|
|
1843
1844
|
else
|
|
1844
1845
|
m.warn("绘图回调函数未设置");
|
|
1845
1846
|
}
|
|
1846
|
-
function
|
|
1847
|
+
function wi(e) {
|
|
1847
1848
|
if (!(!e.lastEditedEntity || !e.currentDrawId))
|
|
1848
1849
|
try {
|
|
1849
|
-
const t =
|
|
1850
|
+
const t = Qt(e.lastEditedEntity);
|
|
1850
1851
|
if (!t) return;
|
|
1851
1852
|
const n = {
|
|
1852
1853
|
type: t.type,
|
|
@@ -1864,7 +1865,7 @@ function vi(e) {
|
|
|
1864
1865
|
m.error("手动触发编辑完成事件失败:", t);
|
|
1865
1866
|
}
|
|
1866
1867
|
}
|
|
1867
|
-
function
|
|
1868
|
+
function yi(e, t, n) {
|
|
1868
1869
|
try {
|
|
1869
1870
|
if (e.drawInstance || n(), !e.drawInstance) throw new Error("绘图实例初始化失败");
|
|
1870
1871
|
if (e.isEditing && Ee(e, !1), e.isDrawing = !0, e.currentDrawType = t, typeof e.drawInstance.enable == "function")
|
|
@@ -1877,7 +1878,7 @@ function wi(e, t, n) {
|
|
|
1877
1878
|
throw m.error(`开始绘制 ${t} 失败:`, r), e.isDrawing = !1, e.currentDrawType = null, r;
|
|
1878
1879
|
}
|
|
1879
1880
|
}
|
|
1880
|
-
function
|
|
1881
|
+
function Ci(e) {
|
|
1881
1882
|
const t = (n, ...r) => {
|
|
1882
1883
|
if (n) {
|
|
1883
1884
|
for (const i of r)
|
|
@@ -1889,13 +1890,13 @@ function yi(e) {
|
|
|
1889
1890
|
};
|
|
1890
1891
|
t(e.drawInstance, "disable", "stop"), t(e.editInstance, "disable", "stop");
|
|
1891
1892
|
}
|
|
1892
|
-
function
|
|
1893
|
+
function bi(e) {
|
|
1893
1894
|
e.currentDrawId = "", e.currentDrawType = null, e.isDrawing = !1, e.isEditing = !1, e.lastEditedEntity = null;
|
|
1894
1895
|
}
|
|
1895
1896
|
function ne(e) {
|
|
1896
|
-
e.isEditing && Ee(e, !1),
|
|
1897
|
+
e.isEditing && Ee(e, !1), Ci(e), bi(e);
|
|
1897
1898
|
}
|
|
1898
|
-
function
|
|
1899
|
+
function Ei(e, t = "") {
|
|
1899
1900
|
if (!e.mapInstance) return;
|
|
1900
1901
|
const n = t || e.currentDrawId;
|
|
1901
1902
|
if (e.isEditing && Ee(e, !1), !n) {
|
|
@@ -1904,7 +1905,7 @@ function bi(e, t = "") {
|
|
|
1904
1905
|
}
|
|
1905
1906
|
const r = e.mapInstance.entities.getById(n);
|
|
1906
1907
|
if (r) {
|
|
1907
|
-
const i =
|
|
1908
|
+
const i = Qt(r);
|
|
1908
1909
|
if (e.mapInstance.entities.remove(r), e.drawEntityIds.delete(n), e.currentDrawId === n && (e.currentDrawId = ""), i) {
|
|
1909
1910
|
const a = {
|
|
1910
1911
|
type: i.type,
|
|
@@ -1922,7 +1923,7 @@ function bi(e, t = "") {
|
|
|
1922
1923
|
}
|
|
1923
1924
|
ne(e);
|
|
1924
1925
|
}
|
|
1925
|
-
function
|
|
1926
|
+
function Si(e) {
|
|
1926
1927
|
if (!e.mapInstance) return;
|
|
1927
1928
|
e.isEditing && Ee(e, !1);
|
|
1928
1929
|
let t = 0;
|
|
@@ -2016,17 +2017,17 @@ class X {
|
|
|
2016
2017
|
return n.length === 0 ? null : { type: "polyline", path: n };
|
|
2017
2018
|
}
|
|
2018
2019
|
}
|
|
2019
|
-
function
|
|
2020
|
+
function Di(e, t, n) {
|
|
2020
2021
|
re(e, {
|
|
2021
|
-
type:
|
|
2022
|
+
type: pi(n),
|
|
2022
2023
|
operation: "select",
|
|
2023
2024
|
id: t,
|
|
2024
2025
|
data: { id: t },
|
|
2025
2026
|
rawData: n
|
|
2026
2027
|
});
|
|
2027
2028
|
}
|
|
2028
|
-
function
|
|
2029
|
-
if (
|
|
2029
|
+
function Ti(e) {
|
|
2030
|
+
if (mi(e)) {
|
|
2030
2031
|
Ee(e, !0);
|
|
2031
2032
|
return;
|
|
2032
2033
|
}
|
|
@@ -2038,7 +2039,7 @@ function Di(e) {
|
|
|
2038
2039
|
rawData: null
|
|
2039
2040
|
}), ne(e);
|
|
2040
2041
|
}
|
|
2041
|
-
function
|
|
2042
|
+
function Mi(e, t) {
|
|
2042
2043
|
if (!e.mapInstance) return;
|
|
2043
2044
|
const n = P(), r = e.mapInstance.scene.pick(t.position);
|
|
2044
2045
|
if (!n.defined(r)) return;
|
|
@@ -2050,16 +2051,16 @@ function Ti(e, t) {
|
|
|
2050
2051
|
const o = e.editInstance;
|
|
2051
2052
|
typeof o.edit == "function" ? o.edit(a) : typeof o.start == "function" ? o.start(a) : typeof o.enable == "function" && o.enable(a), e.isEditing = !0;
|
|
2052
2053
|
}
|
|
2053
|
-
function
|
|
2054
|
+
function Ii(e, t) {
|
|
2054
2055
|
if (!e.mapInstance || e.isDrawing) return;
|
|
2055
2056
|
const n = P(), r = e.mapInstance.scene.pick(t.position);
|
|
2056
2057
|
if (!n.defined(r)) return;
|
|
2057
2058
|
const i = r?.id?._id;
|
|
2058
2059
|
if (typeof i != "string" || !i) return;
|
|
2059
2060
|
const a = e.mapInstance.entities.getById(i);
|
|
2060
|
-
a && (e.currentDrawId = i,
|
|
2061
|
+
a && (e.currentDrawId = i, Di(e, i, a));
|
|
2061
2062
|
}
|
|
2062
|
-
function
|
|
2063
|
+
function xi(e, t) {
|
|
2063
2064
|
const n = X.process(t.detail);
|
|
2064
2065
|
if (!n) return;
|
|
2065
2066
|
n.id && e.drawEntityIds.add(n.id);
|
|
@@ -2072,7 +2073,7 @@ function Ii(e, t) {
|
|
|
2072
2073
|
};
|
|
2073
2074
|
re(e, r), ne(e);
|
|
2074
2075
|
}
|
|
2075
|
-
function
|
|
2076
|
+
function Ai(e, t) {
|
|
2076
2077
|
e.isEditing = !1;
|
|
2077
2078
|
const n = X.process(t.detail);
|
|
2078
2079
|
if (!n) {
|
|
@@ -2088,7 +2089,7 @@ function xi(e, t) {
|
|
|
2088
2089
|
};
|
|
2089
2090
|
re(e, r), e.lastEditedEntity = null;
|
|
2090
2091
|
}
|
|
2091
|
-
function
|
|
2092
|
+
function en(e) {
|
|
2092
2093
|
e.eventListeners.forEach(({ type: t }) => {
|
|
2093
2094
|
try {
|
|
2094
2095
|
e.mapHandler?.removeInputAction(t);
|
|
@@ -2097,8 +2098,8 @@ function Qt(e) {
|
|
|
2097
2098
|
}
|
|
2098
2099
|
}), e.eventListeners = [];
|
|
2099
2100
|
}
|
|
2100
|
-
function
|
|
2101
|
-
|
|
2101
|
+
function Li(e) {
|
|
2102
|
+
en(e);
|
|
2102
2103
|
const t = e.mapHandler;
|
|
2103
2104
|
if (!t) return;
|
|
2104
2105
|
const n = P(), r = [
|
|
@@ -2106,9 +2107,9 @@ function Ai(e) {
|
|
|
2106
2107
|
n.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,
|
|
2107
2108
|
n.ScreenSpaceEventType.LEFT_CLICK
|
|
2108
2109
|
], i = [
|
|
2109
|
-
() =>
|
|
2110
|
-
(a) =>
|
|
2111
|
-
(a) =>
|
|
2110
|
+
() => Ti(e),
|
|
2111
|
+
(a) => Mi(e, a),
|
|
2112
|
+
(a) => Ii(e, a)
|
|
2112
2113
|
];
|
|
2113
2114
|
r.forEach((a, o) => {
|
|
2114
2115
|
t.setInputAction(i[o], a), e.eventListeners.push({ type: a });
|
|
@@ -2117,38 +2118,38 @@ function Ai(e) {
|
|
|
2117
2118
|
function ki(e) {
|
|
2118
2119
|
e.drawInstance && (e.drawInstance.on(
|
|
2119
2120
|
"bm_draw_end",
|
|
2120
|
-
(t) =>
|
|
2121
|
+
(t) => xi(e, t)
|
|
2121
2122
|
), e.editInstance && e.editInstance.on(
|
|
2122
2123
|
"bm_edit_end",
|
|
2123
|
-
(t) =>
|
|
2124
|
+
(t) => Ai(e, t)
|
|
2124
2125
|
));
|
|
2125
2126
|
}
|
|
2126
|
-
function
|
|
2127
|
+
function _i(e, t, n) {
|
|
2127
2128
|
try {
|
|
2128
2129
|
if (e.mapInstance = Qe(t) ? t.value : t, !e.mapInstance) throw new Error("地图实例不可用");
|
|
2129
2130
|
if (!D()) throw new Error("BMGL 库未加载");
|
|
2130
2131
|
if (e.mapHandler = e.mapInstance.screenSpaceEventHandler, !e.mapHandler) throw new Error("地图事件处理器不可用");
|
|
2131
|
-
const r = P(), i = new
|
|
2132
|
+
const r = P(), i = new ci(n);
|
|
2132
2133
|
e.drawInstance = new r.Plot.Draw(
|
|
2133
2134
|
e.mapInstance,
|
|
2134
2135
|
i.getDrawConfig()
|
|
2135
2136
|
), e.editInstance = new r.Plot.Edit(
|
|
2136
2137
|
e.mapInstance,
|
|
2137
2138
|
i.getEditConfig()
|
|
2138
|
-
),
|
|
2139
|
+
), Li(e), ki(e);
|
|
2139
2140
|
} catch (r) {
|
|
2140
2141
|
throw m.error("绘图工具初始化失败:", r), r;
|
|
2141
2142
|
}
|
|
2142
2143
|
}
|
|
2143
2144
|
function bt(e) {
|
|
2144
2145
|
try {
|
|
2145
|
-
ne(e),
|
|
2146
|
+
ne(e), en(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;
|
|
2146
2147
|
} catch (t) {
|
|
2147
2148
|
m.error("清理绘图工具资源失败:", t);
|
|
2148
2149
|
}
|
|
2149
2150
|
}
|
|
2150
|
-
function
|
|
2151
|
-
const n =
|
|
2151
|
+
function Pi(e, t) {
|
|
2152
|
+
const n = si(), r = () => _i(n, e, t), i = (l) => {
|
|
2152
2153
|
n.drawCallback = l;
|
|
2153
2154
|
}, a = () => ({
|
|
2154
2155
|
isDrawing: n.isDrawing,
|
|
@@ -2177,15 +2178,15 @@ function _i(e, t) {
|
|
|
2177
2178
|
} catch (l) {
|
|
2178
2179
|
m.warn("自动初始化失败,将在绘图时重试:", l);
|
|
2179
2180
|
}
|
|
2180
|
-
return
|
|
2181
|
+
return G(() => {
|
|
2181
2182
|
bt(n);
|
|
2182
2183
|
}), {
|
|
2183
2184
|
// 绘制控制
|
|
2184
|
-
startDrawing: (l) =>
|
|
2185
|
+
startDrawing: (l) => yi(n, l, r),
|
|
2185
2186
|
cancelDrawing: () => ne(n),
|
|
2186
2187
|
// 数据操作
|
|
2187
|
-
removeDrawing: (l = "") =>
|
|
2188
|
-
clearAllDrawings: () =>
|
|
2188
|
+
removeDrawing: (l = "") => Ei(n, l),
|
|
2189
|
+
clearAllDrawings: () => Si(n),
|
|
2189
2190
|
// 回调管理
|
|
2190
2191
|
setCallback: i,
|
|
2191
2192
|
// 状态查询
|
|
@@ -2197,7 +2198,7 @@ function _i(e, t) {
|
|
|
2197
2198
|
cleanup: () => bt(n)
|
|
2198
2199
|
};
|
|
2199
2200
|
}
|
|
2200
|
-
function
|
|
2201
|
+
function Bi() {
|
|
2201
2202
|
return {
|
|
2202
2203
|
popupLayer: null,
|
|
2203
2204
|
divLayerManager: null,
|
|
@@ -2210,16 +2211,16 @@ function Pi() {
|
|
|
2210
2211
|
function ve(e) {
|
|
2211
2212
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2212
2213
|
}
|
|
2213
|
-
function
|
|
2214
|
+
function Ri(e) {
|
|
2214
2215
|
return e && /^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e) ? e : "";
|
|
2215
2216
|
}
|
|
2216
2217
|
function le(e, t) {
|
|
2217
2218
|
return typeof e == "number" && !Number.isNaN(e) ? e.toFixed(t) : "-";
|
|
2218
2219
|
}
|
|
2219
|
-
function Ri(e) {
|
|
2220
|
-
return G[e || "default"] || G.default;
|
|
2221
|
-
}
|
|
2222
2220
|
function zi(e) {
|
|
2221
|
+
return $[e || "default"] || $.default;
|
|
2222
|
+
}
|
|
2223
|
+
function Fi(e) {
|
|
2223
2224
|
return [
|
|
2224
2225
|
`--status-color: ${e.color}`,
|
|
2225
2226
|
`--status-bg: ${e.color}10`,
|
|
@@ -2227,7 +2228,7 @@ function zi(e) {
|
|
|
2227
2228
|
`--status-shadow: ${e.color}30`
|
|
2228
2229
|
].join(";");
|
|
2229
2230
|
}
|
|
2230
|
-
function
|
|
2231
|
+
function Ni(e, t) {
|
|
2231
2232
|
const n = [e.lineCode, e.lineNo, e.pointNo].filter(
|
|
2232
2233
|
(i) => i != null && i !== ""
|
|
2233
2234
|
), r = n.length ? `<div class="map-point-popup-subtitle"><span>${n.map((i) => ve(i)).join('<span class="map-point-popup-divider">|</span>')}</span></div>` : "";
|
|
@@ -2240,14 +2241,14 @@ function Fi(e, t) {
|
|
|
2240
2241
|
${r}
|
|
2241
2242
|
</div>`;
|
|
2242
2243
|
}
|
|
2243
|
-
function
|
|
2244
|
+
function tn(e, t) {
|
|
2244
2245
|
return `
|
|
2245
2246
|
<div class="map-point-popup-field">
|
|
2246
2247
|
<div class="map-point-popup-field-label">${ve(e)}</div>
|
|
2247
2248
|
<div class="map-point-popup-field-value">${ve(t)}</div>
|
|
2248
2249
|
</div>`;
|
|
2249
2250
|
}
|
|
2250
|
-
function
|
|
2251
|
+
function Vi(e, t) {
|
|
2251
2252
|
const n = t[e.key];
|
|
2252
2253
|
if (n == null || n === "") return "-";
|
|
2253
2254
|
if (typeof e.format == "function") return e.format(n, t);
|
|
@@ -2262,12 +2263,12 @@ function Ni(e, t) {
|
|
|
2262
2263
|
return String(n);
|
|
2263
2264
|
}
|
|
2264
2265
|
}
|
|
2265
|
-
function Vi(e) {
|
|
2266
|
-
return `<div class="map-point-popup-grid">${e.map((t) => en(t.label, t.value)).join("")}</div>`;
|
|
2267
|
-
}
|
|
2268
2266
|
function Oi(e) {
|
|
2267
|
+
return `<div class="map-point-popup-grid">${e.map((t) => tn(t.label, t.value)).join("")}</div>`;
|
|
2268
|
+
}
|
|
2269
|
+
function $i(e) {
|
|
2269
2270
|
const t = le(e.lng, 6), n = le(e.lat, 6), r = le(e.altitude, 2), i = e.teamName || "-", a = e.realName || "-";
|
|
2270
|
-
return
|
|
2271
|
+
return Oi([
|
|
2271
2272
|
{ label: "经度", value: t },
|
|
2272
2273
|
{ label: "纬度", value: n },
|
|
2273
2274
|
{ label: "高程", value: `${r} m` },
|
|
@@ -2276,26 +2277,26 @@ function Oi(e) {
|
|
|
2276
2277
|
]);
|
|
2277
2278
|
}
|
|
2278
2279
|
function Gi(e, t) {
|
|
2279
|
-
return `<div class="map-point-popup-grid">${t.map((r) =>
|
|
2280
|
+
return `<div class="map-point-popup-grid">${t.map((r) => tn(r.label, Vi(r, e))).join("")}</div>`;
|
|
2280
2281
|
}
|
|
2281
|
-
function
|
|
2282
|
-
const n =
|
|
2282
|
+
function Wi(e, t) {
|
|
2283
|
+
const n = zi(e.status), r = Fi(n), i = Ri(t?.themeColor), a = i ? `--popup-accent: ${i};` : "", o = t?.fields?.length ? Gi(e, t.fields) : $i(e);
|
|
2283
2284
|
return `
|
|
2284
2285
|
<div class="map-point-popup" style="${r};${a}">
|
|
2285
|
-
${
|
|
2286
|
+
${Ni(e, n)}
|
|
2286
2287
|
<div class="map-point-popup-content">
|
|
2287
2288
|
${o}
|
|
2288
2289
|
</div>
|
|
2289
2290
|
</div>`;
|
|
2290
2291
|
}
|
|
2291
|
-
function
|
|
2292
|
+
function $e(e) {
|
|
2292
2293
|
return typeof e == "number" && !Number.isNaN(e);
|
|
2293
2294
|
}
|
|
2294
|
-
function
|
|
2295
|
+
function Ui(e, t) {
|
|
2295
2296
|
return t && (e.mapInstance = Qe(t) ? t.value : t), !!e.mapInstance;
|
|
2296
2297
|
}
|
|
2297
|
-
async function
|
|
2298
|
-
if (
|
|
2298
|
+
async function Hi(e, t, n) {
|
|
2299
|
+
if (Ui(e, t), !e.divLayerManager && e.mapInstance) {
|
|
2299
2300
|
const r = D();
|
|
2300
2301
|
if (!r) return null;
|
|
2301
2302
|
e.divLayerManager = new r.div.DivLayerManager(e.mapInstance, {
|
|
@@ -2306,7 +2307,7 @@ async function Ui(e, t, n) {
|
|
|
2306
2307
|
}
|
|
2307
2308
|
return e.divLayerManager;
|
|
2308
2309
|
}
|
|
2309
|
-
function
|
|
2310
|
+
function ji(e) {
|
|
2310
2311
|
const t = D();
|
|
2311
2312
|
if (!t) throw new Error("BMGL 库未加载,无法转换弹窗坐标");
|
|
2312
2313
|
return t.Cartesian3.fromDegrees(
|
|
@@ -2315,8 +2316,8 @@ function Hi(e) {
|
|
|
2315
2316
|
e.altitude || 0
|
|
2316
2317
|
);
|
|
2317
2318
|
}
|
|
2318
|
-
function
|
|
2319
|
-
const r =
|
|
2319
|
+
function Yi(e, t, n) {
|
|
2320
|
+
const r = Bi();
|
|
2320
2321
|
r.displayConfig = n?.displayConfig || null;
|
|
2321
2322
|
const i = () => {
|
|
2322
2323
|
if (r.popupLayer && r.divLayerManager) {
|
|
@@ -2332,12 +2333,12 @@ function ji(e, t, n) {
|
|
|
2332
2333
|
try {
|
|
2333
2334
|
if (!u) throw new Error("点位数据不能为空");
|
|
2334
2335
|
const d = ++r.popupSeq, h = {
|
|
2335
|
-
lng:
|
|
2336
|
-
lat:
|
|
2337
|
-
altitude:
|
|
2336
|
+
lng: $e(u.lng) ? u.lng : ye.lng,
|
|
2337
|
+
lat: $e(u.lat) ? u.lat : ye.lat,
|
|
2338
|
+
altitude: $e(u.altitude) ? u.altitude : 0
|
|
2338
2339
|
};
|
|
2339
2340
|
i();
|
|
2340
|
-
const g = await
|
|
2341
|
+
const g = await Hi(r, e, t);
|
|
2341
2342
|
if (!g) throw new Error("DivLayerManager 初始化失败");
|
|
2342
2343
|
if (d !== r.popupSeq) return;
|
|
2343
2344
|
r.currentPopupData = { ...u };
|
|
@@ -2349,8 +2350,8 @@ function ji(e, t, n) {
|
|
|
2349
2350
|
}, w = D();
|
|
2350
2351
|
if (!w) throw new Error("BMGL 库未加载,无法创建弹窗");
|
|
2351
2352
|
const p = new w.div.DivLayer(
|
|
2352
|
-
|
|
2353
|
-
|
|
2353
|
+
Wi(u, r.displayConfig || void 0),
|
|
2354
|
+
ji(h),
|
|
2354
2355
|
{
|
|
2355
2356
|
offset: { x: C.offsetX, y: C.offsetY }
|
|
2356
2357
|
}
|
|
@@ -2362,7 +2363,7 @@ function ji(e, t, n) {
|
|
|
2362
2363
|
}, o = () => {
|
|
2363
2364
|
i();
|
|
2364
2365
|
}, l = () => r.popupLayer !== null, c = () => r.currentPopupData;
|
|
2365
|
-
return
|
|
2366
|
+
return G(() => {
|
|
2366
2367
|
try {
|
|
2367
2368
|
o();
|
|
2368
2369
|
} catch (s) {
|
|
@@ -2383,7 +2384,7 @@ function ji(e, t, n) {
|
|
|
2383
2384
|
getCurrentPopupData: c
|
|
2384
2385
|
};
|
|
2385
2386
|
}
|
|
2386
|
-
function
|
|
2387
|
+
function qi(e) {
|
|
2387
2388
|
let t = null;
|
|
2388
2389
|
const n = () => Qe(e) ? e.value : e, r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = (l) => {
|
|
2389
2390
|
try {
|
|
@@ -2413,7 +2414,7 @@ function Yi(e) {
|
|
|
2413
2414
|
return m.error(`删除波动效果失败, ID: ${l}:`, c), r.delete(l), !1;
|
|
2414
2415
|
}
|
|
2415
2416
|
};
|
|
2416
|
-
return
|
|
2417
|
+
return G(() => {
|
|
2417
2418
|
i.forEach((l) => clearTimeout(l)), i.clear();
|
|
2418
2419
|
for (const l of Array.from(r))
|
|
2419
2420
|
try {
|
|
@@ -2427,13 +2428,13 @@ function Yi(e) {
|
|
|
2427
2428
|
removeWave: o
|
|
2428
2429
|
};
|
|
2429
2430
|
}
|
|
2430
|
-
function
|
|
2431
|
+
function Ki() {
|
|
2431
2432
|
return { layers: /* @__PURE__ */ new Map() };
|
|
2432
2433
|
}
|
|
2433
|
-
function
|
|
2434
|
+
function nn(e) {
|
|
2434
2435
|
return e.value ? e.value : (m.warn("[useMapLayers] 地图未初始化"), null);
|
|
2435
2436
|
}
|
|
2436
|
-
function
|
|
2437
|
+
function rn(e, t, n) {
|
|
2437
2438
|
const r = e.layers.get(n);
|
|
2438
2439
|
if (r) {
|
|
2439
2440
|
try {
|
|
@@ -2444,19 +2445,19 @@ function nn(e, t, n) {
|
|
|
2444
2445
|
e.layers.delete(n);
|
|
2445
2446
|
}
|
|
2446
2447
|
}
|
|
2447
|
-
function
|
|
2448
|
-
const r =
|
|
2448
|
+
function Xi(e, t, n) {
|
|
2449
|
+
const r = nn(t);
|
|
2449
2450
|
if (!r) throw new Error("地图未初始化,无法添加影像图层");
|
|
2450
2451
|
const i = P();
|
|
2451
|
-
|
|
2452
|
+
rn(e, t, n);
|
|
2452
2453
|
const a = new i.ImageryLayer(new i.BMImageryProvider({ mapId: n }));
|
|
2453
2454
|
return r.imageryLayers.add(a), e.layers.set(n, a), a;
|
|
2454
2455
|
}
|
|
2455
|
-
function
|
|
2456
|
-
const i =
|
|
2456
|
+
function Zi(e, t, n, r = "wmts-layer") {
|
|
2457
|
+
const i = nn(t);
|
|
2457
2458
|
if (!i) throw new Error("地图未初始化,无法添加 WMTS 图层");
|
|
2458
2459
|
const a = P();
|
|
2459
|
-
|
|
2460
|
+
rn(e, t, r);
|
|
2460
2461
|
const o = new a.WebMapTileServiceImageryProvider({
|
|
2461
2462
|
url: n,
|
|
2462
2463
|
layer: r,
|
|
@@ -2468,16 +2469,16 @@ function Xi(e, t, n, r = "wmts-layer") {
|
|
|
2468
2469
|
);
|
|
2469
2470
|
return e.layers.set(r, l), l;
|
|
2470
2471
|
}
|
|
2471
|
-
function
|
|
2472
|
+
function Ji(e, t) {
|
|
2472
2473
|
if (typeof t == "string") {
|
|
2473
2474
|
const n = e.layers.get(t);
|
|
2474
2475
|
return n ? { layer: n, key: t } : (m.warn(`图层未找到: ${t}`), { layer: null, key: null });
|
|
2475
2476
|
}
|
|
2476
2477
|
return { layer: t, key: null };
|
|
2477
2478
|
}
|
|
2478
|
-
function
|
|
2479
|
+
function Qi(e, t, n) {
|
|
2479
2480
|
try {
|
|
2480
|
-
const { layer: r, key: i } =
|
|
2481
|
+
const { layer: r, key: i } = Ji(e, n);
|
|
2481
2482
|
if (!r) return !1;
|
|
2482
2483
|
if (t.value && t.value.imageryLayers.remove(r, !1), i !== null)
|
|
2483
2484
|
e.layers.delete(i);
|
|
@@ -2492,7 +2493,7 @@ function Ji(e, t, n) {
|
|
|
2492
2493
|
return m.error("移除图层失败:", r), !1;
|
|
2493
2494
|
}
|
|
2494
2495
|
}
|
|
2495
|
-
function
|
|
2496
|
+
function ea(e, t) {
|
|
2496
2497
|
const n = t.value;
|
|
2497
2498
|
if (n)
|
|
2498
2499
|
try {
|
|
@@ -2503,40 +2504,40 @@ function Qi(e, t) {
|
|
|
2503
2504
|
m.error("移除所有图层失败:", r);
|
|
2504
2505
|
}
|
|
2505
2506
|
}
|
|
2506
|
-
function
|
|
2507
|
+
function an(e, t) {
|
|
2507
2508
|
if (typeof t == "string") {
|
|
2508
2509
|
const n = e.layers.get(t);
|
|
2509
2510
|
return n || (m.warn(`图层未找到: ${t}`), null);
|
|
2510
2511
|
}
|
|
2511
2512
|
return t;
|
|
2512
2513
|
}
|
|
2513
|
-
function
|
|
2514
|
+
function ta(e, t, n) {
|
|
2514
2515
|
try {
|
|
2515
|
-
const r =
|
|
2516
|
+
const r = an(e, t);
|
|
2516
2517
|
return r ? (r.show = n, !0) : !1;
|
|
2517
2518
|
} catch (r) {
|
|
2518
2519
|
return m.error("设置图层可见性失败:", r), !1;
|
|
2519
2520
|
}
|
|
2520
2521
|
}
|
|
2521
|
-
function
|
|
2522
|
+
function na(e, t, n) {
|
|
2522
2523
|
try {
|
|
2523
2524
|
if (typeof n != "number" || Number.isNaN(n) || n < 0 || n > 1)
|
|
2524
2525
|
return m.warn("透明度必须在 0-1 之间"), !1;
|
|
2525
|
-
const r =
|
|
2526
|
+
const r = an(e, t);
|
|
2526
2527
|
return r ? (r.alpha = n, !0) : !1;
|
|
2527
2528
|
} catch (r) {
|
|
2528
2529
|
return m.error("设置图层透明度失败:", r), !1;
|
|
2529
2530
|
}
|
|
2530
2531
|
}
|
|
2531
|
-
function
|
|
2532
|
+
function ra(e) {
|
|
2532
2533
|
const t = [];
|
|
2533
2534
|
return e.layers.forEach((n, r) => {
|
|
2534
2535
|
t.push({ name: r, layer: n });
|
|
2535
2536
|
}), t;
|
|
2536
2537
|
}
|
|
2537
|
-
function
|
|
2538
|
-
const t =
|
|
2539
|
-
return
|
|
2538
|
+
function ia(e) {
|
|
2539
|
+
const t = Ki();
|
|
2540
|
+
return G(() => {
|
|
2540
2541
|
try {
|
|
2541
2542
|
t.layers.clear();
|
|
2542
2543
|
} catch (n) {
|
|
@@ -2544,32 +2545,32 @@ function ra(e) {
|
|
|
2544
2545
|
}
|
|
2545
2546
|
}), {
|
|
2546
2547
|
// 图层管理
|
|
2547
|
-
addImageryLayer: (n) =>
|
|
2548
|
-
addWmtsLayer: (n, r) =>
|
|
2549
|
-
removeLayer: (n) =>
|
|
2550
|
-
removeAllLayers: () =>
|
|
2548
|
+
addImageryLayer: (n) => Xi(t, e, n),
|
|
2549
|
+
addWmtsLayer: (n, r) => Zi(t, e, n, r),
|
|
2550
|
+
removeLayer: (n) => Qi(t, e, n),
|
|
2551
|
+
removeAllLayers: () => ea(t, e),
|
|
2551
2552
|
// 图层控制
|
|
2552
|
-
setLayerVisible: (n, r) =>
|
|
2553
|
-
setLayerOpacity: (n, r) =>
|
|
2553
|
+
setLayerVisible: (n, r) => ta(t, n, r),
|
|
2554
|
+
setLayerOpacity: (n, r) => na(t, n, r),
|
|
2554
2555
|
// 查询
|
|
2555
|
-
getAllLayers: () =>
|
|
2556
|
+
getAllLayers: () => ra(t)
|
|
2556
2557
|
};
|
|
2557
2558
|
}
|
|
2558
|
-
function
|
|
2559
|
-
return { ...
|
|
2559
|
+
function aa(e) {
|
|
2560
|
+
return { ...Nn, ...e };
|
|
2560
2561
|
}
|
|
2561
|
-
function
|
|
2562
|
+
function oa(e, t) {
|
|
2562
2563
|
const n = e.Material.fromType("ElevationContour"), r = n.uniforms;
|
|
2563
2564
|
return r.width = t.width, r.spacing = t.spacing, r.color = e.Color.RED.clone(), n;
|
|
2564
2565
|
}
|
|
2565
|
-
function
|
|
2566
|
+
function la(e, t) {
|
|
2566
2567
|
const n = T(!1), r = (l) => {
|
|
2567
2568
|
const c = e.value;
|
|
2568
2569
|
if (c?.scene?.globe)
|
|
2569
2570
|
if (l) {
|
|
2570
2571
|
const u = D();
|
|
2571
2572
|
if (!u) return;
|
|
2572
|
-
c.scene.globe.material =
|
|
2573
|
+
c.scene.globe.material = oa(u, aa(t));
|
|
2573
2574
|
} else
|
|
2574
2575
|
c.scene.globe.material = void 0;
|
|
2575
2576
|
};
|
|
@@ -2581,8 +2582,8 @@ function oa(e, t) {
|
|
|
2581
2582
|
r(!1);
|
|
2582
2583
|
} };
|
|
2583
2584
|
}
|
|
2584
|
-
const
|
|
2585
|
-
function
|
|
2585
|
+
const sa = 2e4;
|
|
2586
|
+
function ca(e, t = {}) {
|
|
2586
2587
|
if (!Array.isArray(e) || e.length < 2)
|
|
2587
2588
|
throw new Error("轨迹至少需要2个点");
|
|
2588
2589
|
const n = t.interval && t.interval > 0 ? t.interval : 1;
|
|
@@ -2598,7 +2599,7 @@ function sa(e, t = {}) {
|
|
|
2598
2599
|
h.time > a && (i.push(h), a = h.time);
|
|
2599
2600
|
if (i.length < 2)
|
|
2600
2601
|
throw new Error("轨迹时间戳无效,无法构成回放时间表");
|
|
2601
|
-
const o = i.map((h) => h.time), l = o[0], c = o[o.length - 1] - l, u = t.duration && t.duration > 0 ? t.duration : c, s = t.maxPoints && t.maxPoints >= 2 ? Math.floor(t.maxPoints) :
|
|
2602
|
+
const o = i.map((h) => h.time), l = o[0], c = o[o.length - 1] - l, u = t.duration && t.duration > 0 ? t.duration : c, s = t.maxPoints && t.maxPoints >= 2 ? Math.floor(t.maxPoints) : sa;
|
|
2602
2603
|
let d = i;
|
|
2603
2604
|
if (i.length > s) {
|
|
2604
2605
|
const h = Math.ceil(i.length / s);
|
|
@@ -2632,7 +2633,7 @@ function he(e, t) {
|
|
|
2632
2633
|
progress: i > 0 ? (t - a) / i : 0
|
|
2633
2634
|
};
|
|
2634
2635
|
}
|
|
2635
|
-
function
|
|
2636
|
+
function ua(e, t = {}) {
|
|
2636
2637
|
const n = e.duration, r = !!t.loop;
|
|
2637
2638
|
let i = 0, a = Math.max(0, t.speed ?? 1), o = t.autoPlay ? "playing" : "idle";
|
|
2638
2639
|
const l = {
|
|
@@ -2658,14 +2659,14 @@ function ca(e, t = {}) {
|
|
|
2658
2659
|
};
|
|
2659
2660
|
return u(), { state: l, play: s, pause: d, stop: h, setSpeed: g, jumpTo: C, tick: w };
|
|
2660
2661
|
}
|
|
2661
|
-
function
|
|
2662
|
+
function da(e) {
|
|
2662
2663
|
const t = D();
|
|
2663
2664
|
return !!(t && t.SceneMode && e?.scene?.mode === t.SceneMode.SCENE2D);
|
|
2664
2665
|
}
|
|
2665
2666
|
function at(e, t, n = 1) {
|
|
2666
2667
|
return e.Color.fromCssColorString(t).withAlpha(n);
|
|
2667
2668
|
}
|
|
2668
|
-
function
|
|
2669
|
+
function fa(e, t, n, r) {
|
|
2669
2670
|
const i = t.map(
|
|
2670
2671
|
(a) => e.Cartesian3.fromDegrees(a.lng, a.lat, a.altitude ?? 0)
|
|
2671
2672
|
);
|
|
@@ -2678,7 +2679,7 @@ function da(e, t, n, r) {
|
|
|
2678
2679
|
}
|
|
2679
2680
|
});
|
|
2680
2681
|
}
|
|
2681
|
-
function
|
|
2682
|
+
function ha(e, t, n) {
|
|
2682
2683
|
return new e.Entity({
|
|
2683
2684
|
polyline: {
|
|
2684
2685
|
positions: [],
|
|
@@ -2688,14 +2689,14 @@ function fa(e, t, n) {
|
|
|
2688
2689
|
}
|
|
2689
2690
|
});
|
|
2690
2691
|
}
|
|
2691
|
-
function
|
|
2692
|
+
function ga(e, t) {
|
|
2692
2693
|
if (!e?.billboard || !t.markerIcon || typeof Image > "u") return;
|
|
2693
2694
|
const n = t.markerSize * 2, r = new Image();
|
|
2694
2695
|
r.onload = () => {
|
|
2695
2696
|
!e.billboard || !r.naturalWidth || !r.naturalHeight || (e.billboard.width = n, e.billboard.height = r.naturalHeight / r.naturalWidth * n);
|
|
2696
2697
|
}, r.src = t.markerIcon;
|
|
2697
2698
|
}
|
|
2698
|
-
function
|
|
2699
|
+
function pa(e, t, n = !0) {
|
|
2699
2700
|
const r = new e.ConstantPositionProperty(
|
|
2700
2701
|
e.Cartesian3.fromDegrees(0, 0, 0)
|
|
2701
2702
|
), i = new e.Entity({ position: r }), a = n ? e.HeightReference.CLAMP_TO_GROUND : e.HeightReference.NONE;
|
|
@@ -2709,18 +2710,18 @@ function ga(e, t, n = !0) {
|
|
|
2709
2710
|
pixelSize: t.markerSize,
|
|
2710
2711
|
color: at(e, t.markerColor, 1),
|
|
2711
2712
|
heightReference: a
|
|
2712
|
-
},
|
|
2713
|
+
}, ga(i, t), i;
|
|
2713
2714
|
}
|
|
2714
|
-
function
|
|
2715
|
+
function ma(e, t) {
|
|
2715
2716
|
return t.map(
|
|
2716
2717
|
(n) => e.Cartesian3.fromDegrees(n.lng, n.lat, n.altitude ?? 0)
|
|
2717
2718
|
);
|
|
2718
2719
|
}
|
|
2719
2720
|
function Et(e) {
|
|
2720
|
-
return { ...
|
|
2721
|
+
return { ...Vn, ...e };
|
|
2721
2722
|
}
|
|
2722
|
-
const
|
|
2723
|
-
function
|
|
2723
|
+
const va = 100, wa = 0.25;
|
|
2724
|
+
function ya(e, t, n) {
|
|
2724
2725
|
const r = T({
|
|
2725
2726
|
status: "idle",
|
|
2726
2727
|
currentTime: 0,
|
|
@@ -2741,23 +2742,23 @@ function wa(e, t, n) {
|
|
|
2741
2742
|
o && (r.value = { ...o.state });
|
|
2742
2743
|
}, b = (E) => {
|
|
2743
2744
|
if (!d) return;
|
|
2744
|
-
const
|
|
2745
|
-
|
|
2746
|
-
|
|
2745
|
+
const k = D();
|
|
2746
|
+
k && d.setValue(
|
|
2747
|
+
k.Cartesian3.fromDegrees(E.lng, E.lat, E.altitude)
|
|
2747
2748
|
);
|
|
2748
2749
|
}, B = (E) => {
|
|
2749
2750
|
if (!u || !a || !o) return;
|
|
2750
|
-
const
|
|
2751
|
-
if (!
|
|
2752
|
-
const F = o.state.currentTime, Y = l.trailTime > 0 ? Math.max(0, F - l.trailTime) : 0, ie = he(a, a.minTime + Y), te = a.points.slice(ie.index, E.index + 1), W =
|
|
2751
|
+
const k = D();
|
|
2752
|
+
if (!k) return;
|
|
2753
|
+
const F = o.state.currentTime, Y = l.trailTime > 0 ? Math.max(0, F - l.trailTime) : 0, ie = he(a, a.minTime + Y), te = a.points.slice(ie.index, E.index + 1), W = ma(k, te);
|
|
2753
2754
|
W.push(
|
|
2754
|
-
|
|
2755
|
+
k.Cartesian3.fromDegrees(E.lng, E.lat, E.altitude)
|
|
2755
2756
|
), u.polyline && (u.polyline.positions = W);
|
|
2756
2757
|
}, S = (E) => {
|
|
2757
|
-
const
|
|
2758
|
-
if (!
|
|
2758
|
+
const k = e.value;
|
|
2759
|
+
if (!k?.camera) return;
|
|
2759
2760
|
const F = D();
|
|
2760
|
-
F &&
|
|
2761
|
+
F && k.camera.setView({
|
|
2761
2762
|
destination: F.Cartesian3.fromDegrees(
|
|
2762
2763
|
E.lng,
|
|
2763
2764
|
E.lat,
|
|
@@ -2771,42 +2772,42 @@ function wa(e, t, n) {
|
|
|
2771
2772
|
return;
|
|
2772
2773
|
}
|
|
2773
2774
|
h = requestAnimationFrame(x);
|
|
2774
|
-
const
|
|
2775
|
+
const k = Math.min(
|
|
2775
2776
|
Math.max((E - g) / 1e3, 0),
|
|
2776
|
-
|
|
2777
|
+
wa
|
|
2777
2778
|
);
|
|
2778
|
-
g = E, o.tick(
|
|
2779
|
+
g = E, o.tick(k);
|
|
2779
2780
|
const F = he(a, a.minTime + o.state.currentTime);
|
|
2780
|
-
b(F), E - C >=
|
|
2781
|
+
b(F), E - C >= va && (B(F), C = E), l.follow && S(F), v();
|
|
2781
2782
|
}, z = () => {
|
|
2782
2783
|
h === null && (g = performance.now(), C = 0, h = requestAnimationFrame(x));
|
|
2783
|
-
}, H = (E,
|
|
2784
|
+
}, H = (E, k) => {
|
|
2784
2785
|
if (!a) return;
|
|
2785
|
-
const F = !
|
|
2786
|
-
c =
|
|
2786
|
+
const F = !da(E);
|
|
2787
|
+
c = fa(k, a.displayPoints, l, F), u = ha(k, l, F), s = pa(k, l, F), d = s.position ?? null, E.entities.add(c), E.entities.add(u), E.entities.add(s);
|
|
2787
2788
|
const Y = he(
|
|
2788
2789
|
a,
|
|
2789
2790
|
a.minTime + (o ? o.state.currentTime : 0)
|
|
2790
2791
|
);
|
|
2791
2792
|
b(Y), B(Y);
|
|
2792
|
-
}, V = (E,
|
|
2793
|
+
}, V = (E, k) => {
|
|
2793
2794
|
const F = w(), Y = D();
|
|
2794
2795
|
if (!F || !Y) return;
|
|
2795
|
-
|
|
2796
|
+
Wt.loadScripts(
|
|
2796
2797
|
["move-marker", "bmgl-header"],
|
|
2797
2798
|
n?.serverUrl,
|
|
2798
2799
|
n?.libsUrl || tt
|
|
2799
2800
|
).catch(
|
|
2800
2801
|
(te) => m.warn("[useMapTrajectory] 轨迹辅助库加载失败:", te)
|
|
2801
|
-
), l = Et({ ...i, ...
|
|
2802
|
+
), l = Et({ ...i, ...k });
|
|
2802
2803
|
let ie;
|
|
2803
2804
|
try {
|
|
2804
|
-
ie =
|
|
2805
|
+
ie = ca(E, l);
|
|
2805
2806
|
} catch (te) {
|
|
2806
2807
|
m.warn("[useMapTrajectory] 轨迹数据无效:", te);
|
|
2807
2808
|
return;
|
|
2808
2809
|
}
|
|
2809
|
-
p(), y(), a = ie, o =
|
|
2810
|
+
p(), y(), a = ie, o = ua(a, l), H(F, Y), v(), l.autoPlay && M();
|
|
2810
2811
|
}, M = () => {
|
|
2811
2812
|
o && (o.play(), v(), o.state.status === "playing" && z());
|
|
2812
2813
|
}, I = () => {
|
|
@@ -2821,8 +2822,8 @@ function wa(e, t, n) {
|
|
|
2821
2822
|
}, q = (E) => {
|
|
2822
2823
|
if (!o || !a) return;
|
|
2823
2824
|
o.jumpTo(E);
|
|
2824
|
-
const
|
|
2825
|
-
b(
|
|
2825
|
+
const k = he(a, a.minTime + o.state.currentTime);
|
|
2826
|
+
b(k), B(k), v();
|
|
2826
2827
|
}, Z = () => {
|
|
2827
2828
|
p(), y(), a = null, o = null, r.value = {
|
|
2828
2829
|
status: "idle",
|
|
@@ -2832,8 +2833,8 @@ function wa(e, t, n) {
|
|
|
2832
2833
|
pointCount: 0
|
|
2833
2834
|
};
|
|
2834
2835
|
}, se = () => {
|
|
2835
|
-
const E = w(),
|
|
2836
|
-
!E || !
|
|
2836
|
+
const E = w(), k = D();
|
|
2837
|
+
!E || !k || !a || !o || (y(), H(E, k));
|
|
2837
2838
|
}, ce = () => {
|
|
2838
2839
|
p(), y();
|
|
2839
2840
|
}, J = () => {
|
|
@@ -2845,7 +2846,7 @@ function wa(e, t, n) {
|
|
|
2845
2846
|
pointCount: 0
|
|
2846
2847
|
};
|
|
2847
2848
|
};
|
|
2848
|
-
return
|
|
2849
|
+
return G(() => {
|
|
2849
2850
|
J();
|
|
2850
2851
|
}), {
|
|
2851
2852
|
state: r,
|
|
@@ -2861,11 +2862,11 @@ function wa(e, t, n) {
|
|
|
2861
2862
|
destroy: J
|
|
2862
2863
|
};
|
|
2863
2864
|
}
|
|
2864
|
-
function
|
|
2865
|
+
function Ca(e) {
|
|
2865
2866
|
const t = D();
|
|
2866
2867
|
return !!(t && t.SceneMode && e?.scene?.mode === t.SceneMode.SCENE2D);
|
|
2867
2868
|
}
|
|
2868
|
-
function
|
|
2869
|
+
function ba(e, t = 30) {
|
|
2869
2870
|
let n = 1 / 0, r = -1 / 0, i = 1 / 0, a = -1 / 0;
|
|
2870
2871
|
for (const c of e)
|
|
2871
2872
|
c.lng < n && (n = c.lng), c.lng > r && (r = c.lng), c.lat < i && (i = c.lat), c.lat > a && (a = c.lat);
|
|
@@ -2877,7 +2878,7 @@ function Ca(e, t = 30) {
|
|
|
2877
2878
|
{ lng: Math.max(-180, n - l), lat: Math.min(85, a + l) }
|
|
2878
2879
|
];
|
|
2879
2880
|
}
|
|
2880
|
-
function
|
|
2881
|
+
function on(e, t, n = 1) {
|
|
2881
2882
|
return e.Color.fromCssColorString(t).withAlpha(n);
|
|
2882
2883
|
}
|
|
2883
2884
|
function Xe(e, t) {
|
|
@@ -2885,40 +2886,40 @@ function Xe(e, t) {
|
|
|
2885
2886
|
(n) => e.Cartesian3.fromDegrees(n.lng, n.lat, n.altitude ?? 0)
|
|
2886
2887
|
);
|
|
2887
2888
|
}
|
|
2888
|
-
function
|
|
2889
|
+
function Ea(e, t, n, r, i) {
|
|
2889
2890
|
const a = {
|
|
2890
2891
|
// 多边形层次:外边界(覆盖范围)+ 洞(保留区域)=> 仅保留区域不被遮罩
|
|
2891
2892
|
hierarchy: {
|
|
2892
2893
|
positions: Xe(e, t),
|
|
2893
2894
|
holes: [{ positions: Xe(e, n) }]
|
|
2894
2895
|
},
|
|
2895
|
-
material:
|
|
2896
|
+
material: on(e, r.fillColor, r.fillAlpha)
|
|
2896
2897
|
};
|
|
2897
2898
|
return i || (a.height = 0), new e.Entity({ polygon: a });
|
|
2898
2899
|
}
|
|
2899
|
-
function
|
|
2900
|
+
function Sa(e, t, n, r) {
|
|
2900
2901
|
return new e.Entity({
|
|
2901
2902
|
polyline: {
|
|
2902
2903
|
positions: Xe(e, t),
|
|
2903
2904
|
width: n.outlineWidth,
|
|
2904
2905
|
material: new e.PolylineGlowMaterialProperty({
|
|
2905
2906
|
glowPower: 0.4,
|
|
2906
|
-
color:
|
|
2907
|
+
color: on(e, n.outlineColor, n.outlineAlpha)
|
|
2907
2908
|
}),
|
|
2908
2909
|
clampToGround: r
|
|
2909
2910
|
}
|
|
2910
2911
|
});
|
|
2911
2912
|
}
|
|
2912
|
-
function
|
|
2913
|
-
return { ...
|
|
2913
|
+
function Ge(e) {
|
|
2914
|
+
return { ...On, ...e };
|
|
2914
2915
|
}
|
|
2915
|
-
function
|
|
2916
|
+
function Da(e, t) {
|
|
2916
2917
|
const n = T({
|
|
2917
2918
|
visible: !1,
|
|
2918
2919
|
hasMask: !1,
|
|
2919
2920
|
boundaryCount: 0
|
|
2920
2921
|
});
|
|
2921
|
-
let r =
|
|
2922
|
+
let r = Ge(t), i = null, a = null, o = null, l = null;
|
|
2922
2923
|
const c = () => {
|
|
2923
2924
|
const v = e.value;
|
|
2924
2925
|
return v && v.entities ? v : null;
|
|
@@ -2927,8 +2928,8 @@ function Sa(e, t) {
|
|
|
2927
2928
|
v && (a && v.entities.remove(a), o && v.entities.remove(o)), a = null, o = null;
|
|
2928
2929
|
}, s = (v, b) => {
|
|
2929
2930
|
if (!i) return;
|
|
2930
|
-
const B = !
|
|
2931
|
-
a =
|
|
2931
|
+
const B = !Ca(v), S = r.outerRing ?? ba(i);
|
|
2932
|
+
a = Ea(b, S, i, r, B), o = r.showOutline ? Sa(b, i, r, B) : null, v.entities.add(a), o && v.entities.add(o);
|
|
2932
2933
|
}, d = () => {
|
|
2933
2934
|
const v = c(), b = D();
|
|
2934
2935
|
!v || !b || !i || (u(), s(v, b));
|
|
@@ -2939,7 +2940,7 @@ function Sa(e, t) {
|
|
|
2939
2940
|
v.morphComplete.addEventListener(b), l = () => v.morphComplete.removeEventListener(b);
|
|
2940
2941
|
}, g = (v, b) => {
|
|
2941
2942
|
const B = c(), S = D();
|
|
2942
|
-
!B || !S || !v || !v.length || (r =
|
|
2943
|
+
!B || !S || !v || !v.length || (r = Ge({ ...t, ...b }), i = v, u(), s(B, S), n.value = {
|
|
2943
2944
|
visible: !0,
|
|
2944
2945
|
hasMask: !0,
|
|
2945
2946
|
boundaryCount: v.length
|
|
@@ -2949,15 +2950,15 @@ function Sa(e, t) {
|
|
|
2949
2950
|
}, w = () => {
|
|
2950
2951
|
u();
|
|
2951
2952
|
}, p = () => {
|
|
2952
|
-
l && (l(), l = null), u(), i = null, r =
|
|
2953
|
+
l && (l(), l = null), u(), i = null, r = Ge(t), n.value = { visible: !1, hasMask: !1, boundaryCount: 0 };
|
|
2953
2954
|
}, y = () => {
|
|
2954
2955
|
p();
|
|
2955
2956
|
};
|
|
2956
|
-
return
|
|
2957
|
+
return G(() => {
|
|
2957
2958
|
y();
|
|
2958
2959
|
}), { state: n, setMask: g, setVisible: C, clear: p, reapply: d, remove: w, destroy: y };
|
|
2959
2960
|
}
|
|
2960
|
-
function
|
|
2961
|
+
function Ta(e = 0.5) {
|
|
2961
2962
|
return `
|
|
2962
2963
|
uniform sampler2D colorTexture;
|
|
2963
2964
|
varying vec2 v_textureCoordinates;
|
|
@@ -2987,7 +2988,7 @@ void main(void){
|
|
|
2987
2988
|
}
|
|
2988
2989
|
`;
|
|
2989
2990
|
}
|
|
2990
|
-
function
|
|
2991
|
+
function Ma(e = 0.3) {
|
|
2991
2992
|
return `
|
|
2992
2993
|
uniform sampler2D colorTexture;
|
|
2993
2994
|
varying vec2 v_textureCoordinates;
|
|
@@ -3025,7 +3026,7 @@ const St = {
|
|
|
3025
3026
|
rain: 0.5,
|
|
3026
3027
|
snow: 0.3
|
|
3027
3028
|
};
|
|
3028
|
-
function
|
|
3029
|
+
function Ia(e, t) {
|
|
3029
3030
|
const n = T({ type: "clear", active: !1 });
|
|
3030
3031
|
let r = null;
|
|
3031
3032
|
const i = () => {
|
|
@@ -3038,7 +3039,7 @@ function Ma(e, t) {
|
|
|
3038
3039
|
n.value = { type: "clear", active: !1 };
|
|
3039
3040
|
return;
|
|
3040
3041
|
}
|
|
3041
|
-
const h = u?.opacity ?? t?.opacity ?? St[c], g = c === "rain" ?
|
|
3042
|
+
const h = u?.opacity ?? t?.opacity ?? St[c], g = c === "rain" ? Ta(h) : Ma(h);
|
|
3042
3043
|
r = new d.PostProcessStage({
|
|
3043
3044
|
name: `weather_${c}`,
|
|
3044
3045
|
fragmentShader: g
|
|
@@ -3048,24 +3049,24 @@ function Ma(e, t) {
|
|
|
3048
3049
|
}, l = () => {
|
|
3049
3050
|
o();
|
|
3050
3051
|
};
|
|
3051
|
-
return
|
|
3052
|
+
return G(() => {
|
|
3052
3053
|
l();
|
|
3053
3054
|
}), { state: n, setWeather: a, clear: o, destroy: l };
|
|
3054
3055
|
}
|
|
3055
|
-
const
|
|
3056
|
+
const xa = 6, Aa = 18, La = 20;
|
|
3056
3057
|
function ka(e) {
|
|
3057
3058
|
return {
|
|
3058
|
-
day: e?.dayStartHour ??
|
|
3059
|
-
dusk: e?.duskStartHour ??
|
|
3060
|
-
night: e?.nightStartHour ??
|
|
3059
|
+
day: e?.dayStartHour ?? xa,
|
|
3060
|
+
dusk: e?.duskStartHour ?? Aa,
|
|
3061
|
+
night: e?.nightStartHour ?? La
|
|
3061
3062
|
};
|
|
3062
3063
|
}
|
|
3063
|
-
function
|
|
3064
|
+
function _a(e, t) {
|
|
3064
3065
|
const { day: n, dusk: r, night: i } = ka(t);
|
|
3065
3066
|
return e >= n && e < r ? "day" : e >= r && e < i ? "dusk" : "night";
|
|
3066
3067
|
}
|
|
3067
3068
|
const We = { x: 0.5781, y: -0.5781, z: 0.5758 };
|
|
3068
|
-
function
|
|
3069
|
+
function Pa(e, t) {
|
|
3069
3070
|
if (e === "day") return new t.SunLight();
|
|
3070
3071
|
const n = e === "night";
|
|
3071
3072
|
return new t.DirectionalLight({
|
|
@@ -3078,7 +3079,7 @@ function _a(e, t) {
|
|
|
3078
3079
|
intensity: n ? 0.5 : 1
|
|
3079
3080
|
});
|
|
3080
3081
|
}
|
|
3081
|
-
function
|
|
3082
|
+
function Ba(e, t, n) {
|
|
3082
3083
|
const r = n?.is3D ?? T(!0), i = T(null), a = T({
|
|
3083
3084
|
enabled: !!t?.enabled,
|
|
3084
3085
|
mode: "auto",
|
|
@@ -3088,7 +3089,7 @@ function Pa(e, t, n) {
|
|
|
3088
3089
|
let o, l, c;
|
|
3089
3090
|
const u = () => {
|
|
3090
3091
|
const p = t?.now?.() ?? /* @__PURE__ */ new Date();
|
|
3091
|
-
a.value.hour = p.getHours(), a.value.mode = i.value ? "manual" : "auto", a.value.period = i.value ??
|
|
3092
|
+
a.value.hour = p.getHours(), a.value.mode = i.value ? "manual" : "auto", a.value.period = i.value ?? _a(a.value.hour, t);
|
|
3092
3093
|
}, s = () => {
|
|
3093
3094
|
const p = e.value;
|
|
3094
3095
|
if (!p?.scene) {
|
|
@@ -3102,7 +3103,7 @@ function Pa(e, t, n) {
|
|
|
3102
3103
|
if (!p?.scene || !y) return;
|
|
3103
3104
|
const v = p.scene;
|
|
3104
3105
|
l === void 0 && (o = v.light, l = !!v.globe.enableLighting), v.globe.enableLighting = !0;
|
|
3105
|
-
const b =
|
|
3106
|
+
const b = Pa(a.value.period, y);
|
|
3106
3107
|
v.light = b, c = b;
|
|
3107
3108
|
}, h = () => {
|
|
3108
3109
|
u(), a.value.enabled && r.value ? d() : s();
|
|
@@ -3113,21 +3114,21 @@ function Pa(e, t, n) {
|
|
|
3113
3114
|
}, w = () => {
|
|
3114
3115
|
a.value.enabled = !1, s();
|
|
3115
3116
|
};
|
|
3116
|
-
return
|
|
3117
|
+
return G(() => w()), u(), { state: a, setEnabled: g, setPeriod: C, apply: h, destroy: w };
|
|
3117
3118
|
}
|
|
3118
|
-
function
|
|
3119
|
+
function Ra(e, t) {
|
|
3119
3120
|
const n = e.layer || "PostGIS:dommap";
|
|
3120
3121
|
return `${e.baseUrl.replace(/\/$/, "")}?layer=${n}&geo-token=${t}&style=&tilematrixset=EPSG%3A3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fvnd.jpeg-png&TileMatrix=EPSG%3A3857%3A{TileMatrix}&TileCol={TileCol}&TileRow={TileRow}`;
|
|
3121
3122
|
}
|
|
3122
|
-
function
|
|
3123
|
+
function za(e) {
|
|
3123
3124
|
return async () => {
|
|
3124
3125
|
const t = e.token;
|
|
3125
3126
|
if (!t)
|
|
3126
3127
|
throw new Error("未提供 GeoServer 令牌(geoserver.token),无法拼接 WMTS 地址");
|
|
3127
|
-
return
|
|
3128
|
+
return Ra(e, t);
|
|
3128
3129
|
};
|
|
3129
3130
|
}
|
|
3130
|
-
function
|
|
3131
|
+
function Fa() {
|
|
3131
3132
|
return {
|
|
3132
3133
|
mapType: T("3d"),
|
|
3133
3134
|
mapBase: T("bigemap"),
|
|
@@ -3138,10 +3139,10 @@ function za() {
|
|
|
3138
3139
|
mapNameVisible: T(!1)
|
|
3139
3140
|
};
|
|
3140
3141
|
}
|
|
3141
|
-
function
|
|
3142
|
+
function Le(e) {
|
|
3142
3143
|
return typeof e == "number" && !Number.isNaN(e);
|
|
3143
3144
|
}
|
|
3144
|
-
function
|
|
3145
|
+
function Na(e) {
|
|
3145
3146
|
const t = T(""), n = T([]), r = T(!1), i = T(!1), a = T(!1), o = T(-1), l = T(-1);
|
|
3146
3147
|
let c, u, s = 0;
|
|
3147
3148
|
const d = R(
|
|
@@ -3174,24 +3175,24 @@ function Fa(e) {
|
|
|
3174
3175
|
},
|
|
3175
3176
|
e.debounceTime
|
|
3176
3177
|
);
|
|
3177
|
-
}, C = (S) =>
|
|
3178
|
-
if (!
|
|
3178
|
+
}, C = (S) => Le(S.altitude) ? S.altitude + Yn : e.position?.height ?? ye.height, w = (S) => {
|
|
3179
|
+
if (!Le(S.lng) || !Le(S.lat)) return;
|
|
3179
3180
|
e.setView(S.lng, S.lat, C(S));
|
|
3180
3181
|
const x = e.addWave({
|
|
3181
3182
|
position: [
|
|
3182
3183
|
S.lng,
|
|
3183
3184
|
S.lat,
|
|
3184
|
-
|
|
3185
|
+
Le(S.altitude) ? S.altitude : 0
|
|
3185
3186
|
],
|
|
3186
3187
|
config: {
|
|
3187
3188
|
color: "#0a84ff",
|
|
3188
|
-
radius:
|
|
3189
|
+
radius: jn,
|
|
3189
3190
|
duration: nt.WAVE
|
|
3190
3191
|
}
|
|
3191
3192
|
});
|
|
3192
3193
|
u && clearTimeout(u), u = setTimeout(
|
|
3193
3194
|
() => e.removeWave(x),
|
|
3194
|
-
|
|
3195
|
+
Hn
|
|
3195
3196
|
);
|
|
3196
3197
|
}, p = (S, x) => {
|
|
3197
3198
|
l.value = x, w(S), r.value = !1;
|
|
@@ -3206,7 +3207,7 @@ function Fa(e) {
|
|
|
3206
3207
|
}, B = () => {
|
|
3207
3208
|
t.value = "", n.value = [], r.value = !1, a.value = !1, l.value = -1, o.value = -1;
|
|
3208
3209
|
};
|
|
3209
|
-
return
|
|
3210
|
+
return G(() => {
|
|
3210
3211
|
c && clearTimeout(c), u && clearTimeout(u);
|
|
3211
3212
|
}), {
|
|
3212
3213
|
searchInput: t,
|
|
@@ -3225,16 +3226,17 @@ function Fa(e) {
|
|
|
3225
3226
|
clearSearch: B
|
|
3226
3227
|
};
|
|
3227
3228
|
}
|
|
3228
|
-
function
|
|
3229
|
+
function Va(e) {
|
|
3229
3230
|
e.toggleMapTypeCore();
|
|
3230
|
-
const n = (e.mapType.value === "3d" ? "2d" : "3d") === "3d" ?
|
|
3231
|
+
const n = (e.mapType.value === "3d" ? "2d" : "3d") === "3d" ? Un : Wn;
|
|
3231
3232
|
setTimeout(() => e.redrawAllEntities(), n);
|
|
3232
3233
|
}
|
|
3233
|
-
function
|
|
3234
|
+
function Oa(e) {
|
|
3234
3235
|
e.position && e.setView(e.position.lng, e.position.lat, e.position.height);
|
|
3235
3236
|
}
|
|
3236
3237
|
async function Ze(e) {
|
|
3237
|
-
|
|
3238
|
+
for (const t of e.baseLayers)
|
|
3239
|
+
e.loadingSubtitle.value = `正在添加底图图层(${t})...`, await e.addImageryLayer(t);
|
|
3238
3240
|
}
|
|
3239
3241
|
async function Dt(e) {
|
|
3240
3242
|
if (!e.wmtsUrlProvider)
|
|
@@ -3244,7 +3246,7 @@ async function Dt(e) {
|
|
|
3244
3246
|
throw new Error("wmtsUrlProvider 未返回有效地址,无法切换到生产底图");
|
|
3245
3247
|
await e.addWmtsLayer(t, "geoserver");
|
|
3246
3248
|
}
|
|
3247
|
-
async function
|
|
3249
|
+
async function $a(e) {
|
|
3248
3250
|
if (!e.map.value) return;
|
|
3249
3251
|
const t = e.mapBase.value, n = t === "bigemap" ? "geoserver" : "bigemap";
|
|
3250
3252
|
e.loadingSubtitle.value = "正在切换地图底图...";
|
|
@@ -3266,30 +3268,30 @@ async function Ga(e) {
|
|
|
3266
3268
|
try {
|
|
3267
3269
|
await Ze(e);
|
|
3268
3270
|
} catch (t) {
|
|
3269
|
-
m.error("
|
|
3271
|
+
m.error("加载底图图层失败:", t);
|
|
3270
3272
|
}
|
|
3271
3273
|
}
|
|
3272
|
-
function
|
|
3274
|
+
function Wa(e) {
|
|
3273
3275
|
return (t) => {
|
|
3274
3276
|
if (e.getIsDrawing() || !e.map.value || !t.position) return;
|
|
3275
3277
|
e.removePopup();
|
|
3276
3278
|
const n = e.map.value.scene.pick(t.position);
|
|
3277
3279
|
if (n && n.primitive && n.primitive.pointData) {
|
|
3278
3280
|
const r = n.primitive.pointData;
|
|
3279
|
-
e.onPointClick(r), e.showPointPopup(
|
|
3281
|
+
e.onPointClick(r), e.showPointPopup(ln(r), {
|
|
3280
3282
|
offsetX: 0,
|
|
3281
3283
|
offsetY: -25
|
|
3282
3284
|
});
|
|
3283
3285
|
}
|
|
3284
3286
|
};
|
|
3285
3287
|
}
|
|
3286
|
-
function
|
|
3288
|
+
function Ua(e, t) {
|
|
3287
3289
|
const n = document.querySelector(".map-point-popup");
|
|
3288
3290
|
if (!n) return !1;
|
|
3289
3291
|
const r = t.getBoundingClientRect(), i = n.getBoundingClientRect(), a = r.left + e.x, o = r.top + e.y;
|
|
3290
3292
|
return a >= i.left - 8 && a <= i.right + 8 && o >= i.top - 8 && o <= i.bottom + 8;
|
|
3291
3293
|
}
|
|
3292
|
-
function
|
|
3294
|
+
function Ha(e) {
|
|
3293
3295
|
let t = null;
|
|
3294
3296
|
const n = (r) => r?.id ?? r?.pointNo ?? r?.name ?? "";
|
|
3295
3297
|
return (r) => {
|
|
@@ -3297,24 +3299,24 @@ function Ua(e) {
|
|
|
3297
3299
|
const i = e.map.value.scene.canvas, a = e.map.value.scene.pick(r.endPosition);
|
|
3298
3300
|
if (a && a.primitive && a.primitive.pointData) {
|
|
3299
3301
|
const o = a.primitive.pointData, l = n(o);
|
|
3300
|
-
l !== t && (t = l, e.showPointPopup(
|
|
3302
|
+
l !== t && (t = l, e.showPointPopup(ln(o), {
|
|
3301
3303
|
offsetX: 0,
|
|
3302
3304
|
offsetY: -25
|
|
3303
3305
|
}));
|
|
3304
|
-
} else
|
|
3306
|
+
} else Ua(r.endPosition, i) || (t = null, e.removePopup());
|
|
3305
3307
|
};
|
|
3306
3308
|
}
|
|
3307
|
-
function
|
|
3309
|
+
function ln(e) {
|
|
3308
3310
|
return { ...e };
|
|
3309
3311
|
}
|
|
3310
|
-
function
|
|
3312
|
+
function ja(e) {
|
|
3311
3313
|
if (!e.map.value) return null;
|
|
3312
3314
|
const t = P(), n = new t.ScreenSpaceEventHandler(e.map.value.scene.canvas);
|
|
3313
3315
|
return n.setInputAction(
|
|
3314
|
-
|
|
3316
|
+
Wa(e),
|
|
3315
3317
|
t.ScreenSpaceEventType.LEFT_CLICK
|
|
3316
3318
|
), n.setInputAction(
|
|
3317
|
-
|
|
3319
|
+
Ha(e),
|
|
3318
3320
|
t.ScreenSpaceEventType.MOUSE_MOVE
|
|
3319
3321
|
), n;
|
|
3320
3322
|
}
|
|
@@ -3326,12 +3328,15 @@ function Tt(e) {
|
|
|
3326
3328
|
m.warn("[useMapView] destroy click listener error:", t);
|
|
3327
3329
|
}
|
|
3328
3330
|
}
|
|
3329
|
-
const
|
|
3331
|
+
const sn = [
|
|
3330
3332
|
"containerId",
|
|
3331
3333
|
"position",
|
|
3332
3334
|
"serverUrl",
|
|
3333
3335
|
"accessToken",
|
|
3334
3336
|
"libsUrl",
|
|
3337
|
+
"mapId",
|
|
3338
|
+
"terrainId",
|
|
3339
|
+
"baseLayers",
|
|
3335
3340
|
"showSearch",
|
|
3336
3341
|
"showControls",
|
|
3337
3342
|
"showDeleteControls",
|
|
@@ -3342,12 +3347,15 @@ const ln = [
|
|
|
3342
3347
|
"geoserver",
|
|
3343
3348
|
"contourConfig",
|
|
3344
3349
|
"lightingConfig"
|
|
3345
|
-
],
|
|
3350
|
+
], Ya = {
|
|
3346
3351
|
containerId: String,
|
|
3347
3352
|
position: Object,
|
|
3348
3353
|
serverUrl: String,
|
|
3349
3354
|
accessToken: String,
|
|
3350
3355
|
libsUrl: String,
|
|
3356
|
+
mapId: String,
|
|
3357
|
+
terrainId: String,
|
|
3358
|
+
baseLayers: Array,
|
|
3351
3359
|
showSearch: Boolean,
|
|
3352
3360
|
showControls: Boolean,
|
|
3353
3361
|
showDeleteControls: Boolean,
|
|
@@ -3359,34 +3367,36 @@ const ln = [
|
|
|
3359
3367
|
contourConfig: Object,
|
|
3360
3368
|
lightingConfig: Boolean
|
|
3361
3369
|
};
|
|
3362
|
-
function
|
|
3370
|
+
function qa(e, t) {
|
|
3363
3371
|
const n = e ?? {}, r = {};
|
|
3364
|
-
for (const i of
|
|
3372
|
+
for (const i of sn) r[i] = n[i];
|
|
3365
3373
|
return { ...r, theme: t.theme, popupConfig: t.popupConfig };
|
|
3366
3374
|
}
|
|
3367
|
-
function
|
|
3368
|
-
const n =
|
|
3375
|
+
function Ka(e, t) {
|
|
3376
|
+
const n = Fa(), r = R(() => !!e.showSearch), i = R(() => e.showControls !== !1), a = R(() => e.showDeleteControls !== !1), o = R(() => !!e.showStatus), l = e.wmtsUrlProvider ?? (e.geoserver ? za(e.geoserver) : void 0), c = R(() => !!l), u = R(() => ({
|
|
3369
3377
|
containerId: e.containerId,
|
|
3370
3378
|
position: e.position || ye,
|
|
3371
3379
|
serverUrl: e.serverUrl,
|
|
3372
3380
|
accessToken: e.accessToken,
|
|
3373
|
-
libsUrl: e.libsUrl
|
|
3374
|
-
|
|
3381
|
+
libsUrl: e.libsUrl,
|
|
3382
|
+
mapId: e.mapId,
|
|
3383
|
+
terrainId: e.terrainId
|
|
3384
|
+
})), { map: s, state: d, initMap: h, setView: g, toggleMapType: C } = Dr(u.value), { loadPoints: w, searchByText: p, updatePoints: y, clearPoints: v, searchByShape: b } = Or(s), { drawEntity: B, deleteEntity: S, redrawAllEntities: x } = li(s), {
|
|
3375
3385
|
startDrawing: z,
|
|
3376
3386
|
cancelDrawing: H,
|
|
3377
3387
|
clearAllDrawings: V,
|
|
3378
3388
|
removeDrawing: M,
|
|
3379
3389
|
setCallback: I,
|
|
3380
3390
|
getIsDrawing: O
|
|
3381
|
-
} =
|
|
3391
|
+
} = Pi(s), { showPointPopup: _, removePopup: q } = Yi(s, void 0, { displayConfig: e.popupConfig }), { addWave: Z, removeWave: se } = qi(s), { addWmtsLayer: ce, addImageryLayer: J, removeAllLayers: E, setLayerVisible: k } = ia(s), { contourVisible: F, setContourVisible: Y, reapply: ie, remove: te } = la(
|
|
3382
3392
|
s,
|
|
3383
3393
|
e.contourConfig
|
|
3384
|
-
), W =
|
|
3394
|
+
), W = ya(s, void 0, {
|
|
3385
3395
|
serverUrl: e.serverUrl,
|
|
3386
3396
|
libsUrl: e.libsUrl
|
|
3387
|
-
}), ue =
|
|
3397
|
+
}), ue = Da(s), Se = Ia(s), ae = Ba(s, { enabled: e.lightingConfig === !0 }, { is3D: R(() => d.value.mapType === "3d") });
|
|
3388
3398
|
n.theme.value = e.theme || "dark";
|
|
3389
|
-
const
|
|
3399
|
+
const pn = Na({
|
|
3390
3400
|
searchByText: p,
|
|
3391
3401
|
setView: g,
|
|
3392
3402
|
addWave: Z,
|
|
@@ -3399,14 +3409,14 @@ function qa(e, t) {
|
|
|
3399
3409
|
Re += 1, n.loadingTitle.value = A, n.loadingSubtitle.value = Ve, d.value.isLoading = !0;
|
|
3400
3410
|
}, ot = () => {
|
|
3401
3411
|
d.value.isLoading = !1;
|
|
3402
|
-
},
|
|
3412
|
+
}, mn = (A, Ve, Mn) => {
|
|
3403
3413
|
ze(A, Ve);
|
|
3404
|
-
const
|
|
3414
|
+
const In = Re;
|
|
3405
3415
|
setTimeout(() => {
|
|
3406
|
-
|
|
3407
|
-
},
|
|
3408
|
-
},
|
|
3409
|
-
|
|
3416
|
+
In === Re && ot();
|
|
3417
|
+
}, Mn);
|
|
3418
|
+
}, vn = "bigemap.dc-street", Fe = () => {
|
|
3419
|
+
k(vn, n.mapNameVisible.value);
|
|
3410
3420
|
}, lt = (A) => {
|
|
3411
3421
|
n.mapNameVisible.value = !!A, Fe();
|
|
3412
3422
|
}, st = (A) => {
|
|
@@ -3417,6 +3427,8 @@ function qa(e, t) {
|
|
|
3417
3427
|
mapBase: n.mapBase,
|
|
3418
3428
|
loadingSubtitle: n.loadingSubtitle,
|
|
3419
3429
|
position: e.position,
|
|
3430
|
+
// 底图图层:配置优先,未配置回退默认(卫星影像 + 街道地名)
|
|
3431
|
+
baseLayers: e.baseLayers ?? Ot,
|
|
3420
3432
|
// 注意:传入含 geoserver 回退的完整 provider(与 wmtsEnabled 判定同源),
|
|
3421
3433
|
// 否则仅配置 geoserver 时按钮可见但切换必然失败
|
|
3422
3434
|
wmtsUrlProvider: l,
|
|
@@ -3426,29 +3438,29 @@ function qa(e, t) {
|
|
|
3426
3438
|
removeAllLayers: E,
|
|
3427
3439
|
addImageryLayer: J,
|
|
3428
3440
|
addWmtsLayer: ce
|
|
3429
|
-
},
|
|
3441
|
+
}, wn = {
|
|
3430
3442
|
map: s,
|
|
3431
3443
|
getIsDrawing: O,
|
|
3432
3444
|
removePopup: q,
|
|
3433
3445
|
showPointPopup: _,
|
|
3434
3446
|
onPointClick: t.onPointClick
|
|
3435
|
-
},
|
|
3447
|
+
}, yn = () => {
|
|
3436
3448
|
V(), t.emit("clear-button-click"), t.emit("clear-draw");
|
|
3437
|
-
},
|
|
3449
|
+
}, Cn = (A) => {
|
|
3438
3450
|
n.currentDrawType.value = A, z(A);
|
|
3439
|
-
}, Cn = () => {
|
|
3440
|
-
n.currentDrawType.value = null;
|
|
3441
3451
|
}, bn = () => {
|
|
3452
|
+
n.currentDrawType.value = null;
|
|
3453
|
+
}, En = () => {
|
|
3442
3454
|
I((A) => {
|
|
3443
|
-
|
|
3455
|
+
bn(), A.operation === "draw" || A.operation === "edit" ? t.emit("draw-end", A) : A.operation === "delete" ? t.emit("draw-delete", A) : A.operation === "clear" && t.emit("draw-clear", A);
|
|
3444
3456
|
});
|
|
3445
3457
|
};
|
|
3446
3458
|
let de;
|
|
3447
|
-
const
|
|
3459
|
+
const Sn = () => {
|
|
3448
3460
|
de && clearTimeout(de), de = setTimeout(() => {
|
|
3449
3461
|
d.value.isLoading = !1, t.emit("ready"), t.emit("init");
|
|
3450
|
-
},
|
|
3451
|
-
},
|
|
3462
|
+
}, $n);
|
|
3463
|
+
}, Dn = () => {
|
|
3452
3464
|
const A = {
|
|
3453
3465
|
map: s,
|
|
3454
3466
|
state: d,
|
|
@@ -3492,12 +3504,12 @@ function qa(e, t) {
|
|
|
3492
3504
|
t.expose(A), t.emit("expose", A);
|
|
3493
3505
|
};
|
|
3494
3506
|
let Te = null, Ne = !1;
|
|
3495
|
-
|
|
3507
|
+
G(() => {
|
|
3496
3508
|
Tt(Te), Te = null, de && clearTimeout(de);
|
|
3497
3509
|
});
|
|
3498
|
-
const
|
|
3510
|
+
const Tn = async () => {
|
|
3499
3511
|
try {
|
|
3500
|
-
ze("地图加载中", "正在初始化地理数据..."), await h(), d.value.isLoading = !0, await Ga(De), Fe(), Tt(Te), Te =
|
|
3512
|
+
ze("地图加载中", "正在初始化地理数据..."), await h(), d.value.isLoading = !0, await Ga(De), Fe(), Tt(Te), Te = ja(wn), En(), ae.apply(), n.mapType.value = d.value.mapType, e.position && await g(e.position.lng, e.position.lat, e.position.height), Sn(), Dn();
|
|
3501
3513
|
} catch (A) {
|
|
3502
3514
|
throw d.value.isLoading = !1, d.value.error = A instanceof Error ? A : new Error(String(A)), t.emit("error", A), A;
|
|
3503
3515
|
}
|
|
@@ -3511,9 +3523,9 @@ function qa(e, t) {
|
|
|
3511
3523
|
showDeleteControls: a,
|
|
3512
3524
|
showStatus: o,
|
|
3513
3525
|
wmtsEnabled: c,
|
|
3514
|
-
search:
|
|
3515
|
-
onDelete:
|
|
3516
|
-
handleStartDrawing:
|
|
3526
|
+
search: pn,
|
|
3527
|
+
onDelete: yn,
|
|
3528
|
+
handleStartDrawing: Cn,
|
|
3517
3529
|
setMapNameVisible: lt,
|
|
3518
3530
|
setContourVisible: Y,
|
|
3519
3531
|
contourVisible: F,
|
|
@@ -3523,23 +3535,23 @@ function qa(e, t) {
|
|
|
3523
3535
|
lightingState: ae.state,
|
|
3524
3536
|
setTheme: st,
|
|
3525
3537
|
toggleMapType: () => {
|
|
3526
|
-
|
|
3538
|
+
mn("视图切换中", "正在切换 2D/3D 视图...", 800), Va(De), n.mapType.value = d.value.mapType, d.value.mapType === "2d" ? te() : ie(), W.reapply(), ae.apply();
|
|
3527
3539
|
},
|
|
3528
|
-
resetView: () =>
|
|
3540
|
+
resetView: () => Oa(De),
|
|
3529
3541
|
toggleMapBaseLayer: async () => {
|
|
3530
3542
|
if (!Ne) {
|
|
3531
3543
|
Ne = !0, ze("底图切换中", "正在切换地图底图...");
|
|
3532
3544
|
try {
|
|
3533
|
-
await
|
|
3545
|
+
await $a(De), Fe();
|
|
3534
3546
|
} finally {
|
|
3535
3547
|
Ne = !1, ot();
|
|
3536
3548
|
}
|
|
3537
3549
|
}
|
|
3538
3550
|
},
|
|
3539
|
-
init:
|
|
3551
|
+
init: Tn
|
|
3540
3552
|
};
|
|
3541
3553
|
}
|
|
3542
|
-
const
|
|
3554
|
+
const cn = /* @__PURE__ */ U({
|
|
3543
3555
|
name: "GameLoading",
|
|
3544
3556
|
props: {
|
|
3545
3557
|
visible: {
|
|
@@ -3570,68 +3582,68 @@ const sn = /* @__PURE__ */ U({
|
|
|
3570
3582
|
class: "apple-loading-subtitle"
|
|
3571
3583
|
}, [e.subtitle])])]) : null;
|
|
3572
3584
|
}
|
|
3573
|
-
}),
|
|
3585
|
+
}), Xa = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><!-- 2D 平面地图:2x2 坐标网格瓦片,表达俯视平面视角 -->\r
|
|
3574
3586
|
<path fill="#000000" d="M4 3.5h6.7a.5.5 0 0 1 .5.5v6.7a.5.5 0 0 1-.5.5H4a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5zm9.3 0H20a.5.5 0 0 1 .5.5v6.7a.5.5 0 0 1-.5.5h-6.7a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5zM4 12.8h6.7a.5.5 0 0 1 .5.5V20a.5.5 0 0 1-.5.5H4a.5.5 0 0 1-.5-.5v-6.7a.5.5 0 0 1 .5-.5zm9.3 0H20a.5.5 0 0 1 .5.5V20a.5.5 0 0 1-.5.5h-6.7a.5.5 0 0 1-.5-.5v-6.7a.5.5 0 0 1 .5-.5z"/></svg>\r
|
|
3575
|
-
`,
|
|
3587
|
+
`, Za = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><!-- 3D 立体:等轴测立方体(顶面 + 左右侧面),表达三维视角 -->\r
|
|
3576
3588
|
<path fill="#000000" d="M12 2.6 20.6 7.1 12 11.6 3.4 7.1 12 2.6z"/>\r
|
|
3577
3589
|
<path fill="#000000" d="M3.4 7.1v9.6L12 21.4v-9.8L3.4 7.1z"/>\r
|
|
3578
3590
|
<path fill="#000000" d="M20.6 7.1v9.6L12 21.4v-9.8l8.6-4.5z"/></svg>\r
|
|
3579
|
-
`,
|
|
3591
|
+
`, Ja = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755438544903" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="19690" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M921.6 905.6H64V118.4h300.8v-64H0v915.2h985.6v-288h-64v224z m-640-467.2v-44.8h-64v364.8h64v-156.8c0-48 0-83.2 9.6-102.4 9.6-19.2 25.6-35.2 38.4-48 19.2-9.6 38.4-12.8 57.6-12.8 19.2 0 35.2 3.2 48 12.8s19.2 25.6 25.6 38.4c3.2 12.8 3.2 41.6 3.2 83.2v188.8h57.6v-144c0-48 3.2-83.2 9.6-102.4 3.2-25.6 19.2-38.4 38.4-54.4 19.2-12.8 38.4-19.2 57.6-19.2 19.2 0 38.4 3.2 48 12.8 12.8 9.6 19.2 25.6 25.6 38.4 3.2 19.2 3.2 41.6 3.2 76.8v201.6h64v-201.6c0-67.2-12.8-115.2-38.4-140.8-25.6-25.6-54.4-38.4-86.4-38.4s-57.6 9.6-83.2 25.6-38.4 32-48 51.2c-3.2-19.2-19.2-35.2-38.4-48-25.6-12.8-48-25.6-76.8-25.6-57.6 0-92.8 6.4-115.2 44.8z m739.2-51.2v51.2h-214.4v-35.2c22.4-41.6 57.6-80 102.4-112 44.8-32 60.8-60.8 60.8-86.4 0-32-16-44.8-51.2-44.8-28.8 0-44.8 19.2-54.4 54.4L809.6 192c19.2-51.2 57.6-80 112-80 64 3.2 96 32 102.4 89.6 6.4 41.6-22.4 80-80 115.2-35.2 25.6-54.4 48-70.4 67.2 0 3.2 147.2 3.2 147.2 3.2z" p-id="19691" fill="#515151"></path></svg>', Qa = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755438589408" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="24787" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M456 697.6c17.6-11.2 33.6-20.8 52.8-32l-38.4-52.8c-17.6 14.4-32 25.6-48 38.4 11.2 16 22.4 30.4 33.6 46.4z" fill="#515151" p-id="24788"></path><path d="M73.6 940.8C54.4 934.4 43.2 915.2 48 896L300.8 76.8c6.4-17.6 25.6-28.8 43.2-24 17.6 6.4 28.8 25.6 24 43.2L116.8 915.2c-4.8 20.8-24 32-43.2 25.6z" fill="#515151" p-id="24789"></path><path d="M48 908.8c0-19.2 16-36.8 35.2-36.8h856c19.2 0 35.2 16 35.2 35.2 0 19.2-16 35.2-35.2 35.2H83.2C64 944 48 928 48 908.8z" fill="#515151" p-id="24790"></path><path d="M292.8 550.4c-25.6-16-51.2-30.4-78.4-41.6l28.8-65.6c32 12.8 62.4 28.8 89.6 48l-40 59.2zM470.4 747.2c-30.4-60.8-72-113.6-123.2-156.8l46.4-54.4c59.2 49.6 105.6 110.4 140.8 179.2l-64 32zM518.4 896c-4.8-28.8-11.2-59.2-22.4-86.4l68.8-24c11.2 32 19.2 65.6 25.6 99.2l-72 11.2z" fill="#515151" p-id="24791"></path><path d="M688 456c40 0 72 32 72 72s-32 72-72 72-72-32-72-72 32-72 72-72m0-72c-80 0-144 64-144 144s64 144 144 144 144-64 144-144-64-144-144-144z" fill="#515151" p-id="24792"></path></svg>', eo = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><!-- 底图图层:三层堆叠图例,表达地图图层切换 -->\r
|
|
3580
3592
|
<path fill="#000000" d="M12 14.5 2.8 9.7 12 4.9l9.2 4.8L12 14.5z"/>\r
|
|
3581
3593
|
<path fill="#000000" d="M2.8 11.2 12 16l9.2-4.8-1.6-.9L12 14.2 4.4 10.3l-1.6.9z"/>\r
|
|
3582
3594
|
<path fill="#000000" d="M2.8 14.7 12 19.5l9.2-4.8-1.6-.9L12 17.7 4.4 13.8l-1.6.9z"/></svg>\r
|
|
3583
|
-
`,
|
|
3584
|
-
`, ro = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1766223494940" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7307" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M635.712 78.72A127.808 127.808 0 0 0 569.472 54.72a633.792 633.792 0 0 0-52.224-1.408h-10.56a542.08 542.08 0 0 0-50.56 1.408 127.744 127.744 0 0 0-67.52 25.024 127.232 127.232 0 0 0-32.896 39.552c-7.808 13.696-15.552 30.72-24.32 50.048l-15.232 33.28H128A42.688 42.688 0 1 0 128 288h32V832A160 160 0 0 0 320 992h384a160 160 0 0 0 160-160V288h32a42.688 42.688 0 0 0 0-85.312h-184.256l-18.176-37.568a650.176 650.176 0 0 0-24.96-48.32 127.232 127.232 0 0 0-32.896-38.08zM616.96 202.688H409.92a556.16 556.16 0 0 1 19.84-41.088 39.232 39.232 0 0 1 34.048-21.888c11.392-1.024 26.176-1.024 49.664-1.024 22.912 0 37.376 0 48.384 1.024a39.296 39.296 0 0 1 33.6 21.056c5.632 9.28 11.84 21.952 21.504 41.92z m-211.648 563.712a32 32 0 0 1-32-32v-256a32 32 0 0 1 64 0v256a32 32 0 0 1-32 32z m245.376-288v256a32 32 0 1 1-64 0v-256a32 32 0 0 1 64 0z" fill="#333333" p-id="7308"></path></svg>', io = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755439429384" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="30246" xmlns:xlink="http://www.w3.org/1999/xlink" width="200.1953125" height="200"><path d="M358.5 1021.5c-52.93 0-96-43.07-96-96 0-13.12 2.6-25.84 7.74-37.81l0.12-0.27-141.99-184.66-0.34 0.11a95.806 95.806 0 0 1-29.53 4.64c-52.93 0-96-43.07-96-96s43.07-96 96-96c7.56 0 15.09 0.89 22.41 2.64l0.36 0.09 213.67-370.08-0.16-0.25c-9.34-15.12-14.28-32.54-14.28-50.39 0-52.93 43.07-96 96-96 40.36 0 76.66 25.5 90.34 63.46l0.09 0.26 300.27 61.72 0.19-0.26c18.01-25.16 47.21-40.18 78.11-40.18 52.93 0 96 43.07 96 96 0 36.49-20.26 69.36-52.88 85.79l-0.31 0.16 41.76 393.5 0.25 0.12a96.184 96.184 0 0 1 39.11 34.79c9.85 15.41 15.06 33.27 15.06 51.65 0 52.93-43.07 96-96 96-31.18 0-60.53-15.24-78.52-40.76l-0.22-0.31-396.7 138.78-0.05 0.29c-8.2 45.76-47.94 78.97-94.5 78.97z m0-192c34.03 0 64.82 17.44 82.36 46.66l0.21 0.35L832.93 739.4l0.03-0.32c3.81-39.11 31.82-72.49 69.7-83.05l0.41-0.11-40.34-380.14-0.34-0.08c-39.73-9.82-68.86-43.81-72.49-84.56l-0.03-0.37-283.9-58.36-0.15 0.39c-7 17.7-19.01 32.81-34.72 43.69-16.08 11.13-34.96 17.02-54.59 17.02-9.75 0-19.37-1.46-28.59-4.33l-0.38-0.12L176.19 555.1l0.19 0.26c11.86 16.42 18.12 35.83 18.12 56.14 0 17.74-4.88 35.06-14.11 50.11l-0.18 0.29 136.28 177.25 0.37-0.18c13.04-6.28 27.05-9.47 41.64-9.47z" p-id="30247" fill="#515151"></path><path d="M416.5 2c40.15 0 76.26 25.37 89.87 63.13l0.19 0.53 0.55 0.11 299.68 61.6 0.64 0.13 0.38-0.53c8.66-12.1 20.19-22.15 33.34-29.06C854.71 90.77 870.06 87 885.5 87c52.66 0 95.5 42.84 95.5 95.5 0 18.03-5.05 35.58-14.6 50.77a95.81 95.81 0 0 1-38 34.57l-0.62 0.31 0.07 0.69 41.7 392.88 0.06 0.55 0.5 0.24c15.91 7.71 29.36 19.68 38.91 34.61 9.8 15.33 14.98 33.09 14.98 51.38 0 52.66-42.84 95.5-95.5 95.5-31.02 0-60.22-15.16-78.11-40.55l-0.43-0.62-0.71 0.25-396.09 138.59-0.55 0.19-0.1 0.57c-3.9 21.77-15.4 41.67-32.39 56.03-17.2 14.54-39.08 22.54-61.62 22.54-52.66 0-95.5-42.84-95.5-95.5 0-13.05 2.59-25.71 7.7-37.61l0.23-0.54-0.36-0.46-141.59-184.16-0.43-0.56-0.67 0.22A95.43 95.43 0 0 1 98.5 707C45.84 707 3 664.16 3 611.5S45.84 516 98.5 516c7.52 0 15.01 0.88 22.29 2.62l0.73 0.17 0.37-0.65 213.33-369.5 0.3-0.52-0.31-0.51c-9.29-15.04-14.2-32.37-14.2-50.12C321 44.84 363.84 2 416.5 2m0 191c-9.7 0-19.27-1.45-28.44-4.31l-0.76-0.24-0.4 0.69-210.98 365.43-0.32 0.56 0.38 0.52C187.77 571.99 194 591.3 194 611.5c0 17.64-4.85 34.88-14.03 49.85l-0.36 0.59 0.42 0.55 135.82 176.65 0.5 0.64 0.73-0.35c12.97-6.26 26.91-9.43 41.42-9.43 16.79 0 33.3 4.42 47.75 12.78a96.095 96.095 0 0 1 34.18 33.63l0.42 0.7 0.77-0.27 391.17-136.87 0.6-0.21 0.06-0.64c1.88-19.33 9.53-37.41 22.11-52.28 12.44-14.71 28.77-25.2 47.22-30.35l0.82-0.23-0.09-0.84-40.26-379.37-0.07-0.7-0.68-0.17c-39.52-9.77-68.5-43.58-72.11-84.12l-0.07-0.74-0.73-0.15-283.12-58.2-0.82-0.17-0.31 0.78c-6.96 17.61-18.91 32.64-34.54 43.46-15.99 11.11-34.77 16.96-54.3 16.96m0-192C363.2 1 320 44.2 320 97.5c0 18.58 5.26 35.93 14.35 50.65l-213.33 369.5A96.669 96.669 0 0 0 98.5 515C45.2 515 2 558.2 2 611.5S45.2 708 98.5 708a96.5 96.5 0 0 0 29.69-4.66l141.59 184.15c-5 11.66-7.78 24.51-7.78 38.01 0 53.3 43.2 96.5 96.5 96.5 47.46 0 86.91-34.25 94.99-79.39l396.08-138.59C867.04 828.81 895.88 845 928.5 845c53.3 0 96.5-43.2 96.5-96.5 0-38.22-22.23-71.26-54.46-86.88l-41.7-392.88C960.37 252.86 982 220.21 982 182.5c0-53.3-43.2-96.5-96.5-96.5-32.37 0-61.01 15.94-78.51 40.39l-299.68-61.6C493.91 27.59 458.31 1 416.5 1z m0 193c40.77 0 75.63-25.28 89.77-61.03l283.12 58.2c3.69 41.4 33.52 75.27 72.87 85l40.26 379.37c-37.74 10.53-66.15 43.41-70.06 83.49L441.29 875.9c-16.87-28.1-47.63-46.9-82.79-46.9-15 0-29.2 3.42-41.86 9.53L180.82 661.88c8.99-14.66 14.18-31.91 14.18-50.38 0-21.07-6.76-40.56-18.22-56.43l210.98-365.42c9.08 2.83 18.73 4.35 28.74 4.35z" p-id="30248" fill="#515151"></path></svg>', ao = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755438516107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18607" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M672 925.5c-52.11 0-94.5-42.39-94.5-94.5 0-27.32 11.82-53.29 32.43-71.26l0.3-0.26-254.6-473.05-0.31 0.01c-1.1 0.04-2.21 0.06-3.32 0.06-18.73 0-36.83-5.47-52.35-15.82l-0.34-0.23-114.89 114.89 0.1 0.29c3.31 9.75 4.99 19.97 4.99 30.37 0 52.11-42.39 94.5-94.5 94.5S0.5 468.11 0.5 416s42.39-94.5 94.5-94.5c17.2 0 34.04 4.67 48.7 13.5l0.34 0.2 117.11-117.1-0.08-0.28a94.646 94.646 0 0 1-3.57-25.81c0-52.11 42.39-94.5 94.5-94.5s94.5 42.39 94.5 94.5c0 26.56-11.28 52.05-30.94 69.93l-0.29 0.26 255.29 474.32s1.19-0.02 1.44-0.02c20.26 0 39.58 6.32 55.86 18.28l0.35 0.25 112-112-0.12-0.3c-4.37-11.06-6.59-22.74-6.59-34.73 0-52.11 42.39-94.5 94.5-94.5s94.5 42.39 94.5 94.5-42.39 94.5-94.5 94.5c-15.68 0-31.21-3.92-44.91-11.33l-0.33-0.18-118.68 118.68 0.06 0.27A95.354 95.354 0 0 1 766.5 831c0 52.11-42.39 94.5-94.5 94.5z" p-id="18608" fill="#515151"></path><path d="M352 98c51.83 0 94 42.17 94 94 0 26.42-11.22 51.78-30.78 69.56l-0.58 0.53 0.37 0.69 254.96 473.71 0.29 0.53 0.61-0.01 0.42-0.01c0.24 0 0.48-0.01 0.72-0.01 20.15 0 39.37 6.29 55.57 18.18l0.69 0.51 0.61-0.61 111.46-111.46 0.46-0.46-0.24-0.61c-4.35-11-6.55-22.62-6.55-34.55 0-51.83 42.17-94 94-94s94 42.17 94 94-42.17 94-94 94c-15.59 0-31.04-3.9-44.67-11.27l-0.66-0.35-0.53 0.53-118.23 118.23-0.39 0.39 0.12 0.54a94.365 94.365 0 0 1 2.35 20.95c0 51.83-42.17 94-94 94s-94-42.17-94-94c0-27.17 11.76-53.01 32.26-70.88l0.6-0.52-0.38-0.7-254.26-472.45-0.29-0.55-0.62 0.02c-1.27 0.04-2.32 0.06-3.3 0.06-18.63 0-36.64-5.44-52.08-15.74l-0.68-0.45-0.58 0.58-114.39 114.39-0.44 0.44 0.2 0.59c3.29 9.7 4.96 19.87 4.96 30.21 0 51.83-42.17 94-94 94S1 467.83 1 416s42.17-94 94-94c17.11 0 33.86 4.65 48.45 13.43l0.67 0.4 0.55-0.55L261.3 218.66l0.42-0.41-0.16-0.56a94.028 94.028 0 0 1-3.55-25.68C258 140.17 300.17 98 352 98m0-1c-52.47 0-95 42.53-95 95 0 9 1.25 17.7 3.59 25.95L143.96 334.58C129.66 325.96 112.91 321 95 321c-52.47 0-95 42.53-95 95s42.53 95 95 95 95-42.53 95-95c0-10.68-1.76-20.95-5.01-30.53l114.38-114.38C314.44 281.14 332.53 287 352 287c1.12 0 2.23-0.03 3.34-0.06l254.27 472.43C589.63 776.78 577 802.41 577 831c0 52.47 42.53 95 95 95s95-42.53 95-95c0-7.28-0.82-14.36-2.37-21.17L882.86 691.6c13.42 7.27 28.8 11.4 45.14 11.4 52.47 0 95-42.53 95-95s-42.53-95-95-95-95 42.53-95 95c0 12.33 2.35 24.11 6.62 34.92L728.16 754.38C712.43 742.83 693.01 736 672 736c-0.38 0-0.76 0.01-1.14 0.01L415.9 262.3C435 244.92 447 219.86 447 192c0-52.47-42.53-95-95-95z" p-id="18609" fill="#515151"></path></svg>', oo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755439410852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="28392" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M273.9 168.3H739v37.1H273.9zM273.9 819.6H739v37.1H273.9zM165.812 740.898v-465.1h37.1v465.1zM821.11 740.896v-465.1h37.1v465.1z" fill="#515151" p-id="28393"></path><path d="M184.7 66.2c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.1-121-121-121z m-0.1 203.5c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7c0.1 45.7-37 82.7-82.7 82.7zM184.7 717.5c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.1-121-121-121z m-0.1 203.6c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7c0.1 45.6-37 82.7-82.7 82.7zM840 717.5c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.1-121-121-121z m-0.1 203.6c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7c0.1 45.6-37 82.7-82.7 82.7zM840 66.2c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.1-121-121-121z m-0.1 203.5c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7c0.1 45.7-37 82.7-82.7 82.7z" fill="#515151" p-id="28394"></path></svg>', lo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755438563645" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20701" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M996.2 679L340 22.8c-12.5-12.5-32.8-12.5-45.3 0L23.2 294.3c-12.5 12.5-12.5 32.8 0 45.3l656.2 656.2c12.5 12.5 32.8 12.5 45.3 0l271.5-271.5c12.5-12.5 12.5-32.8 0-45.3zM262.6 234.9l119.2-119.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7L307.9 280.2c-1.6 1.6-4.1 1.6-5.7 0l-39.6-39.6c-1.5-1.6-1.5-4.1 0-5.7z m112.9 45l85.2-85.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7l-85.2 85.2c-1.6 1.6-4.1 1.6-5.7 0l-39.6-39.6c-1.5-1.6-1.5-4.1 0-5.7z m79 79l85.2-85.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7l-85.2 85.2c-1.6 1.6-4.1 1.6-5.7 0l-39.6-39.6c-1.6-1.6-1.6-4.1 0-5.7z m45.7 113.6l119.2-119.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7L545.5 517.8c-1.6 1.6-4.1 1.6-5.7 0l-39.6-39.6c-1.5-1.6-1.5-4.1 0-5.7z m152.5 90.3l-39.6-39.6c-1.6-1.6-1.6-4.1 0-5.7l85.2-85.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7l-85.2 85.2c-1.6 1.6-4.1 1.6-5.7 0z m39.4 33.7l85.2-85.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7l-85.2 85.2c-1.6 1.6-4.1 1.6-5.7 0l-39.6-39.6c-1.6-1.6-1.6-4.1 0-5.7z m85.3 158.9l-39.6-39.6c-1.6-1.6-1.6-4.1 0-5.7L857 590.9c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7L783.1 755.4c-1.6 1.5-4.1 1.5-5.7 0z" p-id="20702" fill="#515151"></path></svg>', so = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755439485778" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="35763" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M185.8 63.9c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.2-121-121-121z m-0.1 203.5c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7-37 82.7-82.7 82.7zM838.2 716.7c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.2-121-121-121z m-0.1 203.5c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7-37 82.7-82.7 82.7zM186.2 715.6c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.2-121-121-121z m-0.1 203.5c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7-37 82.7-82.7 82.7z" fill="#515151" p-id="35764"></path><path d="M287.2 818.1h447.6v37H287.2zM167.3 282h37v451h-37zM235.682 261.34l26.163-26.162L776.897 750.23l-26.163 26.162z" fill="#515151" p-id="35765"></path></svg>', co = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1767681773788" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6706" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M234.666667 224a10.666667 10.666667 0 0 0-10.666667 10.666667v149.333333a32 32 0 0 1-64 0v-149.333333A74.666667 74.666667 0 0 1 234.666667 160h149.333333a32 32 0 0 1 0 64h-149.333333zM597.333333 405.333333a21.333333 21.333333 0 0 1 21.333334 21.333334v170.666666a21.333333 21.333333 0 0 1-21.333334 21.333334h-170.666666a21.333333 21.333333 0 0 1-21.333334-21.333334v-170.666666a21.333333 21.333333 0 0 1 21.333334-21.333334h170.666666z m-170.666666-64a85.333333 85.333333 0 0 0-85.333334 85.333334v170.666666a85.333333 85.333333 0 0 0 85.333334 85.333334h170.666666a85.333333 85.333333 0 0 0 85.333334-85.333334v-170.666666a85.333333 85.333333 0 0 0-85.333334-85.333334h-170.666666z m-202.666667 448a10.666667 10.666667 0 0 0 10.666667 10.666667h149.333333a32 32 0 0 1 0 64h-149.333333A74.666667 74.666667 0 0 1 160 789.333333v-149.333333a32 32 0 0 1 64 0v149.333333z m565.333333 10.666667a10.666667 10.666667 0 0 0 10.666667-10.666667v-149.333333a32 32 0 0 1 64 0v149.333333a74.666667 74.666667 0 0 1-74.666667 74.666667h-149.333333a32 32 0 0 1 0-64h149.333333z m10.666667-565.333333a10.666667 10.666667 0 0 0-10.666667-10.666667h-149.333333a32 32 0 0 1 0-64h149.333333a74.666667 74.666667 0 0 1 74.666667 74.666667v149.333333a32 32 0 0 1-64 0v-149.333333z" fill="#000000" p-id="6707"></path></svg>', uo = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#86868b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\r
|
|
3595
|
+
`, to = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755439464662" class="icon" viewBox="0 0 1152 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="33927" xmlns:xlink="http://www.w3.org/1999/xlink" width="225" height="200"><path d="M1056.810667 606.890667c-45.781333 172.373333-204.544 305.237333-402.176 334.592v59.264h-165.418667v-59.264c-197.632-29.354667-356.394667-162.261333-402.133333-334.592H16.554667v-165.418667h62.08c30.592-191.274667 198.101333-342.4 410.538666-374.016V8.277333h165.418667v59.221334c212.437333 31.573333 379.946667 182.741333 410.538667 374.016h62.08v165.418666h-70.442667v-0.042666z m-61.568 0h-33.450667v-165.418667h43.349333c-29.866667-158.037333-170.410667-284.202667-350.549333-314.24v46.464h-165.418667V127.146667c-180.053333 30.037333-320.554667 156.202667-350.506666 314.24h43.349333v165.418666h-33.408c44.074667 139.264 175.786667 247.338667 340.565333 274.773334v-46.293334h165.418667v46.378667c164.864-27.434667 296.576-135.509333 340.650667-274.816zM528.64 134.272h86.613333V47.616h-86.613333v86.613333z m0 827.050667h86.613333v-86.613334h-86.613333v86.613334z m-472.618667-393.813334h86.613334V480.853333h-86.613334v86.613334z m945.194667 0h86.656V480.853333h-86.613333v86.613334z" p-id="33928" fill="#515151"></path></svg>', no = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1766223878706" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7643" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M921.6 512 880.64 512 972.8 972.8C972.8 1001.088 949.888 1024 921.6 1024L102.4 1024C74.112 1024 51.2 1001.088 51.2 972.8L143.36 512 102.4 512C74.112 512 51.2 489.088 51.2 460.8L51.2 409.6C51.2 381.312 74.112 358.4 102.4 358.4L409.6 358.4 409.6 102.4C409.6 45.8496 455.4496 0 512 0 568.5504 0 614.4 45.8496 614.4 102.4L614.4 358.4 921.6 358.4C949.888 358.4 972.8 381.312 972.8 409.6L972.8 460.8C972.8 489.088 949.888 512 921.6 512ZM102.4 972.8 257.6384 972.8C254.1056 967.5008 252.4416 960.9472 253.6192 954.1888L284.7488 726.5024C287.2064 712.6016 300.4672 703.2832 314.3936 705.7408 328.32 708.1984 337.6128 721.4848 335.1808 735.4112L304.0512 963.072C303.4112 966.6816 302.0032 969.9328 300.1088 972.8L921.6 972.8 819.2 512 204.8 512 102.4 972.8ZM563.2 102.4C563.2 74.112 540.288 51.2 512 51.2 483.712 51.2 460.8 74.112 460.8 102.4L460.8 358.4 563.2 358.4 563.2 102.4ZM921.6 409.6 102.4 409.6 102.4 460.8 921.6 460.8 921.6 409.6Z" fill="#272636" p-id="7644"></path></svg>', ro = `<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><g fill="none" stroke="#515151" stroke-width="72" stroke-linecap="round" stroke-linejoin="round"><path d="M180 292c56-72 128 88 186 14s128 88 186 14 128 88 186 14"/><path d="M104 500c74-96 148 132 222 36s148 132 222 36 148 132 222 36 148 132 222 36"/><path d="M40 720c112-128 224 176 336 48s224 176 336 48 224 176 336 48"/></g></svg>\r
|
|
3596
|
+
`, io = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1766223494940" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7307" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M635.712 78.72A127.808 127.808 0 0 0 569.472 54.72a633.792 633.792 0 0 0-52.224-1.408h-10.56a542.08 542.08 0 0 0-50.56 1.408 127.744 127.744 0 0 0-67.52 25.024 127.232 127.232 0 0 0-32.896 39.552c-7.808 13.696-15.552 30.72-24.32 50.048l-15.232 33.28H128A42.688 42.688 0 1 0 128 288h32V832A160 160 0 0 0 320 992h384a160 160 0 0 0 160-160V288h32a42.688 42.688 0 0 0 0-85.312h-184.256l-18.176-37.568a650.176 650.176 0 0 0-24.96-48.32 127.232 127.232 0 0 0-32.896-38.08zM616.96 202.688H409.92a556.16 556.16 0 0 1 19.84-41.088 39.232 39.232 0 0 1 34.048-21.888c11.392-1.024 26.176-1.024 49.664-1.024 22.912 0 37.376 0 48.384 1.024a39.296 39.296 0 0 1 33.6 21.056c5.632 9.28 11.84 21.952 21.504 41.92z m-211.648 563.712a32 32 0 0 1-32-32v-256a32 32 0 0 1 64 0v256a32 32 0 0 1-32 32z m245.376-288v256a32 32 0 1 1-64 0v-256a32 32 0 0 1 64 0z" fill="#333333" p-id="7308"></path></svg>', ao = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755439429384" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="30246" xmlns:xlink="http://www.w3.org/1999/xlink" width="200.1953125" height="200"><path d="M358.5 1021.5c-52.93 0-96-43.07-96-96 0-13.12 2.6-25.84 7.74-37.81l0.12-0.27-141.99-184.66-0.34 0.11a95.806 95.806 0 0 1-29.53 4.64c-52.93 0-96-43.07-96-96s43.07-96 96-96c7.56 0 15.09 0.89 22.41 2.64l0.36 0.09 213.67-370.08-0.16-0.25c-9.34-15.12-14.28-32.54-14.28-50.39 0-52.93 43.07-96 96-96 40.36 0 76.66 25.5 90.34 63.46l0.09 0.26 300.27 61.72 0.19-0.26c18.01-25.16 47.21-40.18 78.11-40.18 52.93 0 96 43.07 96 96 0 36.49-20.26 69.36-52.88 85.79l-0.31 0.16 41.76 393.5 0.25 0.12a96.184 96.184 0 0 1 39.11 34.79c9.85 15.41 15.06 33.27 15.06 51.65 0 52.93-43.07 96-96 96-31.18 0-60.53-15.24-78.52-40.76l-0.22-0.31-396.7 138.78-0.05 0.29c-8.2 45.76-47.94 78.97-94.5 78.97z m0-192c34.03 0 64.82 17.44 82.36 46.66l0.21 0.35L832.93 739.4l0.03-0.32c3.81-39.11 31.82-72.49 69.7-83.05l0.41-0.11-40.34-380.14-0.34-0.08c-39.73-9.82-68.86-43.81-72.49-84.56l-0.03-0.37-283.9-58.36-0.15 0.39c-7 17.7-19.01 32.81-34.72 43.69-16.08 11.13-34.96 17.02-54.59 17.02-9.75 0-19.37-1.46-28.59-4.33l-0.38-0.12L176.19 555.1l0.19 0.26c11.86 16.42 18.12 35.83 18.12 56.14 0 17.74-4.88 35.06-14.11 50.11l-0.18 0.29 136.28 177.25 0.37-0.18c13.04-6.28 27.05-9.47 41.64-9.47z" p-id="30247" fill="#515151"></path><path d="M416.5 2c40.15 0 76.26 25.37 89.87 63.13l0.19 0.53 0.55 0.11 299.68 61.6 0.64 0.13 0.38-0.53c8.66-12.1 20.19-22.15 33.34-29.06C854.71 90.77 870.06 87 885.5 87c52.66 0 95.5 42.84 95.5 95.5 0 18.03-5.05 35.58-14.6 50.77a95.81 95.81 0 0 1-38 34.57l-0.62 0.31 0.07 0.69 41.7 392.88 0.06 0.55 0.5 0.24c15.91 7.71 29.36 19.68 38.91 34.61 9.8 15.33 14.98 33.09 14.98 51.38 0 52.66-42.84 95.5-95.5 95.5-31.02 0-60.22-15.16-78.11-40.55l-0.43-0.62-0.71 0.25-396.09 138.59-0.55 0.19-0.1 0.57c-3.9 21.77-15.4 41.67-32.39 56.03-17.2 14.54-39.08 22.54-61.62 22.54-52.66 0-95.5-42.84-95.5-95.5 0-13.05 2.59-25.71 7.7-37.61l0.23-0.54-0.36-0.46-141.59-184.16-0.43-0.56-0.67 0.22A95.43 95.43 0 0 1 98.5 707C45.84 707 3 664.16 3 611.5S45.84 516 98.5 516c7.52 0 15.01 0.88 22.29 2.62l0.73 0.17 0.37-0.65 213.33-369.5 0.3-0.52-0.31-0.51c-9.29-15.04-14.2-32.37-14.2-50.12C321 44.84 363.84 2 416.5 2m0 191c-9.7 0-19.27-1.45-28.44-4.31l-0.76-0.24-0.4 0.69-210.98 365.43-0.32 0.56 0.38 0.52C187.77 571.99 194 591.3 194 611.5c0 17.64-4.85 34.88-14.03 49.85l-0.36 0.59 0.42 0.55 135.82 176.65 0.5 0.64 0.73-0.35c12.97-6.26 26.91-9.43 41.42-9.43 16.79 0 33.3 4.42 47.75 12.78a96.095 96.095 0 0 1 34.18 33.63l0.42 0.7 0.77-0.27 391.17-136.87 0.6-0.21 0.06-0.64c1.88-19.33 9.53-37.41 22.11-52.28 12.44-14.71 28.77-25.2 47.22-30.35l0.82-0.23-0.09-0.84-40.26-379.37-0.07-0.7-0.68-0.17c-39.52-9.77-68.5-43.58-72.11-84.12l-0.07-0.74-0.73-0.15-283.12-58.2-0.82-0.17-0.31 0.78c-6.96 17.61-18.91 32.64-34.54 43.46-15.99 11.11-34.77 16.96-54.3 16.96m0-192C363.2 1 320 44.2 320 97.5c0 18.58 5.26 35.93 14.35 50.65l-213.33 369.5A96.669 96.669 0 0 0 98.5 515C45.2 515 2 558.2 2 611.5S45.2 708 98.5 708a96.5 96.5 0 0 0 29.69-4.66l141.59 184.15c-5 11.66-7.78 24.51-7.78 38.01 0 53.3 43.2 96.5 96.5 96.5 47.46 0 86.91-34.25 94.99-79.39l396.08-138.59C867.04 828.81 895.88 845 928.5 845c53.3 0 96.5-43.2 96.5-96.5 0-38.22-22.23-71.26-54.46-86.88l-41.7-392.88C960.37 252.86 982 220.21 982 182.5c0-53.3-43.2-96.5-96.5-96.5-32.37 0-61.01 15.94-78.51 40.39l-299.68-61.6C493.91 27.59 458.31 1 416.5 1z m0 193c40.77 0 75.63-25.28 89.77-61.03l283.12 58.2c3.69 41.4 33.52 75.27 72.87 85l40.26 379.37c-37.74 10.53-66.15 43.41-70.06 83.49L441.29 875.9c-16.87-28.1-47.63-46.9-82.79-46.9-15 0-29.2 3.42-41.86 9.53L180.82 661.88c8.99-14.66 14.18-31.91 14.18-50.38 0-21.07-6.76-40.56-18.22-56.43l210.98-365.42c9.08 2.83 18.73 4.35 28.74 4.35z" p-id="30248" fill="#515151"></path></svg>', oo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755438516107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18607" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M672 925.5c-52.11 0-94.5-42.39-94.5-94.5 0-27.32 11.82-53.29 32.43-71.26l0.3-0.26-254.6-473.05-0.31 0.01c-1.1 0.04-2.21 0.06-3.32 0.06-18.73 0-36.83-5.47-52.35-15.82l-0.34-0.23-114.89 114.89 0.1 0.29c3.31 9.75 4.99 19.97 4.99 30.37 0 52.11-42.39 94.5-94.5 94.5S0.5 468.11 0.5 416s42.39-94.5 94.5-94.5c17.2 0 34.04 4.67 48.7 13.5l0.34 0.2 117.11-117.1-0.08-0.28a94.646 94.646 0 0 1-3.57-25.81c0-52.11 42.39-94.5 94.5-94.5s94.5 42.39 94.5 94.5c0 26.56-11.28 52.05-30.94 69.93l-0.29 0.26 255.29 474.32s1.19-0.02 1.44-0.02c20.26 0 39.58 6.32 55.86 18.28l0.35 0.25 112-112-0.12-0.3c-4.37-11.06-6.59-22.74-6.59-34.73 0-52.11 42.39-94.5 94.5-94.5s94.5 42.39 94.5 94.5-42.39 94.5-94.5 94.5c-15.68 0-31.21-3.92-44.91-11.33l-0.33-0.18-118.68 118.68 0.06 0.27A95.354 95.354 0 0 1 766.5 831c0 52.11-42.39 94.5-94.5 94.5z" p-id="18608" fill="#515151"></path><path d="M352 98c51.83 0 94 42.17 94 94 0 26.42-11.22 51.78-30.78 69.56l-0.58 0.53 0.37 0.69 254.96 473.71 0.29 0.53 0.61-0.01 0.42-0.01c0.24 0 0.48-0.01 0.72-0.01 20.15 0 39.37 6.29 55.57 18.18l0.69 0.51 0.61-0.61 111.46-111.46 0.46-0.46-0.24-0.61c-4.35-11-6.55-22.62-6.55-34.55 0-51.83 42.17-94 94-94s94 42.17 94 94-42.17 94-94 94c-15.59 0-31.04-3.9-44.67-11.27l-0.66-0.35-0.53 0.53-118.23 118.23-0.39 0.39 0.12 0.54a94.365 94.365 0 0 1 2.35 20.95c0 51.83-42.17 94-94 94s-94-42.17-94-94c0-27.17 11.76-53.01 32.26-70.88l0.6-0.52-0.38-0.7-254.26-472.45-0.29-0.55-0.62 0.02c-1.27 0.04-2.32 0.06-3.3 0.06-18.63 0-36.64-5.44-52.08-15.74l-0.68-0.45-0.58 0.58-114.39 114.39-0.44 0.44 0.2 0.59c3.29 9.7 4.96 19.87 4.96 30.21 0 51.83-42.17 94-94 94S1 467.83 1 416s42.17-94 94-94c17.11 0 33.86 4.65 48.45 13.43l0.67 0.4 0.55-0.55L261.3 218.66l0.42-0.41-0.16-0.56a94.028 94.028 0 0 1-3.55-25.68C258 140.17 300.17 98 352 98m0-1c-52.47 0-95 42.53-95 95 0 9 1.25 17.7 3.59 25.95L143.96 334.58C129.66 325.96 112.91 321 95 321c-52.47 0-95 42.53-95 95s42.53 95 95 95 95-42.53 95-95c0-10.68-1.76-20.95-5.01-30.53l114.38-114.38C314.44 281.14 332.53 287 352 287c1.12 0 2.23-0.03 3.34-0.06l254.27 472.43C589.63 776.78 577 802.41 577 831c0 52.47 42.53 95 95 95s95-42.53 95-95c0-7.28-0.82-14.36-2.37-21.17L882.86 691.6c13.42 7.27 28.8 11.4 45.14 11.4 52.47 0 95-42.53 95-95s-42.53-95-95-95-95 42.53-95 95c0 12.33 2.35 24.11 6.62 34.92L728.16 754.38C712.43 742.83 693.01 736 672 736c-0.38 0-0.76 0.01-1.14 0.01L415.9 262.3C435 244.92 447 219.86 447 192c0-52.47-42.53-95-95-95z" p-id="18609" fill="#515151"></path></svg>', lo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755439410852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="28392" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M273.9 168.3H739v37.1H273.9zM273.9 819.6H739v37.1H273.9zM165.812 740.898v-465.1h37.1v465.1zM821.11 740.896v-465.1h37.1v465.1z" fill="#515151" p-id="28393"></path><path d="M184.7 66.2c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.1-121-121-121z m-0.1 203.5c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7c0.1 45.7-37 82.7-82.7 82.7zM184.7 717.5c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.1-121-121-121z m-0.1 203.6c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7c0.1 45.6-37 82.7-82.7 82.7zM840 717.5c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.1-121-121-121z m-0.1 203.6c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7c0.1 45.6-37 82.7-82.7 82.7zM840 66.2c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.1-121-121-121z m-0.1 203.5c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7c0.1 45.7-37 82.7-82.7 82.7z" fill="#515151" p-id="28394"></path></svg>', so = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755438563645" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20701" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M996.2 679L340 22.8c-12.5-12.5-32.8-12.5-45.3 0L23.2 294.3c-12.5 12.5-12.5 32.8 0 45.3l656.2 656.2c12.5 12.5 32.8 12.5 45.3 0l271.5-271.5c12.5-12.5 12.5-32.8 0-45.3zM262.6 234.9l119.2-119.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7L307.9 280.2c-1.6 1.6-4.1 1.6-5.7 0l-39.6-39.6c-1.5-1.6-1.5-4.1 0-5.7z m112.9 45l85.2-85.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7l-85.2 85.2c-1.6 1.6-4.1 1.6-5.7 0l-39.6-39.6c-1.5-1.6-1.5-4.1 0-5.7z m79 79l85.2-85.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7l-85.2 85.2c-1.6 1.6-4.1 1.6-5.7 0l-39.6-39.6c-1.6-1.6-1.6-4.1 0-5.7z m45.7 113.6l119.2-119.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7L545.5 517.8c-1.6 1.6-4.1 1.6-5.7 0l-39.6-39.6c-1.5-1.6-1.5-4.1 0-5.7z m152.5 90.3l-39.6-39.6c-1.6-1.6-1.6-4.1 0-5.7l85.2-85.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7l-85.2 85.2c-1.6 1.6-4.1 1.6-5.7 0z m39.4 33.7l85.2-85.2c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7l-85.2 85.2c-1.6 1.6-4.1 1.6-5.7 0l-39.6-39.6c-1.6-1.6-1.6-4.1 0-5.7z m85.3 158.9l-39.6-39.6c-1.6-1.6-1.6-4.1 0-5.7L857 590.9c1.6-1.6 4.1-1.6 5.7 0l39.6 39.6c1.6 1.6 1.6 4.1 0 5.7L783.1 755.4c-1.6 1.5-4.1 1.5-5.7 0z" p-id="20702" fill="#515151"></path></svg>', co = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755439485778" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="35763" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M185.8 63.9c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.2-121-121-121z m-0.1 203.5c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7-37 82.7-82.7 82.7zM838.2 716.7c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.2-121-121-121z m-0.1 203.5c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7-37 82.7-82.7 82.7zM186.2 715.6c-66.8 0-121 54.2-121 121s54.2 121 121 121 121-54.2 121-121-54.2-121-121-121z m-0.1 203.5c-45.7 0-82.7-37-82.7-82.7s37-82.7 82.7-82.7 82.7 37 82.7 82.7-37 82.7-82.7 82.7z" fill="#515151" p-id="35764"></path><path d="M287.2 818.1h447.6v37H287.2zM167.3 282h37v451h-37zM235.682 261.34l26.163-26.162L776.897 750.23l-26.163 26.162z" fill="#515151" p-id="35765"></path></svg>', uo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1767681773788" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6706" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M234.666667 224a10.666667 10.666667 0 0 0-10.666667 10.666667v149.333333a32 32 0 0 1-64 0v-149.333333A74.666667 74.666667 0 0 1 234.666667 160h149.333333a32 32 0 0 1 0 64h-149.333333zM597.333333 405.333333a21.333333 21.333333 0 0 1 21.333334 21.333334v170.666666a21.333333 21.333333 0 0 1-21.333334 21.333334h-170.666666a21.333333 21.333333 0 0 1-21.333334-21.333334v-170.666666a21.333333 21.333333 0 0 1 21.333334-21.333334h170.666666z m-170.666666-64a85.333333 85.333333 0 0 0-85.333334 85.333334v170.666666a85.333333 85.333333 0 0 0 85.333334 85.333334h170.666666a85.333333 85.333333 0 0 0 85.333334-85.333334v-170.666666a85.333333 85.333333 0 0 0-85.333334-85.333334h-170.666666z m-202.666667 448a10.666667 10.666667 0 0 0 10.666667 10.666667h149.333333a32 32 0 0 1 0 64h-149.333333A74.666667 74.666667 0 0 1 160 789.333333v-149.333333a32 32 0 0 1 64 0v149.333333z m565.333333 10.666667a10.666667 10.666667 0 0 0 10.666667-10.666667v-149.333333a32 32 0 0 1 64 0v149.333333a74.666667 74.666667 0 0 1-74.666667 74.666667h-149.333333a32 32 0 0 1 0-64h149.333333z m10.666667-565.333333a10.666667 10.666667 0 0 0-10.666667-10.666667h-149.333333a32 32 0 0 1 0-64h149.333333a74.666667 74.666667 0 0 1 74.666667 74.666667v149.333333a32 32 0 0 1-64 0v-149.333333z" fill="#000000" p-id="6707"></path></svg>', fo = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#86868b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\r
|
|
3585
3597
|
<circle cx="11" cy="11" r="7"></circle>\r
|
|
3586
3598
|
<line x1="16.5" y1="16.5" x2="21" y2="21"></line>\r
|
|
3587
3599
|
</svg>\r
|
|
3588
|
-
`,
|
|
3600
|
+
`, ho = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\r
|
|
3589
3601
|
<path d="M12 21s-6-5.686-6-10a6 6 0 0 1 12 0c0 4.314-6 10-6 10z"></path>\r
|
|
3590
3602
|
<circle cx="12" cy="11" r="2.5"></circle>\r
|
|
3591
3603
|
</svg>\r
|
|
3592
|
-
`,
|
|
3604
|
+
`, go = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\r
|
|
3593
3605
|
<circle cx="12" cy="12" r="9"></circle>\r
|
|
3594
3606
|
<circle cx="12" cy="12" r="4.5"></circle>\r
|
|
3595
3607
|
<circle cx="12" cy="12" r="0.6" fill="currentColor"></circle>\r
|
|
3596
3608
|
</svg>\r
|
|
3597
|
-
`,
|
|
3609
|
+
`, po = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">\r
|
|
3598
3610
|
<path d="M4 5c4-2 5 4 8 2s4 3 8 1"></path>\r
|
|
3599
3611
|
<path d="M4 19c4-2 5 2 8 0s4 1 8-1"></path>\r
|
|
3600
3612
|
<circle cx="4" cy="5" r="1.6"></circle>\r
|
|
3601
3613
|
<circle cx="20" cy="8" r="1.6"></circle>\r
|
|
3602
3614
|
<circle cx="12" cy="19" r="1.6"></circle>\r
|
|
3603
3615
|
</svg>\r
|
|
3604
|
-
`,
|
|
3605
|
-
"2d":
|
|
3606
|
-
"3d":
|
|
3607
|
-
area:
|
|
3608
|
-
aim:
|
|
3609
|
-
azimuth:
|
|
3610
|
-
base:
|
|
3611
|
-
circle:
|
|
3612
|
-
clear:
|
|
3613
|
-
contour:
|
|
3614
|
-
delete:
|
|
3615
|
-
location:
|
|
3616
|
-
polygon:
|
|
3617
|
-
polyline:
|
|
3618
|
-
rectangle:
|
|
3619
|
-
ruler:
|
|
3620
|
-
search:
|
|
3621
|
-
track:
|
|
3622
|
-
triangle:
|
|
3623
|
-
view:
|
|
3624
|
-
weather:
|
|
3616
|
+
`, mo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1766264800000" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8601" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><rect x="248" y="512" width="544" height="150" rx="72" fill="#272636" p-id="8602" /><circle cx="372" cy="504" r="120" fill="#272636" p-id="8603" /><circle cx="544" cy="452" r="150" fill="#272636" p-id="8604" /><circle cx="700" cy="504" r="118" fill="#272636" p-id="8605" /><path d="M366 716l-26 82h40l26-82h-40z" fill="#272636" p-id="8606" /><path d="M492 716l-26 82h40l26-82h-40z" fill="#272636" p-id="8607" /><path d="M618 716l-26 82h40l26-82h-40z" fill="#272636" p-id="8608" /></svg>', un = {
|
|
3617
|
+
"2d": Xa,
|
|
3618
|
+
"3d": Za,
|
|
3619
|
+
area: Ja,
|
|
3620
|
+
aim: go,
|
|
3621
|
+
azimuth: Qa,
|
|
3622
|
+
base: eo,
|
|
3623
|
+
circle: to,
|
|
3624
|
+
clear: no,
|
|
3625
|
+
contour: ro,
|
|
3626
|
+
delete: io,
|
|
3627
|
+
location: ho,
|
|
3628
|
+
polygon: ao,
|
|
3629
|
+
polyline: oo,
|
|
3630
|
+
rectangle: lo,
|
|
3631
|
+
ruler: so,
|
|
3632
|
+
search: fo,
|
|
3633
|
+
track: po,
|
|
3634
|
+
triangle: co,
|
|
3635
|
+
view: uo,
|
|
3636
|
+
weather: mo
|
|
3625
3637
|
};
|
|
3626
|
-
function
|
|
3627
|
-
return Object.prototype.hasOwnProperty.call(
|
|
3638
|
+
function vo(e) {
|
|
3639
|
+
return Object.prototype.hasOwnProperty.call(un, e);
|
|
3628
3640
|
}
|
|
3629
|
-
function
|
|
3641
|
+
function wo(e, t) {
|
|
3630
3642
|
return e.replace(/#[0-9a-fA-F]{6}/g, t).replace(/#[0-9a-fA-F]{3}/g, t).replace(/fill="(?!none")[^"]*"/g, `fill="${t}"`).replace(/stroke="(?!none")[^"]*"/g, `stroke="${t}"`);
|
|
3631
3643
|
}
|
|
3632
|
-
function
|
|
3633
|
-
const n =
|
|
3634
|
-
return
|
|
3644
|
+
function yo(e, t) {
|
|
3645
|
+
const n = un[e];
|
|
3646
|
+
return wo(n, t || "currentColor");
|
|
3635
3647
|
}
|
|
3636
3648
|
const j = /* @__PURE__ */ U({
|
|
3637
3649
|
name: "AppIcon",
|
|
@@ -3651,7 +3663,7 @@ const j = /* @__PURE__ */ U({
|
|
|
3651
3663
|
}
|
|
3652
3664
|
},
|
|
3653
3665
|
setup(e) {
|
|
3654
|
-
const t = R(() =>
|
|
3666
|
+
const t = R(() => vo(e.name) ? yo(e.name, e.color || void 0) : ""), n = R(() => ({
|
|
3655
3667
|
width: `${e.size}px`,
|
|
3656
3668
|
height: `${e.size}px`,
|
|
3657
3669
|
...e.color ? {
|
|
@@ -3667,7 +3679,7 @@ const j = /* @__PURE__ */ U({
|
|
|
3667
3679
|
innerHTML: t.value
|
|
3668
3680
|
}, null)]);
|
|
3669
3681
|
}
|
|
3670
|
-
}),
|
|
3682
|
+
}), Co = /* @__PURE__ */ U({
|
|
3671
3683
|
name: "MapError",
|
|
3672
3684
|
props: {
|
|
3673
3685
|
visible: {
|
|
@@ -3707,11 +3719,11 @@ const j = /* @__PURE__ */ U({
|
|
|
3707
3719
|
type: "button",
|
|
3708
3720
|
class: "map-error__retry",
|
|
3709
3721
|
onClick: () => t("retry")
|
|
3710
|
-
}, [
|
|
3722
|
+
}, [L("重新加载")]), f("span", {
|
|
3711
3723
|
class: "map-error__hint"
|
|
3712
|
-
}, [
|
|
3724
|
+
}, [L("若持续失败,请刷新页面")])])])]) : null;
|
|
3713
3725
|
}
|
|
3714
|
-
}),
|
|
3726
|
+
}), bo = /* @__PURE__ */ U({
|
|
3715
3727
|
name: "AppInput",
|
|
3716
3728
|
inheritAttrs: !1,
|
|
3717
3729
|
props: {
|
|
@@ -3749,7 +3761,7 @@ const j = /* @__PURE__ */ U({
|
|
|
3749
3761
|
emit: t,
|
|
3750
3762
|
attrs: n
|
|
3751
3763
|
}) {
|
|
3752
|
-
const r =
|
|
3764
|
+
const r = An(), i = R({
|
|
3753
3765
|
get: () => e.modelValue,
|
|
3754
3766
|
set: (u) => t("update:modelValue", u)
|
|
3755
3767
|
}), a = R(() => e.clearable && !e.disabled && e.modelValue.length > 0), o = (u) => {
|
|
@@ -3800,7 +3812,7 @@ const j = /* @__PURE__ */ U({
|
|
|
3800
3812
|
}, null)])]) : null]);
|
|
3801
3813
|
};
|
|
3802
3814
|
}
|
|
3803
|
-
}),
|
|
3815
|
+
}), dn = /* @__PURE__ */ U({
|
|
3804
3816
|
name: "AppSpinner",
|
|
3805
3817
|
props: {
|
|
3806
3818
|
size: {
|
|
@@ -3827,7 +3839,7 @@ const j = /* @__PURE__ */ U({
|
|
|
3827
3839
|
class: "app-spinner__circle"
|
|
3828
3840
|
}, null)]);
|
|
3829
3841
|
}
|
|
3830
|
-
}),
|
|
3842
|
+
}), Eo = /* @__PURE__ */ U({
|
|
3831
3843
|
name: "SearchResultsPanel",
|
|
3832
3844
|
props: {
|
|
3833
3845
|
list: {
|
|
@@ -3853,7 +3865,7 @@ const j = /* @__PURE__ */ U({
|
|
|
3853
3865
|
class: "results-header"
|
|
3854
3866
|
}, [f("span", {
|
|
3855
3867
|
class: "header-text"
|
|
3856
|
-
}, [
|
|
3868
|
+
}, [L("搜索结果")])]), f("div", {
|
|
3857
3869
|
class: "results-content",
|
|
3858
3870
|
role: "listbox",
|
|
3859
3871
|
"aria-label": "桩号搜索结果"
|
|
@@ -3879,16 +3891,16 @@ const j = /* @__PURE__ */ U({
|
|
|
3879
3891
|
class: "result-name"
|
|
3880
3892
|
}, [n.name]), n.lng !== void 0 && n.lat !== void 0 ? f("div", {
|
|
3881
3893
|
class: "result-coordinates"
|
|
3882
|
-
}, [n.lng.toFixed(6),
|
|
3894
|
+
}, [n.lng.toFixed(6), L(", "), n.lat.toFixed(6)]) : null, n.altitude ? f("div", {
|
|
3883
3895
|
class: "result-altitude"
|
|
3884
|
-
}, [
|
|
3896
|
+
}, [L("海拔: "), n.altitude, L("m")]) : null]), f("div", {
|
|
3885
3897
|
class: "result-action"
|
|
3886
3898
|
}, [f(j, {
|
|
3887
3899
|
name: "aim",
|
|
3888
3900
|
size: 16
|
|
3889
3901
|
}, null)])]))]), f("div", {
|
|
3890
3902
|
class: "results-footer"
|
|
3891
|
-
}, [f("span", null, [
|
|
3903
|
+
}, [f("span", null, [L("点击结果进行定位")])])]);
|
|
3892
3904
|
}
|
|
3893
3905
|
}), Mt = /* @__PURE__ */ U({
|
|
3894
3906
|
name: "NoResultsPanel",
|
|
@@ -3917,25 +3929,25 @@ const j = /* @__PURE__ */ U({
|
|
|
3917
3929
|
size: 32
|
|
3918
3930
|
}, null), f("div", {
|
|
3919
3931
|
class: "no-results-text"
|
|
3920
|
-
}, [e.error ? f("p", null, [
|
|
3932
|
+
}, [e.error ? f("p", null, [L("查询失败,请检查网络后重试")]) : f("p", null, [L('未找到"'), e.keyword, L('"相关桩号'), f("span", {
|
|
3921
3933
|
class: "no-results-hint"
|
|
3922
|
-
}, [
|
|
3934
|
+
}, [L(",请检查桩号格式后重新输入")])])]), e.error ? f("button", {
|
|
3923
3935
|
type: "button",
|
|
3924
3936
|
class: "no-results-retry",
|
|
3925
3937
|
onClick: () => t("clear")
|
|
3926
|
-
}, [
|
|
3938
|
+
}, [L("清空重试")]) : null])]);
|
|
3927
3939
|
}
|
|
3928
3940
|
});
|
|
3929
|
-
function
|
|
3941
|
+
function So(e) {
|
|
3930
3942
|
return {
|
|
3931
3943
|
position: "fixed",
|
|
3932
|
-
top: `${e.bottom +
|
|
3944
|
+
top: `${e.bottom + qn}px`,
|
|
3933
3945
|
left: `${e.left}px`,
|
|
3934
3946
|
width: `${e.width}px`,
|
|
3935
|
-
zIndex:
|
|
3947
|
+
zIndex: Kn
|
|
3936
3948
|
};
|
|
3937
3949
|
}
|
|
3938
|
-
const
|
|
3950
|
+
const Do = /* @__PURE__ */ U({
|
|
3939
3951
|
name: "MapTools",
|
|
3940
3952
|
inheritAttrs: !1,
|
|
3941
3953
|
props: {
|
|
@@ -3986,7 +3998,7 @@ const So = /* @__PURE__ */ U({
|
|
|
3986
3998
|
r.value = y;
|
|
3987
3999
|
});
|
|
3988
4000
|
const c = () => {
|
|
3989
|
-
i.value && (o.value =
|
|
4001
|
+
i.value && (o.value = So(i.value.getBoundingClientRect()));
|
|
3990
4002
|
}, u = (y) => {
|
|
3991
4003
|
r.value = y, t("search-input", y);
|
|
3992
4004
|
}, s = () => {
|
|
@@ -4016,7 +4028,7 @@ const So = /* @__PURE__ */ U({
|
|
|
4016
4028
|
e.showResults && c();
|
|
4017
4029
|
}), Ft(() => {
|
|
4018
4030
|
window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), document.addEventListener("mousedown", g);
|
|
4019
|
-
}),
|
|
4031
|
+
}), G(() => {
|
|
4020
4032
|
window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c), document.removeEventListener("mousedown", g);
|
|
4021
4033
|
});
|
|
4022
4034
|
const C = R(() => e.showResults && e.filteredList.length > 0), w = R(() => e.showResults && r.value !== "" && e.filteredList.length === 0 && !e.isSearching && !e.searchError), p = R(() => e.showResults && r.value !== "" && e.filteredList.length === 0 && !e.isSearching && e.searchError);
|
|
@@ -4028,7 +4040,7 @@ const So = /* @__PURE__ */ U({
|
|
|
4028
4040
|
}, [f("div", {
|
|
4029
4041
|
class: "search-container",
|
|
4030
4042
|
ref: i
|
|
4031
|
-
}, [f(
|
|
4043
|
+
}, [f(bo, {
|
|
4032
4044
|
class: "search-input",
|
|
4033
4045
|
modelValue: r.value,
|
|
4034
4046
|
placeholder: "请输入桩号进行搜索...",
|
|
@@ -4040,15 +4052,15 @@ const So = /* @__PURE__ */ U({
|
|
|
4040
4052
|
onFocus: d,
|
|
4041
4053
|
onKeydown: h
|
|
4042
4054
|
}, {
|
|
4043
|
-
suffix: () => e.isSearching ? f(
|
|
4055
|
+
suffix: () => e.isSearching ? f(dn, {
|
|
4044
4056
|
size: 14
|
|
4045
4057
|
}, null) : r.value && !e.searchError ? f("div", {
|
|
4046
4058
|
class: "results-count"
|
|
4047
|
-
}, [e.filteredList.length,
|
|
4048
|
-
})])]) : null, f(
|
|
4059
|
+
}, [e.filteredList.length, L("个结果")]) : null
|
|
4060
|
+
})])]) : null, f(Ln, {
|
|
4049
4061
|
to: "body"
|
|
4050
4062
|
}, {
|
|
4051
|
-
default: () => [C.value ? f(
|
|
4063
|
+
default: () => [C.value ? f(Eo, {
|
|
4052
4064
|
class: "teleported",
|
|
4053
4065
|
"data-theme": e.theme,
|
|
4054
4066
|
style: o.value,
|
|
@@ -4074,7 +4086,7 @@ const So = /* @__PURE__ */ U({
|
|
|
4074
4086
|
class: "utils-right"
|
|
4075
4087
|
}, [n["utils-right"] ? n["utils-right"]() : null])]);
|
|
4076
4088
|
}
|
|
4077
|
-
}),
|
|
4089
|
+
}), To = /* @__PURE__ */ U({
|
|
4078
4090
|
name: "MapControls",
|
|
4079
4091
|
inheritAttrs: !1,
|
|
4080
4092
|
props: {
|
|
@@ -4120,7 +4132,7 @@ const So = /* @__PURE__ */ U({
|
|
|
4120
4132
|
}, i = (o) => {
|
|
4121
4133
|
n.value && e.currentDrawType !== o || t("start-drawing", o);
|
|
4122
4134
|
}, a = (o) => {
|
|
4123
|
-
const l =
|
|
4135
|
+
const l = Bn(o);
|
|
4124
4136
|
return l ? l.icon : o;
|
|
4125
4137
|
};
|
|
4126
4138
|
return () => f("div", {
|
|
@@ -4135,7 +4147,7 @@ const So = /* @__PURE__ */ U({
|
|
|
4135
4147
|
onClick: () => r("delete")
|
|
4136
4148
|
}, [f("span", {
|
|
4137
4149
|
class: "txt"
|
|
4138
|
-
}, [
|
|
4150
|
+
}, [L("清除绘制图形")]), f(j, {
|
|
4139
4151
|
name: "clear",
|
|
4140
4152
|
size: 18
|
|
4141
4153
|
}, null)]) : null, f("button", {
|
|
@@ -4148,7 +4160,7 @@ const So = /* @__PURE__ */ U({
|
|
|
4148
4160
|
onClick: () => r("toggle-map-type")
|
|
4149
4161
|
}, [f("span", {
|
|
4150
4162
|
class: "txt"
|
|
4151
|
-
}, [
|
|
4163
|
+
}, [L("切换"), e.mapType === "3d" ? "2D" : "3D", L("地图")]), f(j, {
|
|
4152
4164
|
name: e.mapType,
|
|
4153
4165
|
size: e.mapType === "3d" ? 24 : 22
|
|
4154
4166
|
}, null)]), f("button", {
|
|
@@ -4161,7 +4173,7 @@ const So = /* @__PURE__ */ U({
|
|
|
4161
4173
|
onClick: () => r("toggle-map-view")
|
|
4162
4174
|
}, [f("span", {
|
|
4163
4175
|
class: "txt"
|
|
4164
|
-
}, [
|
|
4176
|
+
}, [L("恢复视图")]), f(j, {
|
|
4165
4177
|
name: "view",
|
|
4166
4178
|
size: 20
|
|
4167
4179
|
}, null)]), e.showBaseSwitch ? f("button", {
|
|
@@ -4174,7 +4186,7 @@ const So = /* @__PURE__ */ U({
|
|
|
4174
4186
|
onClick: () => r("toggle-map-base")
|
|
4175
4187
|
}, [f("span", {
|
|
4176
4188
|
class: "txt"
|
|
4177
|
-
}, [
|
|
4189
|
+
}, [L("切换"), e.mapBase === "bigemap" ? "物探地图" : "生产地图"]), f(j, {
|
|
4178
4190
|
name: "base",
|
|
4179
4191
|
size: 20
|
|
4180
4192
|
}, null)]) : null, f("button", {
|
|
@@ -4228,20 +4240,20 @@ const So = /* @__PURE__ */ U({
|
|
|
4228
4240
|
size: o.size
|
|
4229
4241
|
}, null)]))]);
|
|
4230
4242
|
}
|
|
4231
|
-
}),
|
|
4243
|
+
}), Mo = 500, It = 1e3, Io = {
|
|
4232
4244
|
bigemap: "生产地图",
|
|
4233
4245
|
geoserver: "物探地图"
|
|
4234
4246
|
};
|
|
4235
|
-
function
|
|
4247
|
+
function ke(e) {
|
|
4236
4248
|
return e && typeof e.value == "object" ? e.value : e;
|
|
4237
4249
|
}
|
|
4238
|
-
function
|
|
4250
|
+
function xo(e) {
|
|
4239
4251
|
return e >= 1e3 ? `${(e / 1e3).toFixed(2)} km` : `${Math.round(e)} m`;
|
|
4240
4252
|
}
|
|
4241
4253
|
function xt(e) {
|
|
4242
4254
|
return e >= 1024 * 1024 * 1024 ? `${(e / 1024 / 1024 / 1024).toFixed(2)} GB` : `${(e / 1024 / 1024).toFixed(1)} MB`;
|
|
4243
4255
|
}
|
|
4244
|
-
const
|
|
4256
|
+
const Ao = /* @__PURE__ */ U({
|
|
4245
4257
|
name: "MapStatus",
|
|
4246
4258
|
inheritAttrs: !1,
|
|
4247
4259
|
props: {
|
|
@@ -4269,7 +4281,7 @@ const xo = /* @__PURE__ */ U({
|
|
|
4269
4281
|
const M = () => {
|
|
4270
4282
|
d += 1;
|
|
4271
4283
|
const I = performance.now();
|
|
4272
|
-
I - h >=
|
|
4284
|
+
I - h >= Mo && (n.value = Math.round(d * 1e3 / (I - h)), d = 0, h = I), s = requestAnimationFrame(M);
|
|
4273
4285
|
};
|
|
4274
4286
|
s = requestAnimationFrame(M);
|
|
4275
4287
|
}, v = () => {
|
|
@@ -4285,14 +4297,14 @@ const xo = /* @__PURE__ */ U({
|
|
|
4285
4297
|
r.value = "--";
|
|
4286
4298
|
}
|
|
4287
4299
|
}, b = () => {
|
|
4288
|
-
const M =
|
|
4300
|
+
const M = ke(e.map);
|
|
4289
4301
|
if (!M) return;
|
|
4290
4302
|
const I = D();
|
|
4291
4303
|
if (!I) return;
|
|
4292
4304
|
if (!!(I.SceneMode && M.scene.mode === I.SceneMode.SCENE2D)) {
|
|
4293
4305
|
i.value = {
|
|
4294
4306
|
text: "2D 视图",
|
|
4295
|
-
detail:
|
|
4307
|
+
detail: Io[e.mapBase] || e.mapBase
|
|
4296
4308
|
};
|
|
4297
4309
|
return;
|
|
4298
4310
|
}
|
|
@@ -4300,7 +4312,7 @@ const xo = /* @__PURE__ */ U({
|
|
|
4300
4312
|
const _ = I.Cartographic.fromCartesian(M.camera.position);
|
|
4301
4313
|
i.value = {
|
|
4302
4314
|
text: "3D 视图",
|
|
4303
|
-
detail: `视距 ${
|
|
4315
|
+
detail: `视距 ${xo(_.height)}`
|
|
4304
4316
|
};
|
|
4305
4317
|
} catch {
|
|
4306
4318
|
i.value = {
|
|
@@ -4313,7 +4325,7 @@ const xo = /* @__PURE__ */ U({
|
|
|
4313
4325
|
p = 0;
|
|
4314
4326
|
const I = w;
|
|
4315
4327
|
if (w = null, !I) return;
|
|
4316
|
-
const O =
|
|
4328
|
+
const O = ke(e.map);
|
|
4317
4329
|
if (!O) return;
|
|
4318
4330
|
const _ = D();
|
|
4319
4331
|
if (!_) return;
|
|
@@ -4330,46 +4342,46 @@ const xo = /* @__PURE__ */ U({
|
|
|
4330
4342
|
(M.key === "Enter" || M.key === " ") && (M.preventDefault(), x());
|
|
4331
4343
|
};
|
|
4332
4344
|
Ft(() => {
|
|
4333
|
-
y(), v(), b(), S(), g.push(window.setInterval(v, It)), g.push(window.setInterval(b, It)),
|
|
4334
|
-
}),
|
|
4335
|
-
cancelAnimationFrame(s), p !== 0 && cancelAnimationFrame(p), w = null, C?.disconnect(), g.forEach((I) => window.clearInterval(I)),
|
|
4345
|
+
y(), v(), b(), S(), g.push(window.setInterval(v, It)), g.push(window.setInterval(b, It)), ke(e.map)?.scene.canvas.addEventListener("mousemove", B), typeof ResizeObserver < "u" && (C = new ResizeObserver(S), c.value && C.observe(c.value), l.value && C.observe(l.value));
|
|
4346
|
+
}), G(() => {
|
|
4347
|
+
cancelAnimationFrame(s), p !== 0 && cancelAnimationFrame(p), w = null, C?.disconnect(), g.forEach((I) => window.clearInterval(I)), ke(e.map)?.scene.canvas.removeEventListener("mousemove", B);
|
|
4336
4348
|
});
|
|
4337
4349
|
const H = () => [f("span", {
|
|
4338
4350
|
class: "map-status__item"
|
|
4339
4351
|
}, [f("span", {
|
|
4340
4352
|
class: "map-status__label"
|
|
4341
|
-
}, [
|
|
4353
|
+
}, [L("FPS")]), f("b", {
|
|
4342
4354
|
class: "map-status__value map-status__value--fps"
|
|
4343
4355
|
}, [n.value])]), f("span", {
|
|
4344
4356
|
class: "map-status__dot",
|
|
4345
4357
|
"aria-hidden": "true"
|
|
4346
|
-
}, [
|
|
4358
|
+
}, [L("·")]), f("span", {
|
|
4347
4359
|
class: "map-status__item"
|
|
4348
4360
|
}, [f("span", {
|
|
4349
4361
|
class: "map-status__label"
|
|
4350
|
-
}, [
|
|
4362
|
+
}, [L("内存")]), f("span", {
|
|
4351
4363
|
class: "map-status__value"
|
|
4352
4364
|
}, [r.value])]), f("span", {
|
|
4353
4365
|
class: "map-status__dot",
|
|
4354
4366
|
"aria-hidden": "true"
|
|
4355
|
-
}, [
|
|
4367
|
+
}, [L("·")]), f("span", {
|
|
4356
4368
|
class: "map-status__item"
|
|
4357
4369
|
}, [f("span", {
|
|
4358
4370
|
class: "map-status__label"
|
|
4359
|
-
}, [
|
|
4371
|
+
}, [L("层级")]), f("span", {
|
|
4360
4372
|
class: "map-status__value"
|
|
4361
4373
|
}, [i.value.text, i.value.detail ? f("em", {
|
|
4362
4374
|
class: "map-status__detail"
|
|
4363
|
-
}, [
|
|
4375
|
+
}, [L(" · "), i.value.detail]) : null])]), f("span", {
|
|
4364
4376
|
class: "map-status__dot",
|
|
4365
4377
|
"aria-hidden": "true"
|
|
4366
|
-
}, [
|
|
4378
|
+
}, [L("·")]), f("span", {
|
|
4367
4379
|
class: "map-status__item"
|
|
4368
4380
|
}, [f("span", {
|
|
4369
4381
|
class: "map-status__label"
|
|
4370
|
-
}, [
|
|
4382
|
+
}, [L("坐标")]), f("span", {
|
|
4371
4383
|
class: "map-status__value map-status__value--coords"
|
|
4372
|
-
}, [a.value,
|
|
4384
|
+
}, [a.value, L(", "), o.value])])], V = R(() => t.value && u.value);
|
|
4373
4385
|
return () => e.visible ? f("div", {
|
|
4374
4386
|
class: ["map-status", t.value ? "is-expanded" : "is-collapsed"],
|
|
4375
4387
|
role: "button",
|
|
@@ -4400,7 +4412,7 @@ const xo = /* @__PURE__ */ U({
|
|
|
4400
4412
|
"aria-hidden": "true"
|
|
4401
4413
|
}, [H()]) : null])])])]) : null;
|
|
4402
4414
|
}
|
|
4403
|
-
}),
|
|
4415
|
+
}), Lo = /* @__PURE__ */ U({
|
|
4404
4416
|
name: "MapView",
|
|
4405
4417
|
props: {
|
|
4406
4418
|
/** 统一地图配置(由 MapContainer 归一化后传入,单一配置源) */
|
|
@@ -4425,10 +4437,10 @@ const xo = /* @__PURE__ */ U({
|
|
|
4425
4437
|
expose: n,
|
|
4426
4438
|
slots: r
|
|
4427
4439
|
}) {
|
|
4428
|
-
const i =
|
|
4440
|
+
const i = qa(e.config, {
|
|
4429
4441
|
theme: e.theme,
|
|
4430
4442
|
popupConfig: e.popupConfig
|
|
4431
|
-
}), a =
|
|
4443
|
+
}), a = Ka(i, {
|
|
4432
4444
|
emit: (_, ...q) => t(_, ...q),
|
|
4433
4445
|
expose: n,
|
|
4434
4446
|
onPointClick: (_) => t("point-click", _)
|
|
@@ -4461,19 +4473,19 @@ const xo = /* @__PURE__ */ U({
|
|
|
4461
4473
|
contourVisible: I,
|
|
4462
4474
|
map: O
|
|
4463
4475
|
} = a;
|
|
4464
|
-
return () => f(kn, null, [f(
|
|
4476
|
+
return () => f(kn, null, [f(cn, {
|
|
4465
4477
|
visible: y.value.isLoading && !y.value.error,
|
|
4466
4478
|
title: u.value,
|
|
4467
4479
|
subtitle: s.value
|
|
4468
|
-
}, null), f(
|
|
4480
|
+
}, null), f(Co, {
|
|
4469
4481
|
visible: !!y.value.error,
|
|
4470
4482
|
message: y.value.error?.message,
|
|
4471
4483
|
onRetry: () => t("error-retry")
|
|
4472
|
-
}, null), f(
|
|
4484
|
+
}, null), f(Ao, {
|
|
4473
4485
|
map: O,
|
|
4474
4486
|
mapBase: l.value,
|
|
4475
4487
|
visible: w.value
|
|
4476
|
-
}, null), v.value ? f(
|
|
4488
|
+
}, null), v.value ? f(Do, {
|
|
4477
4489
|
showSearch: !0,
|
|
4478
4490
|
theme: d.value,
|
|
4479
4491
|
filteredList: b.filteredList.value,
|
|
@@ -4502,7 +4514,7 @@ const xo = /* @__PURE__ */ U({
|
|
|
4502
4514
|
}
|
|
4503
4515
|
}, {
|
|
4504
4516
|
"utils-right": () => r["utils-right"] ? r["utils-right"]() : null
|
|
4505
|
-
}) : null, g.value ? f(
|
|
4517
|
+
}) : null, g.value ? f(To, {
|
|
4506
4518
|
showDeleteControls: C.value,
|
|
4507
4519
|
mapType: o.value,
|
|
4508
4520
|
mapBase: l.value,
|
|
@@ -4520,10 +4532,10 @@ const xo = /* @__PURE__ */ U({
|
|
|
4520
4532
|
"onStart-drawing": S
|
|
4521
4533
|
}, null) : null, r.default ? r.default() : null]);
|
|
4522
4534
|
}
|
|
4523
|
-
}), ko = Object.fromEntries(
|
|
4524
|
-
type:
|
|
4535
|
+
}), ko = Object.fromEntries(sn.map((e) => [e, {
|
|
4536
|
+
type: Ya[e],
|
|
4525
4537
|
default: void 0
|
|
4526
|
-
}])),
|
|
4538
|
+
}])), tl = /* @__PURE__ */ U({
|
|
4527
4539
|
name: "MapContainer",
|
|
4528
4540
|
inheritAttrs: !1,
|
|
4529
4541
|
props: {
|
|
@@ -4557,12 +4569,15 @@ const xo = /* @__PURE__ */ U({
|
|
|
4557
4569
|
slots: n,
|
|
4558
4570
|
expose: r
|
|
4559
4571
|
}) {
|
|
4560
|
-
const i = T(e.theme || "dark"), a =
|
|
4572
|
+
const i = T(e.theme || "dark"), a = Zn(e.config, {
|
|
4561
4573
|
containerId: e.containerId,
|
|
4562
4574
|
position: e.position,
|
|
4563
4575
|
serverUrl: e.serverUrl,
|
|
4564
4576
|
accessToken: e.accessToken,
|
|
4565
4577
|
libsUrl: e.libsUrl,
|
|
4578
|
+
mapId: e.mapId,
|
|
4579
|
+
terrainId: e.terrainId,
|
|
4580
|
+
baseLayers: e.baseLayers,
|
|
4566
4581
|
// hideSearch 为旧版命名(语义反转:true 表示显示搜索栏),并入 showSearch 归一化
|
|
4567
4582
|
showSearch: e.showSearch ?? e.hideSearch,
|
|
4568
4583
|
showControls: e.showControls,
|
|
@@ -4591,8 +4606,8 @@ const xo = /* @__PURE__ */ U({
|
|
|
4591
4606
|
}, [f("div", {
|
|
4592
4607
|
id: a.containerId,
|
|
4593
4608
|
class: "map-container"
|
|
4594
|
-
}, null), f(
|
|
4595
|
-
default: () => f(
|
|
4609
|
+
}, null), f(_n, null, {
|
|
4610
|
+
default: () => f(Lo, {
|
|
4596
4611
|
config: a,
|
|
4597
4612
|
theme: i.value,
|
|
4598
4613
|
popupConfig: e.popupConfig,
|
|
@@ -4610,7 +4625,7 @@ const xo = /* @__PURE__ */ U({
|
|
|
4610
4625
|
default: (c) => At(n, "default", c),
|
|
4611
4626
|
"utils-right": () => At(n, "utils-right", {})
|
|
4612
4627
|
}),
|
|
4613
|
-
fallback: () => f(
|
|
4628
|
+
fallback: () => f(cn, {
|
|
4614
4629
|
visible: !0
|
|
4615
4630
|
}, null)
|
|
4616
4631
|
})]);
|
|
@@ -4620,7 +4635,7 @@ function At(e, t, n) {
|
|
|
4620
4635
|
const r = e[t];
|
|
4621
4636
|
return r ? r(n) : null;
|
|
4622
4637
|
}
|
|
4623
|
-
const
|
|
4638
|
+
const nl = /* @__PURE__ */ U({
|
|
4624
4639
|
name: "AppButton",
|
|
4625
4640
|
inheritAttrs: !1,
|
|
4626
4641
|
props: {
|
|
@@ -4664,7 +4679,7 @@ const tl = /* @__PURE__ */ U({
|
|
|
4664
4679
|
disabled: e.disabled
|
|
4665
4680
|
}, n, {
|
|
4666
4681
|
onClick: a
|
|
4667
|
-
}), [e.loading ? f(
|
|
4682
|
+
}), [e.loading ? f(dn, {
|
|
4668
4683
|
size: 14,
|
|
4669
4684
|
class: "app-button__spinner"
|
|
4670
4685
|
}, null) : null, t.default ? f("span", {
|
|
@@ -4672,10 +4687,10 @@ const tl = /* @__PURE__ */ U({
|
|
|
4672
4687
|
}, [t.default()]) : null]);
|
|
4673
4688
|
}
|
|
4674
4689
|
});
|
|
4675
|
-
function
|
|
4690
|
+
function Lt(e, t) {
|
|
4676
4691
|
return /<svg\b[^>]*\sdata-keep-color\b/i.test(e) ? e : e.replace(/#[0-9a-fA-F]{6}/g, t).replace(/#[0-9a-fA-F]{3}/g, t).replace(/fill="[^"]*"/g, `fill="${t}"`).replace(/stroke="[^"]*"/g, `stroke="${t}"`);
|
|
4677
4692
|
}
|
|
4678
|
-
function
|
|
4693
|
+
function kt(e, t) {
|
|
4679
4694
|
const n = t / 2;
|
|
4680
4695
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${t}"><circle cx="${n}" cy="${n}" r="${n}" fill="${e}"/></svg>`;
|
|
4681
4696
|
}
|
|
@@ -4685,7 +4700,7 @@ function _t(e) {
|
|
|
4685
4700
|
for (const r of t) n += String.fromCharCode(r);
|
|
4686
4701
|
return `data:image/svg+xml;base64,${btoa(n)}`;
|
|
4687
4702
|
}
|
|
4688
|
-
const
|
|
4703
|
+
const _o = {
|
|
4689
4704
|
fontSize: 12,
|
|
4690
4705
|
textColor: "#FFFFFF",
|
|
4691
4706
|
textBgColor: "rgba(0, 0, 0, 0.6)",
|
|
@@ -4693,17 +4708,17 @@ const Lo = {
|
|
|
4693
4708
|
rounded: !0,
|
|
4694
4709
|
borderRadius: 4
|
|
4695
4710
|
};
|
|
4696
|
-
function
|
|
4697
|
-
return { ...
|
|
4711
|
+
function fn(e) {
|
|
4712
|
+
return { ..._o, ...e };
|
|
4698
4713
|
}
|
|
4699
4714
|
let Ue = null;
|
|
4700
|
-
function
|
|
4715
|
+
function hn(e, t) {
|
|
4701
4716
|
Ue || (Ue = document.createElement("canvas"));
|
|
4702
4717
|
const n = Ue.getContext("2d");
|
|
4703
4718
|
return n.font = `${t}px Microsoft YaHei, sans-serif`, Math.ceil(n.measureText(e).width);
|
|
4704
4719
|
}
|
|
4705
|
-
const
|
|
4706
|
-
function
|
|
4720
|
+
const Po = 3e3, ge = /* @__PURE__ */ new Map(), Bo = 100;
|
|
4721
|
+
function Ro(e) {
|
|
4707
4722
|
const t = ge.get(e);
|
|
4708
4723
|
return t ? Promise.resolve(t) : new Promise((n) => {
|
|
4709
4724
|
const r = new Image();
|
|
@@ -4713,34 +4728,34 @@ function Bo(e) {
|
|
|
4713
4728
|
};
|
|
4714
4729
|
r.src = e, r.onload = () => {
|
|
4715
4730
|
if (r.naturalWidth > 0 && r.naturalHeight > 0)
|
|
4716
|
-
for (ge.set(e, r); ge.size >
|
|
4731
|
+
for (ge.set(e, r); ge.size > Bo; ) {
|
|
4717
4732
|
const l = ge.keys().next().value;
|
|
4718
4733
|
if (l === void 0) break;
|
|
4719
4734
|
ge.delete(l);
|
|
4720
4735
|
}
|
|
4721
4736
|
a();
|
|
4722
4737
|
}, r.onerror = a;
|
|
4723
|
-
const o = setTimeout(a,
|
|
4738
|
+
const o = setTimeout(a, Po);
|
|
4724
4739
|
});
|
|
4725
4740
|
}
|
|
4726
|
-
function
|
|
4741
|
+
function zo(e, t, n, r, i) {
|
|
4727
4742
|
e.fillStyle = t.textBgColor, t.rounded ? (e.beginPath(), e.roundRect(n, 0, r, i, t.borderRadius), e.fill()) : e.fillRect(n, 0, r, i);
|
|
4728
4743
|
}
|
|
4729
|
-
function
|
|
4744
|
+
function gn(e, t, n, r, i) {
|
|
4730
4745
|
e.font = `${t.fontSize}px Microsoft YaHei, sans-serif`, e.fillStyle = t.textColor, e.textAlign = "center", e.textBaseline = "middle", e.fillText(n, r / 2, i / 2);
|
|
4731
4746
|
}
|
|
4732
|
-
async function
|
|
4733
|
-
const a = await
|
|
4747
|
+
async function Fo(e, t, n, r, i) {
|
|
4748
|
+
const a = await Ro(t.icon);
|
|
4734
4749
|
return a.naturalWidth > 0 && a.naturalHeight > 0 ? (e.drawImage(a, r, i, n, n), !0) : (e.fillStyle = t.color, e.fillRect(r, i, n, n), !1);
|
|
4735
4750
|
}
|
|
4736
4751
|
async function Pt(e, t, n, r) {
|
|
4737
|
-
const i = n.iconSize || 32, a =
|
|
4752
|
+
const i = n.iconSize || 32, a = fn(n.textConfig), o = hn(t, a.fontSize) + a.padding * 2, l = a.fontSize + a.padding * 2, c = Math.max(i, o), u = l + i, s = document.createElement("canvas");
|
|
4738
4753
|
s.width = c * r, s.height = u * r;
|
|
4739
4754
|
const d = s.getContext("2d");
|
|
4740
4755
|
d.scale(r, r);
|
|
4741
4756
|
const h = (c - o) / 2;
|
|
4742
|
-
|
|
4743
|
-
const g = await
|
|
4757
|
+
zo(d, a, h, o, l), gn(d, a, t, c, l);
|
|
4758
|
+
const g = await Fo(d, e, i, (c - i) / 2, l);
|
|
4744
4759
|
return {
|
|
4745
4760
|
icon: s,
|
|
4746
4761
|
width: c,
|
|
@@ -4753,11 +4768,11 @@ async function Pt(e, t, n, r) {
|
|
|
4753
4768
|
degraded: !g
|
|
4754
4769
|
};
|
|
4755
4770
|
}
|
|
4756
|
-
function
|
|
4757
|
-
const r = n.iconSize || 32, i =
|
|
4771
|
+
function No(e, t, n) {
|
|
4772
|
+
const r = n.iconSize || 32, i = fn(n.textConfig), a = hn(t, i.fontSize) + i.padding * 2, o = i.fontSize + i.padding * 2, l = Math.max(r, a), c = o + r, u = document.createElement("canvas");
|
|
4758
4773
|
u.width = l, u.height = c;
|
|
4759
4774
|
const s = u.getContext("2d");
|
|
4760
|
-
return s.fillStyle = i.textBgColor, s.fillRect(0, 0, l, o),
|
|
4775
|
+
return s.fillStyle = i.textBgColor, s.fillRect(0, 0, l, o), gn(s, i, t, l, o), s.fillStyle = e.color, s.fillRect((l - r) / 2, o, r, r), {
|
|
4761
4776
|
icon: u,
|
|
4762
4777
|
width: l,
|
|
4763
4778
|
height: c,
|
|
@@ -4767,25 +4782,25 @@ function Fo(e, t, n) {
|
|
|
4767
4782
|
color: e.color
|
|
4768
4783
|
};
|
|
4769
4784
|
}
|
|
4770
|
-
const
|
|
4785
|
+
const Vo = "color_svg";
|
|
4771
4786
|
function Bt(e, t) {
|
|
4772
4787
|
return t === void 0 ? `${e}_no_text` : t === "" ? `${e}_empty_text` : `${e}_text_${t}`;
|
|
4773
4788
|
}
|
|
4774
4789
|
function Rt(e) {
|
|
4775
|
-
return `${
|
|
4790
|
+
return `${Vo}_${e}`;
|
|
4776
4791
|
}
|
|
4777
4792
|
function He(e) {
|
|
4778
|
-
return
|
|
4793
|
+
return $[e]?.color || $.default.color;
|
|
4779
4794
|
}
|
|
4780
|
-
const je = 25,
|
|
4781
|
-
function
|
|
4795
|
+
const je = 25, Oo = 8;
|
|
4796
|
+
function $o() {
|
|
4782
4797
|
return typeof MessageChannel < "u" ? new Promise((e) => {
|
|
4783
4798
|
const t = new MessageChannel();
|
|
4784
4799
|
t.port1.onmessage = () => e(), t.port2.postMessage(0);
|
|
4785
4800
|
}) : new Promise((e) => setTimeout(e, 0));
|
|
4786
4801
|
}
|
|
4787
4802
|
async function Je(e) {
|
|
4788
|
-
return performance.now() - e >=
|
|
4803
|
+
return performance.now() - e >= Oo ? (await $o(), performance.now()) : e;
|
|
4789
4804
|
}
|
|
4790
4805
|
async function Go(e, t) {
|
|
4791
4806
|
const n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
|
|
@@ -4811,7 +4826,7 @@ async function Go(e, t) {
|
|
|
4811
4826
|
}
|
|
4812
4827
|
return n;
|
|
4813
4828
|
}
|
|
4814
|
-
async function
|
|
4829
|
+
async function Wo(e, t) {
|
|
4815
4830
|
const n = Array.isArray(e) ? e : [];
|
|
4816
4831
|
if (n.length === 0) return [];
|
|
4817
4832
|
const r = new Array(n.length), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
@@ -4855,24 +4870,24 @@ async function $o(e, t) {
|
|
|
4855
4870
|
}
|
|
4856
4871
|
return n;
|
|
4857
4872
|
}
|
|
4858
|
-
function
|
|
4859
|
-
const n = JSON.stringify(
|
|
4873
|
+
function Uo(e, t) {
|
|
4874
|
+
const n = JSON.stringify($);
|
|
4860
4875
|
for (const [r, i] of Object.entries(e))
|
|
4861
|
-
|
|
4876
|
+
$[r] = {
|
|
4862
4877
|
color: i,
|
|
4863
|
-
text:
|
|
4878
|
+
text: $[r]?.text || $.default.text
|
|
4864
4879
|
};
|
|
4865
|
-
n !== JSON.stringify(
|
|
4880
|
+
n !== JSON.stringify($) && t();
|
|
4866
4881
|
}
|
|
4867
|
-
function
|
|
4868
|
-
const e = { default:
|
|
4869
|
-
for (const [t, n] of Object.entries(
|
|
4882
|
+
function Ho() {
|
|
4883
|
+
const e = { default: $.default.color };
|
|
4884
|
+
for (const [t, n] of Object.entries($))
|
|
4870
4885
|
t !== "default" && (e[t] = n.color);
|
|
4871
4886
|
return e;
|
|
4872
4887
|
}
|
|
4873
|
-
const
|
|
4888
|
+
const jo = "color:";
|
|
4874
4889
|
function zt(e) {
|
|
4875
|
-
return `${
|
|
4890
|
+
return `${jo}${e}`;
|
|
4876
4891
|
}
|
|
4877
4892
|
class K {
|
|
4878
4893
|
constructor() {
|
|
@@ -4941,7 +4956,7 @@ class K {
|
|
|
4941
4956
|
/** 预生成所有状态对应的颜色 SVG */
|
|
4942
4957
|
preGenerateBaseColors() {
|
|
4943
4958
|
if (this.colorCache.size > 0 || !this.rawSvg) return;
|
|
4944
|
-
(/* @__PURE__ */ new Set([...Object.keys(
|
|
4959
|
+
(/* @__PURE__ */ new Set([...Object.keys($), "default"])).forEach(
|
|
4945
4960
|
(n) => this.ensureColoredSvg(n, He(n))
|
|
4946
4961
|
);
|
|
4947
4962
|
}
|
|
@@ -4954,9 +4969,9 @@ class K {
|
|
|
4954
4969
|
buildColoredSvg(t) {
|
|
4955
4970
|
const n = this.defaultConfig.iconSize || 32;
|
|
4956
4971
|
try {
|
|
4957
|
-
return
|
|
4972
|
+
return Lt(this.rawSvg, t);
|
|
4958
4973
|
} catch {
|
|
4959
|
-
return
|
|
4974
|
+
return kt(t, n);
|
|
4960
4975
|
}
|
|
4961
4976
|
}
|
|
4962
4977
|
/** 文字归一:去除首尾空白;undefined 保持 undefined(区分「不显示」与「空文字」) */
|
|
@@ -4972,9 +4987,9 @@ class K {
|
|
|
4972
4987
|
const o = this.defaultConfig.iconSize || 32, l = t || this.rawSvg;
|
|
4973
4988
|
let c;
|
|
4974
4989
|
try {
|
|
4975
|
-
c = _t(
|
|
4990
|
+
c = _t(Lt(l, n));
|
|
4976
4991
|
} catch {
|
|
4977
|
-
c = _t(
|
|
4992
|
+
c = _t(kt(n, o));
|
|
4978
4993
|
}
|
|
4979
4994
|
const u = {
|
|
4980
4995
|
icon: c,
|
|
@@ -5075,7 +5090,7 @@ class K {
|
|
|
5075
5090
|
this.runtimeStats.textHits += r.textHits, this.runtimeStats.textGenerated += r.textGenerated, this.runtimeStats.uniqueText += r.uniqueText;
|
|
5076
5091
|
}
|
|
5077
5092
|
};
|
|
5078
|
-
return
|
|
5093
|
+
return Wo(t, n);
|
|
5079
5094
|
}
|
|
5080
5095
|
/** 根据条件创建图标:条件返回文字则显示文字,否则仅基础图标 */
|
|
5081
5096
|
async createConditionalIcon(t, n) {
|
|
@@ -5121,19 +5136,19 @@ class K {
|
|
|
5121
5136
|
}
|
|
5122
5137
|
/** 更新状态颜色映射(入参为「状态 -> 颜色」纯色映射) */
|
|
5123
5138
|
updateStatusColorMap(t) {
|
|
5124
|
-
|
|
5139
|
+
Uo(t, () => this.clearCache());
|
|
5125
5140
|
}
|
|
5126
5141
|
/** 获取当前状态颜色映射(纯色形式) */
|
|
5127
5142
|
getStatusColorMap() {
|
|
5128
|
-
return
|
|
5143
|
+
return Ho();
|
|
5129
5144
|
}
|
|
5130
5145
|
/** 回退文字图标(供 canvas 内部异常时使用) */
|
|
5131
5146
|
buildFallbackTextIcon(t, n) {
|
|
5132
|
-
return
|
|
5147
|
+
return No(t, n, this.defaultConfig);
|
|
5133
5148
|
}
|
|
5134
5149
|
}
|
|
5135
|
-
const
|
|
5136
|
-
function
|
|
5150
|
+
const rl = K.getInstance();
|
|
5151
|
+
function il(e) {
|
|
5137
5152
|
const t = e?.type, n = e?.data;
|
|
5138
5153
|
if (t === "circle" && Array.isArray(n?.center) && n.center.length >= 2)
|
|
5139
5154
|
return {
|
|
@@ -5148,92 +5163,92 @@ function rl(e) {
|
|
|
5148
5163
|
}
|
|
5149
5164
|
return null;
|
|
5150
5165
|
}
|
|
5151
|
-
var
|
|
5152
|
-
class
|
|
5166
|
+
var Yo = /* @__PURE__ */ ((e) => (e.INIT_FAILED = "INIT_FAILED", e.LOAD_SCRIPT_FAILED = "LOAD_SCRIPT_FAILED", e.INVALID_PARAMS = "INVALID_PARAMS", e.RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND", e.OPERATION_FAILED = "OPERATION_FAILED", e))(Yo || {});
|
|
5167
|
+
class al extends Error {
|
|
5153
5168
|
constructor(t, n, r) {
|
|
5154
5169
|
super(t), this.code = n, this.details = r, this.name = "MapError";
|
|
5155
5170
|
}
|
|
5156
5171
|
}
|
|
5157
5172
|
export {
|
|
5158
5173
|
nt as ANIMATION_DURATION,
|
|
5159
|
-
|
|
5174
|
+
nl as AppButton,
|
|
5160
5175
|
j as AppIcon,
|
|
5161
|
-
|
|
5162
|
-
|
|
5176
|
+
bo as AppInput,
|
|
5177
|
+
dn as AppSpinner,
|
|
5163
5178
|
Oe as CAMERA_CONFIG,
|
|
5164
|
-
|
|
5165
|
-
|
|
5179
|
+
Jn as ConfigManager,
|
|
5180
|
+
Nn as DEFAULT_CONTOUR_CONFIG,
|
|
5166
5181
|
tt as DEFAULT_LIBS_URL,
|
|
5167
|
-
|
|
5168
|
-
|
|
5182
|
+
$t as DEFAULT_MAP_CONFIG,
|
|
5183
|
+
On as DEFAULT_MASK_CONFIG,
|
|
5169
5184
|
ye as DEFAULT_POSITION,
|
|
5170
5185
|
Vt as DEFAULT_TOOLS,
|
|
5171
|
-
|
|
5172
|
-
|
|
5186
|
+
Vn as DEFAULT_TRAJECTORY_CONFIG,
|
|
5187
|
+
Yo as ErrorCode,
|
|
5173
5188
|
Nt as EventBus,
|
|
5174
5189
|
Q as GEOMETRY_CONFIG,
|
|
5175
|
-
|
|
5176
|
-
|
|
5190
|
+
cn as GameLoading,
|
|
5191
|
+
un as ICON_MAP,
|
|
5177
5192
|
K as IconManager,
|
|
5178
5193
|
ft as LIBRARIES,
|
|
5179
5194
|
Gn as MORPH_3D_DELAY,
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5195
|
+
tl as MapContainer,
|
|
5196
|
+
To as MapControls,
|
|
5197
|
+
Co as MapError,
|
|
5198
|
+
al as MapErrorClass,
|
|
5184
5199
|
oe as MapManager,
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5200
|
+
Ao as MapStatus,
|
|
5201
|
+
Do as MapTools,
|
|
5202
|
+
Lo as MapView,
|
|
5188
5203
|
Mt as NoResultsPanel,
|
|
5189
5204
|
me as PERFORMANCE_CONFIG,
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5205
|
+
$n as READY_DELAY,
|
|
5206
|
+
Qn as ResourceManager,
|
|
5207
|
+
$ as STATUS_COLOR_MAP,
|
|
5208
|
+
nr as ScriptLoader,
|
|
5209
|
+
Eo as SearchResultsPanel,
|
|
5210
|
+
Hn as WAVE_REMOVE_DELAY,
|
|
5211
|
+
Ra as buildGeoServerWmtsUrl,
|
|
5212
|
+
el as cartesianFromCoord,
|
|
5198
5213
|
rt as cartesianToDegrees,
|
|
5199
5214
|
Gr as cartographicToDegrees,
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5215
|
+
Kt as closeCoordinates,
|
|
5216
|
+
za as createGeoServerWmtsProvider,
|
|
5217
|
+
il as createSearchShapeFromDrawEvent,
|
|
5218
|
+
Zo as eventBus,
|
|
5204
5219
|
D as getBmgl,
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5220
|
+
zn as getDefaultToolbarEntries,
|
|
5221
|
+
Fn as getDefaultTools,
|
|
5222
|
+
Rn as getDrawToolEntries,
|
|
5223
|
+
Bn as getDrawToolEntry,
|
|
5224
|
+
$r as getEntityType,
|
|
5225
|
+
Xo as getLogLevel,
|
|
5226
|
+
Qo as getStatusInfo,
|
|
5227
|
+
yo as getSvg,
|
|
5228
|
+
rl as iconManager,
|
|
5229
|
+
vo as isIconName,
|
|
5215
5230
|
m as logger,
|
|
5216
5231
|
_e as mapManager,
|
|
5217
|
-
|
|
5232
|
+
Ge as normalizeMaskConfig,
|
|
5218
5233
|
Et as normalizeTrajectoryConfig,
|
|
5219
|
-
|
|
5220
|
-
|
|
5234
|
+
Xt as rectangleToPath,
|
|
5235
|
+
Jo as registerDrawTool,
|
|
5221
5236
|
ht as resolveUrl,
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5237
|
+
Wt as scriptLoader,
|
|
5238
|
+
rr as setBmgl,
|
|
5239
|
+
Ko as setLogLevel,
|
|
5240
|
+
Dr as useMap,
|
|
5241
|
+
qi as useMapCircleWave,
|
|
5242
|
+
la as useMapContour,
|
|
5243
|
+
Pi as useMapDraw,
|
|
5244
|
+
li as useMapEntity,
|
|
5245
|
+
ia as useMapLayers,
|
|
5246
|
+
Ba as useMapLighting,
|
|
5247
|
+
Da as useMapMask,
|
|
5248
|
+
Or as useMapPoint,
|
|
5249
|
+
Yi as useMapPopup,
|
|
5250
|
+
ya as useMapTrajectory,
|
|
5251
|
+
Ka as useMapView,
|
|
5252
|
+
Ia as useMapWeather,
|
|
5253
|
+
ir as waitForBmgl
|
|
5239
5254
|
};
|