gisviewer-vue3-arcgis 1.0.284 → 1.0.286
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/es/index.mjs +6 -5
- package/es/src/gis-map/gis-map.vue.d.ts +126 -3
- package/es/src/gis-map/gis-map.vue.mjs +63 -63
- package/es/src/gis-map/index.d.ts +126 -3
- package/es/src/gis-map/utils/edpass-device-controller.mjs +278 -0
- package/es/src/gis-map/utils/green-wave-band-controller/index.mjs +362 -0
- package/es/src/gis-map/utils/holo-flow/index.mjs +101 -0
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +125 -0
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +153 -0
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.mjs +4 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +336 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +240 -0
- package/es/src/gis-map/utils/holo-flow/trace-holo-flow.mjs +106 -0
- package/es/src/gis-map/utils/holo-flow/trace-renderer-external.mjs +578 -0
- package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.mjs +386 -0
- package/es/src/gis-map/utils/index.mjs +2 -2
- package/es/src/gis-map/utils/overlay.d.ts +2 -2
- package/es/src/gis-map/utils/overlay.mjs +2 -2
- package/es/src/gis-map/utils/police-jurisdiction.mjs +202 -0
- package/es/src/gis-map/utils/road-config-tool/cross.mjs +127 -0
- package/es/src/gis-map/utils/road-config-tool/entrance.mjs +79 -0
- package/es/src/gis-map/utils/road-config-tool/exit.mjs +86 -0
- package/es/src/gis-map/utils/road-config-tool/index.mjs +112 -0
- package/es/src/gis-map/utils/road-config-tool/indicator-area.mjs +44 -0
- package/es/src/gis-map/utils/road-config-tool/lane.mjs +35 -0
- package/es/src/gis-map/utils/road-config-tool/search-nearby-lanes.mjs +265 -0
- package/es/src/gis-map/utils/signal-control-area/cross-renderer.mjs +593 -0
- package/es/src/gis-map/utils/signal-control-area/district-controller.mjs +84 -0
- package/es/src/gis-map/utils/signal-control-area/district-renderer.mjs +122 -0
- package/es/src/gis-map/utils/signal-control-area/edit-area.mjs +550 -0
- package/es/src/gis-map/utils/signal-control-area/layer-symbol.mjs +984 -0
- package/es/src/gis-map/utils/signal-control-area/signal-area-controller.mjs +140 -0
- package/es/src/gis-map/utils/signal-control-area/signal-cross-controller.mjs +423 -0
- package/es/src/gis-map/utils/signal-control-area/signal-renderer.mjs +123 -0
- package/es/src/gis-map/utils/signal-control-area/sub-district-renderer.mjs +367 -0
- package/es/src/gis-map/utils/signal-system/signal-system-controller.mjs +137 -0
- package/es/src/gis-map/utils/sketchViewTool.mjs +503 -0
- package/es/src/gis-map-ol/gis-map-ol.vue.d.ts +79 -0
- package/es/src/gis-map-ol/gis-map-ol.vue.mjs +93 -0
- package/es/src/gis-map-ol/gis-map-ol.vue2.mjs +4 -0
- package/es/src/gis-map-ol/gis-map-ol.vue3.mjs +5 -0
- package/es/src/gis-map-ol/index.d.ts +69 -1
- package/es/src/gis-map-ol/index.mjs +8 -0
- package/es/src/gis-map-ol/utils/cluster/index.d.ts +2 -0
- package/es/src/gis-map-ol/utils/cluster/pixel-cluster-calculator.d.ts +65 -0
- package/es/src/gis-map-ol/utils/cluster/pixel-cluster-calculator.mjs +122 -0
- package/es/src/gis-map-ol/utils/ol-map-initializer.d.ts +29 -0
- package/es/src/gis-map-ol/utils/ol-map-initializer.mjs +183 -0
- package/es/src/gis-map-ol/utils/overlay/cluster-point-controller.d.ts +23 -0
- package/es/src/gis-map-ol/utils/overlay/cluster-point-controller.mjs +102 -0
- package/es/src/gis-map-ol/utils/overlay/overlay-controller.d.ts +116 -0
- package/es/src/gis-map-ol/utils/overlay/overlay-controller.mjs +276 -0
- package/es/src/gis-map-ol/utils/police-area-controller.d.ts +16 -0
- package/es/src/gis-map-ol/utils/police-area-controller.mjs +155 -0
- package/es/src/gis-map-ol/utils/signal-control/signal-cross-controller.d.ts +33 -0
- package/es/src/gis-map-ol/utils/signal-control/signal-cross-controller.mjs +221 -0
- package/es/src/gis-map-ol/utils/signal-control/signal-system-controller.d.ts +49 -0
- package/es/src/gis-map-ol/utils/signal-control/signal-system-controller.mjs +127 -0
- package/es/src/gis-map-ol/utils/style/line-style.d.ts +64 -0
- package/es/src/gis-map-ol/utils/style/line-style.mjs +151 -0
- package/es/src/gis-map-ol/utils/style/point-style.d.ts +78 -0
- package/es/src/gis-map-ol/utils/style/point-style.mjs +206 -0
- package/es/src/gis-map-ol/utils/style/polygon-style.d.ts +60 -0
- package/es/src/gis-map-ol/utils/style/polygon-style.mjs +166 -0
- package/es/src/index.mjs +4 -4
- package/es/src/types/index.d.ts +2 -1
- package/es/src/types/index.mjs +5 -0
- package/lib/index.js +1 -1
- package/lib/src/gis-map/gis-map.vue.d.ts +126 -3
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +126 -3
- package/lib/src/gis-map/utils/edpass-device-controller.js +1 -0
- package/lib/src/gis-map/utils/green-wave-band-controller/index.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/index.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +125 -0
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +2 -0
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.js +1 -0
- package/lib/src/gis-map/utils/index.js +1 -1
- package/lib/src/gis-map/utils/overlay.d.ts +2 -2
- package/lib/src/gis-map/utils/overlay.js +1 -1
- package/lib/src/gis-map/utils/police-jurisdiction.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/cross.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/entrance.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/exit.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/index.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/indicator-area.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/lane.js +1 -0
- package/lib/src/gis-map/utils/road-config-tool/search-nearby-lanes.js +1 -0
- package/lib/src/gis-map/utils/signal-control-area/cross-renderer.js +1 -0
- package/lib/src/gis-map/utils/signal-control-area/district-controller.js +1 -0
- package/lib/src/gis-map/utils/signal-control-area/district-renderer.js +1 -0
- package/lib/src/gis-map/utils/signal-control-area/edit-area.js +1 -0
- package/lib/src/gis-map/utils/signal-control-area/layer-symbol.js +1 -0
- package/lib/src/gis-map/utils/signal-control-area/signal-area-controller.js +1 -0
- package/lib/src/gis-map/utils/signal-control-area/signal-cross-controller.js +1 -0
- package/lib/src/gis-map/utils/signal-control-area/signal-renderer.js +1 -0
- package/lib/src/gis-map/utils/signal-control-area/sub-district-renderer.js +1 -0
- package/lib/src/gis-map/utils/signal-system/signal-system-controller.js +1 -0
- package/lib/src/gis-map/utils/sketchViewTool.js +1 -0
- package/lib/src/gis-map-ol/gis-map-ol.vue.d.ts +79 -0
- package/lib/src/gis-map-ol/gis-map-ol.vue.js +1 -0
- package/lib/src/gis-map-ol/gis-map-ol.vue2.js +1 -0
- package/lib/src/gis-map-ol/gis-map-ol.vue3.js +1 -0
- package/lib/src/gis-map-ol/index.d.ts +69 -1
- package/lib/src/gis-map-ol/index.js +1 -0
- package/lib/src/gis-map-ol/utils/cluster/index.d.ts +2 -0
- package/lib/src/gis-map-ol/utils/cluster/pixel-cluster-calculator.d.ts +65 -0
- package/lib/src/gis-map-ol/utils/cluster/pixel-cluster-calculator.js +1 -0
- package/lib/src/gis-map-ol/utils/ol-map-initializer.d.ts +29 -0
- package/lib/src/gis-map-ol/utils/ol-map-initializer.js +1 -0
- package/lib/src/gis-map-ol/utils/overlay/cluster-point-controller.d.ts +23 -0
- package/lib/src/gis-map-ol/utils/overlay/cluster-point-controller.js +1 -0
- package/lib/src/gis-map-ol/utils/overlay/overlay-controller.d.ts +116 -0
- package/lib/src/gis-map-ol/utils/overlay/overlay-controller.js +1 -0
- package/lib/src/gis-map-ol/utils/police-area-controller.d.ts +16 -0
- package/lib/src/gis-map-ol/utils/police-area-controller.js +1 -0
- package/lib/src/gis-map-ol/utils/signal-control/signal-cross-controller.d.ts +33 -0
- package/lib/src/gis-map-ol/utils/signal-control/signal-cross-controller.js +1 -0
- package/lib/src/gis-map-ol/utils/signal-control/signal-system-controller.d.ts +49 -0
- package/lib/src/gis-map-ol/utils/signal-control/signal-system-controller.js +1 -0
- package/lib/src/gis-map-ol/utils/style/line-style.d.ts +64 -0
- package/lib/src/gis-map-ol/utils/style/line-style.js +1 -0
- package/lib/src/gis-map-ol/utils/style/point-style.d.ts +78 -0
- package/lib/src/gis-map-ol/utils/style/point-style.js +1 -0
- package/lib/src/gis-map-ol/utils/style/polygon-style.d.ts +60 -0
- package/lib/src/gis-map-ol/utils/style/polygon-style.js +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/types/index.d.ts +2 -1
- package/lib/src/types/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import h from "ol/style/Circle";
|
|
2
|
+
import p from "ol/style/Fill";
|
|
3
|
+
import M from "ol/style/Icon";
|
|
4
|
+
import u from "ol/style/RegularShape";
|
|
5
|
+
import d from "ol/style/Stroke";
|
|
6
|
+
import f from "ol/style/Style";
|
|
7
|
+
import P from "ol/style/Text";
|
|
8
|
+
const c = /* @__PURE__ */ new Map();
|
|
9
|
+
let w = null;
|
|
10
|
+
function U(e, t) {
|
|
11
|
+
return e ? Array.isArray(e) ? e.map((a) => {
|
|
12
|
+
if (a.type === "text" && a.field) {
|
|
13
|
+
const n = (t == null ? void 0 : t[a.field]) ?? "";
|
|
14
|
+
return JSON.stringify({ ...a, __textContent__: n });
|
|
15
|
+
}
|
|
16
|
+
return JSON.stringify(a);
|
|
17
|
+
}).join("|") : JSON.stringify(e) : "__default__";
|
|
18
|
+
}
|
|
19
|
+
function k() {
|
|
20
|
+
return w || (w = new f({
|
|
21
|
+
image: new h({
|
|
22
|
+
radius: 6,
|
|
23
|
+
fill: new p({ color: "#2563eb" }),
|
|
24
|
+
stroke: new d({ color: "#ffffff", width: 1.5 })
|
|
25
|
+
})
|
|
26
|
+
})), w;
|
|
27
|
+
}
|
|
28
|
+
function S(e) {
|
|
29
|
+
const t = new M({
|
|
30
|
+
src: e.url,
|
|
31
|
+
scale: e.scale ?? 1,
|
|
32
|
+
anchor: e.anchor ?? [0.5, 0.5],
|
|
33
|
+
anchorXUnits: e.anchorXUnits ?? "fraction",
|
|
34
|
+
anchorYUnits: e.anchorYUnits ?? "fraction",
|
|
35
|
+
rotation: e.rotation ?? 0
|
|
36
|
+
});
|
|
37
|
+
return new f({ image: t });
|
|
38
|
+
}
|
|
39
|
+
function x(e) {
|
|
40
|
+
const t = new h({
|
|
41
|
+
radius: e.radius ?? 6,
|
|
42
|
+
fill: new p({ color: e.fillColor ?? "#2563eb" }),
|
|
43
|
+
stroke: new d({
|
|
44
|
+
color: e.strokeColor ?? "#ffffff",
|
|
45
|
+
width: e.strokeWidth ?? 1.5
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
return new f({ image: t });
|
|
49
|
+
}
|
|
50
|
+
function C(e) {
|
|
51
|
+
const t = new u({
|
|
52
|
+
points: e.points ?? 4,
|
|
53
|
+
radius: e.radius ?? 10,
|
|
54
|
+
radius2: e.radius2,
|
|
55
|
+
angle: e.angle ?? 0,
|
|
56
|
+
rotation: e.rotation ?? 0,
|
|
57
|
+
fill: e.fillColor ? new p({ color: e.fillColor }) : void 0,
|
|
58
|
+
stroke: new d({
|
|
59
|
+
color: e.strokeColor ?? "#000000",
|
|
60
|
+
width: e.strokeWidth ?? 1
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
return new f({ image: t });
|
|
64
|
+
}
|
|
65
|
+
function _(e) {
|
|
66
|
+
const t = e.width != null || e.height != null, i = {
|
|
67
|
+
src: e.url,
|
|
68
|
+
anchor: e.anchor ?? [0.5, 0.5],
|
|
69
|
+
anchorXUnits: "fraction",
|
|
70
|
+
anchorYUnits: "fraction",
|
|
71
|
+
rotation: (e.angle ?? 0) * Math.PI / 180,
|
|
72
|
+
// ArcGIS angle 是角度,转换为弧度
|
|
73
|
+
displacement: [e.xoffset ?? 0, -(e.yoffset ?? 0)]
|
|
74
|
+
// yoffset 取反以匹配 ArcGIS 方向
|
|
75
|
+
};
|
|
76
|
+
t ? (e.width != null && (i.width = e.width), e.height != null && (i.height = e.height)) : e.scale != null && (i.scale = e.scale);
|
|
77
|
+
const a = new M(i);
|
|
78
|
+
return new f({ image: a });
|
|
79
|
+
}
|
|
80
|
+
function A(e) {
|
|
81
|
+
var s, g;
|
|
82
|
+
const t = e.size ?? 12, i = e.color ?? [0, 0, 0, 1], a = ((s = e.outline) == null ? void 0 : s.color) ?? [255, 255, 255, 1], n = ((g = e.outline) == null ? void 0 : g.width) ?? 1, o = new p({ color: i }), r = new d({ color: a, width: n });
|
|
83
|
+
let l;
|
|
84
|
+
switch (e.style) {
|
|
85
|
+
case "circle":
|
|
86
|
+
l = new h({
|
|
87
|
+
radius: t / 2,
|
|
88
|
+
fill: o,
|
|
89
|
+
stroke: r
|
|
90
|
+
});
|
|
91
|
+
break;
|
|
92
|
+
case "square":
|
|
93
|
+
l = new u({
|
|
94
|
+
points: 4,
|
|
95
|
+
radius: t / 2,
|
|
96
|
+
angle: Math.PI / 4,
|
|
97
|
+
// 旋转45度使其成为正方形
|
|
98
|
+
fill: o,
|
|
99
|
+
stroke: r
|
|
100
|
+
});
|
|
101
|
+
break;
|
|
102
|
+
case "diamond":
|
|
103
|
+
l = new u({
|
|
104
|
+
points: 4,
|
|
105
|
+
radius: t / 2,
|
|
106
|
+
angle: 0,
|
|
107
|
+
// 不旋转,呈菱形
|
|
108
|
+
fill: o,
|
|
109
|
+
stroke: r
|
|
110
|
+
});
|
|
111
|
+
break;
|
|
112
|
+
case "triangle":
|
|
113
|
+
l = new u({
|
|
114
|
+
points: 3,
|
|
115
|
+
radius: t / 2,
|
|
116
|
+
angle: 0,
|
|
117
|
+
fill: o,
|
|
118
|
+
stroke: r
|
|
119
|
+
});
|
|
120
|
+
break;
|
|
121
|
+
case "cross":
|
|
122
|
+
l = new u({
|
|
123
|
+
points: 4,
|
|
124
|
+
radius: t / 2,
|
|
125
|
+
radius2: 0,
|
|
126
|
+
angle: 0,
|
|
127
|
+
stroke: r
|
|
128
|
+
});
|
|
129
|
+
break;
|
|
130
|
+
case "x":
|
|
131
|
+
l = new u({
|
|
132
|
+
points: 4,
|
|
133
|
+
radius: t / 2,
|
|
134
|
+
radius2: 0,
|
|
135
|
+
angle: Math.PI / 4,
|
|
136
|
+
// 旋转45度成为 X
|
|
137
|
+
stroke: r
|
|
138
|
+
});
|
|
139
|
+
break;
|
|
140
|
+
case "path":
|
|
141
|
+
l = new h({
|
|
142
|
+
radius: t / 2,
|
|
143
|
+
fill: o,
|
|
144
|
+
stroke: r
|
|
145
|
+
});
|
|
146
|
+
break;
|
|
147
|
+
default:
|
|
148
|
+
l = new h({
|
|
149
|
+
radius: t / 2,
|
|
150
|
+
fill: o,
|
|
151
|
+
stroke: r
|
|
152
|
+
});
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
return new f({ image: l });
|
|
156
|
+
}
|
|
157
|
+
function I(e, t) {
|
|
158
|
+
const i = new P({
|
|
159
|
+
text: String(t),
|
|
160
|
+
font: e.font ?? "14px Arial Unicode MS",
|
|
161
|
+
fill: new p({
|
|
162
|
+
color: e.fillColor ?? [0, 0, 0]
|
|
163
|
+
}),
|
|
164
|
+
stroke: new d({
|
|
165
|
+
color: e.strokeColor ?? [255, 255, 255],
|
|
166
|
+
width: e.strokeWidth ?? 3
|
|
167
|
+
}),
|
|
168
|
+
offsetX: e.offsetX ?? 0,
|
|
169
|
+
offsetY: e.offsetY ?? 0,
|
|
170
|
+
textAlign: e.textAlign ?? "center",
|
|
171
|
+
textBaseline: e.textBaseline ?? "middle"
|
|
172
|
+
});
|
|
173
|
+
return new f({ text: i });
|
|
174
|
+
}
|
|
175
|
+
function B(e, t) {
|
|
176
|
+
if (!e)
|
|
177
|
+
return k();
|
|
178
|
+
const i = U(e, t), a = c.get(i);
|
|
179
|
+
if (a)
|
|
180
|
+
return a;
|
|
181
|
+
let n;
|
|
182
|
+
if (Array.isArray(e) && e.length > 0) {
|
|
183
|
+
const o = [];
|
|
184
|
+
if (e.forEach((r) => {
|
|
185
|
+
if (r.type === "icon" && r.url)
|
|
186
|
+
o.push(S(r));
|
|
187
|
+
else if (r.type === "picture-marker" && r.url)
|
|
188
|
+
o.push(_(r));
|
|
189
|
+
else if (r.type === "simple-marker")
|
|
190
|
+
o.push(A(r));
|
|
191
|
+
else if (r.type === "circle")
|
|
192
|
+
o.push(x(r));
|
|
193
|
+
else if (r.type === "shape")
|
|
194
|
+
o.push(C(r));
|
|
195
|
+
else if (r.type === "text" && r.field) {
|
|
196
|
+
const l = (t == null ? void 0 : t[r.field]) ?? "";
|
|
197
|
+
l && o.push(I(r, l));
|
|
198
|
+
}
|
|
199
|
+
}), o.length > 0)
|
|
200
|
+
return n = o, c.set(i, n), n;
|
|
201
|
+
}
|
|
202
|
+
return e && e.url ? (n = S(e), c.set(i, n), n) : e && e.type === "picture-marker" && e.url ? (n = _(e), c.set(i, n), n) : e && e.type === "simple-marker" ? (n = A(e), c.set(i, n), n) : e && e.type === "circle" ? (n = x(e), c.set(i, n), n) : e && e.type === "shape" ? (n = C(e), c.set(i, n), n) : k();
|
|
203
|
+
}
|
|
204
|
+
export {
|
|
205
|
+
B as getPointStyle
|
|
206
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import Style from 'ol/style/Style';
|
|
2
|
+
/**
|
|
3
|
+
* 清除样式缓存
|
|
4
|
+
*/
|
|
5
|
+
export declare function clearStyleCache(): void;
|
|
6
|
+
/**
|
|
7
|
+
* 获取当前缓存大小
|
|
8
|
+
*/
|
|
9
|
+
export declare function getStyleCacheSize(): number;
|
|
10
|
+
/**
|
|
11
|
+
* 获取多边形样式
|
|
12
|
+
* 支持 symbol 数组配置(polygon + text),或单个 symbol 配置
|
|
13
|
+
* 若 symbol 为空则显示默认半透明蓝色填充
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // 简单多边形样式配置
|
|
17
|
+
* { symbol: { fillColor: 'rgba(255,0,0,0.5)', strokeColor: '#ff0000', strokeWidth: 2 } }
|
|
18
|
+
*
|
|
19
|
+
* // 仅边框样式配置(无填充)
|
|
20
|
+
* { symbol: { strokeColor: '#2563eb', strokeWidth: 3 } }
|
|
21
|
+
*
|
|
22
|
+
* // 虚线边框样式配置
|
|
23
|
+
* { symbol: { fillColor: 'rgba(0,128,255,0.3)', strokeColor: '#0080ff', strokeWidth: 2, lineDash: [10, 5] } }
|
|
24
|
+
*
|
|
25
|
+
* // 带边框的多边形样式配置(双边框效果)
|
|
26
|
+
* { symbol: { type: 'bordered', fillColor: 'rgba(255,255,255,0.8)', strokeColor: '#ffffff', strokeWidth: 4, borderColor: '#333333', borderWidth: 1 } }
|
|
27
|
+
*
|
|
28
|
+
* // 数组配置(多边形 + 文字)
|
|
29
|
+
* {
|
|
30
|
+
* symbol: [
|
|
31
|
+
* { type: 'polygon', fillColor: 'rgba(255,0,0,0.5)', strokeColor: '#ff0000', strokeWidth: 2 },
|
|
32
|
+
* { type: 'text', field: 'name', font: '14px Arial', fillColor: [0,0,0] }
|
|
33
|
+
* ]
|
|
34
|
+
* }
|
|
35
|
+
*
|
|
36
|
+
* // 数组配置(带边框多边形 + 文字)
|
|
37
|
+
* {
|
|
38
|
+
* symbol: [
|
|
39
|
+
* { type: 'bordered', fillColor: 'rgba(255,255,255,0.8)', strokeColor: '#ffffff', strokeWidth: 4, borderColor: '#333333', borderWidth: 1 },
|
|
40
|
+
* { type: 'text', field: 'areaName', font: '12px Arial', fillColor: [0,0,0] }
|
|
41
|
+
* ]
|
|
42
|
+
* }
|
|
43
|
+
*
|
|
44
|
+
* // ArcGIS simple-fill 配置
|
|
45
|
+
* // style 可选值: 'solid', 'none', 'horizontal', 'vertical', 'cross', 'forward-diagonal', 'backward-diagonal', 'diagonal-cross'
|
|
46
|
+
* { symbol: { type: 'simple-fill', style: 'solid', color: [255, 0, 0, 0.5], outline: { color: [0, 0, 0, 1], width: 2, style: 'solid' } } }
|
|
47
|
+
* { symbol: { type: 'simple-fill', style: 'none', outline: { color: [255, 0, 0, 1], width: 3, style: 'dash' } } }
|
|
48
|
+
*
|
|
49
|
+
* // ArcGIS picture-fill 配置(降级为纯色填充)
|
|
50
|
+
* { symbol: { type: 'picture-fill', url: '/path/to/pattern.png', width: 32, height: 32, outline: { color: [0, 0, 0, 1], width: 1 } } }
|
|
51
|
+
*
|
|
52
|
+
* // 数组配置(ArcGIS simple-fill + 文字)
|
|
53
|
+
* {
|
|
54
|
+
* symbol: [
|
|
55
|
+
* { type: 'simple-fill', style: 'solid', color: [0, 128, 255, 0.4], outline: { color: [0, 0, 128, 1], width: 2, style: 'solid' } },
|
|
56
|
+
* { type: 'text', field: 'name', font: '12px Arial', fillColor: [0,0,0] }
|
|
57
|
+
* ]
|
|
58
|
+
* }
|
|
59
|
+
*/
|
|
60
|
+
export declare function getPolygonStyle(symbol: any, attributes?: any): Style | Style[];
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import f from "ol/style/Fill";
|
|
2
|
+
import c from "ol/style/Stroke";
|
|
3
|
+
import a from "ol/style/Style";
|
|
4
|
+
import k from "ol/style/Text";
|
|
5
|
+
import { getLineDashByStyle as C } from "./line-style.mjs";
|
|
6
|
+
const u = /* @__PURE__ */ new Map();
|
|
7
|
+
let d = null;
|
|
8
|
+
function D(e, n) {
|
|
9
|
+
return e ? Array.isArray(e) ? e.map((l) => {
|
|
10
|
+
if (l.type === "text" && l.field) {
|
|
11
|
+
const t = (n == null ? void 0 : n[l.field]) ?? "";
|
|
12
|
+
return JSON.stringify({ ...l, __textContent__: t });
|
|
13
|
+
}
|
|
14
|
+
return JSON.stringify(l);
|
|
15
|
+
}).join("|") : JSON.stringify(e) : "__default__";
|
|
16
|
+
}
|
|
17
|
+
function p() {
|
|
18
|
+
return d || (d = new a({
|
|
19
|
+
fill: new f({
|
|
20
|
+
color: "rgba(37, 99, 235, 0.3)"
|
|
21
|
+
}),
|
|
22
|
+
stroke: new c({
|
|
23
|
+
color: "#2563eb",
|
|
24
|
+
width: 2
|
|
25
|
+
})
|
|
26
|
+
})), d;
|
|
27
|
+
}
|
|
28
|
+
function w(e) {
|
|
29
|
+
return new a({
|
|
30
|
+
fill: e.fillColor ? new f({ color: e.fillColor }) : void 0,
|
|
31
|
+
stroke: new c({
|
|
32
|
+
color: e.strokeColor ?? "#2563eb",
|
|
33
|
+
width: e.strokeWidth ?? 2,
|
|
34
|
+
lineCap: e.lineCap ?? "round",
|
|
35
|
+
lineJoin: e.lineJoin ?? "round",
|
|
36
|
+
lineDash: e.lineDash,
|
|
37
|
+
lineDashOffset: e.lineDashOffset ?? 0
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function x(e, n) {
|
|
42
|
+
switch (e) {
|
|
43
|
+
case "solid":
|
|
44
|
+
return new f({ color: n ?? [0, 0, 0, 0.5] });
|
|
45
|
+
case "none":
|
|
46
|
+
case "null":
|
|
47
|
+
return;
|
|
48
|
+
case "horizontal":
|
|
49
|
+
case "vertical":
|
|
50
|
+
case "cross":
|
|
51
|
+
case "forward-diagonal":
|
|
52
|
+
case "backward-diagonal":
|
|
53
|
+
case "diagonal-cross":
|
|
54
|
+
return new f({ color: n ?? [0, 0, 0, 0.3] });
|
|
55
|
+
default:
|
|
56
|
+
return new f({ color: n ?? [0, 0, 0, 0.5] });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function S(e) {
|
|
60
|
+
const n = e.style ?? "solid", o = x(n, e.color);
|
|
61
|
+
let l;
|
|
62
|
+
if (e.outline) {
|
|
63
|
+
const t = e.outline.width ?? 1, r = e.outline.style ?? "solid", i = C(r, t);
|
|
64
|
+
l = new c({
|
|
65
|
+
color: e.outline.color ?? [0, 0, 0, 1],
|
|
66
|
+
width: t,
|
|
67
|
+
lineCap: e.outline.cap ?? "round",
|
|
68
|
+
lineJoin: e.outline.join ?? "round",
|
|
69
|
+
lineDash: i
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
return new a({
|
|
73
|
+
fill: o,
|
|
74
|
+
stroke: l
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function s(e) {
|
|
78
|
+
const n = new f({
|
|
79
|
+
color: e.color ?? "rgba(128, 128, 128, 0.3)"
|
|
80
|
+
});
|
|
81
|
+
let o;
|
|
82
|
+
if (e.outline) {
|
|
83
|
+
const l = e.outline.width ?? 1, t = e.outline.style ?? "solid", r = C(t, l);
|
|
84
|
+
o = new c({
|
|
85
|
+
color: e.outline.color ?? [0, 0, 0, 1],
|
|
86
|
+
width: l,
|
|
87
|
+
lineDash: r
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
return new a({
|
|
91
|
+
fill: n,
|
|
92
|
+
stroke: o
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function g(e) {
|
|
96
|
+
const n = new a({
|
|
97
|
+
stroke: new c({
|
|
98
|
+
color: e.borderColor ?? "#000000",
|
|
99
|
+
width: (e.strokeWidth ?? 2) + (e.borderWidth ?? 2) * 2,
|
|
100
|
+
lineCap: e.lineCap ?? "round",
|
|
101
|
+
lineJoin: e.lineJoin ?? "round",
|
|
102
|
+
lineDash: e.lineDash,
|
|
103
|
+
lineDashOffset: e.lineDashOffset ?? 0
|
|
104
|
+
})
|
|
105
|
+
}), o = new a({
|
|
106
|
+
fill: e.fillColor ? new f({ color: e.fillColor }) : void 0,
|
|
107
|
+
stroke: new c({
|
|
108
|
+
color: e.strokeColor ?? "#2563eb",
|
|
109
|
+
width: e.strokeWidth ?? 2,
|
|
110
|
+
lineCap: e.lineCap ?? "round",
|
|
111
|
+
lineJoin: e.lineJoin ?? "round",
|
|
112
|
+
lineDash: e.lineDash,
|
|
113
|
+
lineDashOffset: e.lineDashOffset ?? 0
|
|
114
|
+
})
|
|
115
|
+
});
|
|
116
|
+
return [n, o];
|
|
117
|
+
}
|
|
118
|
+
function J(e, n) {
|
|
119
|
+
const o = new k({
|
|
120
|
+
text: String(n),
|
|
121
|
+
font: e.font ?? "14px Arial Unicode MS",
|
|
122
|
+
fill: new f({
|
|
123
|
+
color: e.fillColor ?? [0, 0, 0]
|
|
124
|
+
}),
|
|
125
|
+
stroke: new c({
|
|
126
|
+
color: e.strokeColor ?? [255, 255, 255],
|
|
127
|
+
width: e.strokeWidth ?? 3
|
|
128
|
+
}),
|
|
129
|
+
offsetX: e.offsetX ?? 0,
|
|
130
|
+
offsetY: e.offsetY ?? 0,
|
|
131
|
+
textAlign: e.textAlign ?? "center",
|
|
132
|
+
textBaseline: e.textBaseline ?? "middle",
|
|
133
|
+
overflow: e.overflow ?? !1
|
|
134
|
+
});
|
|
135
|
+
return new a({ text: o });
|
|
136
|
+
}
|
|
137
|
+
function P(e, n) {
|
|
138
|
+
if (!e)
|
|
139
|
+
return p();
|
|
140
|
+
const o = D(e, n), l = u.get(o);
|
|
141
|
+
if (l)
|
|
142
|
+
return l;
|
|
143
|
+
let t;
|
|
144
|
+
if (Array.isArray(e) && e.length > 0) {
|
|
145
|
+
const r = [];
|
|
146
|
+
if (e.forEach((i) => {
|
|
147
|
+
if (i.type === "polygon")
|
|
148
|
+
r.push(w(i));
|
|
149
|
+
else if (i.type === "simple-fill")
|
|
150
|
+
r.push(S(i));
|
|
151
|
+
else if (i.type === "picture-fill")
|
|
152
|
+
r.push(s(i));
|
|
153
|
+
else if (i.type === "bordered")
|
|
154
|
+
r.push(...g(i));
|
|
155
|
+
else if (i.type === "text" && i.field) {
|
|
156
|
+
const h = (n == null ? void 0 : n[i.field]) ?? "";
|
|
157
|
+
h && r.push(J(i, h));
|
|
158
|
+
}
|
|
159
|
+
}), r.length > 0)
|
|
160
|
+
return t = r, u.set(o, t), t;
|
|
161
|
+
}
|
|
162
|
+
return e && e.type === "bordered" ? (t = g(e), u.set(o, t), t) : e && e.type === "simple-fill" ? (t = S(e), u.set(o, t), t) : e && e.type === "picture-fill" ? (t = s(e), u.set(o, t), t) : e ? (t = w(e), u.set(o, t), t) : p();
|
|
163
|
+
}
|
|
164
|
+
export {
|
|
165
|
+
P as getPolygonStyle
|
|
166
|
+
};
|
package/es/src/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GisMap as
|
|
2
|
-
import "./gis-map-ol";
|
|
3
|
-
export * from "./gis-map-ol";
|
|
1
|
+
import { GisMap as r } from "./gis-map/index.mjs";
|
|
2
|
+
import { GisMapOl as e } from "./gis-map-ol/index.mjs";
|
|
4
3
|
export {
|
|
5
|
-
|
|
4
|
+
r as GisMap,
|
|
5
|
+
e as GisMapOl
|
|
6
6
|
};
|
package/es/src/types/index.d.ts
CHANGED
|
@@ -149,6 +149,7 @@ export interface IOverlayParam {
|
|
|
149
149
|
defaultSymbol?: IPointSymbol | ILineSymbol | IPolygonSymbol;
|
|
150
150
|
defaultVisible?: boolean;
|
|
151
151
|
overlays: Array<IOverlay>;
|
|
152
|
+
needZoom?: boolean;
|
|
152
153
|
}
|
|
153
154
|
export interface IClusterPointParams {
|
|
154
155
|
type?: string;
|
|
@@ -323,7 +324,7 @@ export interface ISignalSubSystem {
|
|
|
323
324
|
subShape?: number[][][] | string;
|
|
324
325
|
nodeSymbol?: any;
|
|
325
326
|
roadSymbol?: any;
|
|
326
|
-
children
|
|
327
|
+
children?: {
|
|
327
328
|
x: number;
|
|
328
329
|
y: number;
|
|
329
330
|
nodeId: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var N = /* @__PURE__ */ ((r) => (r.West = "1", r.North = "2", r.East = "3", r.South = "4", r))(N || {}), x = /* @__PURE__ */ ((r) => (r[r.None = 0] = "None", r[r.PlateNumber = 1] = "PlateNumber", r[r.Id = 2] = "Id", r[r.Mix = 3] = "Mix", r))(x || {});
|
|
2
|
+
export {
|
|
3
|
+
x as EVehiclePlateState,
|
|
4
|
+
N as QuadrantCode
|
|
5
|
+
};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("core-js/stable/array/at");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("core-js/stable/array/at");const r=require("./src/gis-map/utils/index.js"),i=require("./src/index.js"),n=require("./src/gis-map/index.js"),l=require("./src/gis-map-ol/index.js"),u={install:(e,s)=>{for(const o in i)e.use(i[o]);const{gisviewerAssetsRoot:t}=s;e.config.globalProperties.$gisviewerAssetsRoot=t||""}};exports.MapUtils=r.default;exports.GisMap=n.GisMap;exports.GisMapOl=l.GisMapOl;exports.default=u;
|
|
@@ -123,8 +123,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
123
123
|
removeAllClusterPoints: () => void;
|
|
124
124
|
addMask: (params: IMaskParam) => void;
|
|
125
125
|
removeMask: () => void;
|
|
126
|
-
removeOverlaysByType: (types: string[]) => import("../types").IResult;
|
|
127
|
-
removeOverlaysById: (ids: string[]) => import("../types").IResult;
|
|
126
|
+
removeOverlaysByType: (types: string[] | string) => import("../types").IResult;
|
|
127
|
+
removeOverlaysById: (ids: string[] | string) => import("../types").IResult;
|
|
128
128
|
removeAllOverlays: () => import("../types").IResult;
|
|
129
129
|
showAllOverlays: () => void;
|
|
130
130
|
updateQueueLength: (params: IQueueLengthParams[]) => void;
|
|
@@ -217,7 +217,130 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
217
217
|
setEdpassLayerVisibility: (params: IShowEdpassDeviceParams) => Promise<import("../types").IResult>;
|
|
218
218
|
props: any;
|
|
219
219
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick" | "update:zoom", ...args: any[]) => void;
|
|
220
|
-
SignalCountdownPanel:
|
|
220
|
+
SignalCountdownPanel: import("vue").DefineComponent<{
|
|
221
|
+
displayMode: {
|
|
222
|
+
type: StringConstructor;
|
|
223
|
+
required: true;
|
|
224
|
+
};
|
|
225
|
+
flash: {
|
|
226
|
+
type: BooleanConstructor;
|
|
227
|
+
required: true;
|
|
228
|
+
};
|
|
229
|
+
crossId: {
|
|
230
|
+
type: StringConstructor;
|
|
231
|
+
required: true;
|
|
232
|
+
};
|
|
233
|
+
roadId: {
|
|
234
|
+
type: StringConstructor;
|
|
235
|
+
required: true;
|
|
236
|
+
};
|
|
237
|
+
mapPoint: {
|
|
238
|
+
type: ArrayConstructor;
|
|
239
|
+
required: true;
|
|
240
|
+
};
|
|
241
|
+
stopLine: {
|
|
242
|
+
type: ArrayConstructor;
|
|
243
|
+
required: true;
|
|
244
|
+
};
|
|
245
|
+
scale: {
|
|
246
|
+
type: NumberConstructor;
|
|
247
|
+
required: true;
|
|
248
|
+
};
|
|
249
|
+
position: {
|
|
250
|
+
type: ObjectConstructor;
|
|
251
|
+
required: true;
|
|
252
|
+
};
|
|
253
|
+
rotation: {
|
|
254
|
+
type: NumberConstructor;
|
|
255
|
+
required: true;
|
|
256
|
+
};
|
|
257
|
+
lampStatus: {
|
|
258
|
+
type: ObjectConstructor;
|
|
259
|
+
required: true;
|
|
260
|
+
};
|
|
261
|
+
}, {
|
|
262
|
+
colors: string[];
|
|
263
|
+
props: any;
|
|
264
|
+
panelStyle: import("vue").ComputedRef<{
|
|
265
|
+
top: string;
|
|
266
|
+
left: string;
|
|
267
|
+
'transform-origin': string;
|
|
268
|
+
transform: string;
|
|
269
|
+
}>;
|
|
270
|
+
blImage: import("vue").ComputedRef<string>;
|
|
271
|
+
blNumberStyle: import("vue").ComputedRef<any>;
|
|
272
|
+
blLampStyle: import("vue").ComputedRef<{
|
|
273
|
+
display: string;
|
|
274
|
+
animation: string;
|
|
275
|
+
}>;
|
|
276
|
+
uImage: import("vue").ComputedRef<string>;
|
|
277
|
+
uNumberStyle: import("vue").ComputedRef<any>;
|
|
278
|
+
uLampStyle: import("vue").ComputedRef<{
|
|
279
|
+
display: string;
|
|
280
|
+
animation: string;
|
|
281
|
+
}>;
|
|
282
|
+
lImage: import("vue").ComputedRef<string>;
|
|
283
|
+
lNumberStyle: import("vue").ComputedRef<any>;
|
|
284
|
+
lLampStyle: import("vue").ComputedRef<{
|
|
285
|
+
display: string;
|
|
286
|
+
animation: string;
|
|
287
|
+
}>;
|
|
288
|
+
sImage: import("vue").ComputedRef<string>;
|
|
289
|
+
sNumberStyle: import("vue").ComputedRef<any>;
|
|
290
|
+
sLampStyle: import("vue").ComputedRef<{
|
|
291
|
+
display: string;
|
|
292
|
+
animation: string;
|
|
293
|
+
}>;
|
|
294
|
+
rImage: import("vue").ComputedRef<string>;
|
|
295
|
+
rNumberStyle: import("vue").ComputedRef<any>;
|
|
296
|
+
rLampStyle: import("vue").ComputedRef<{
|
|
297
|
+
display: string;
|
|
298
|
+
animation: string;
|
|
299
|
+
}>;
|
|
300
|
+
getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
|
|
301
|
+
getNumberStyle: (color: string | undefined) => any;
|
|
302
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
303
|
+
displayMode: {
|
|
304
|
+
type: StringConstructor;
|
|
305
|
+
required: true;
|
|
306
|
+
};
|
|
307
|
+
flash: {
|
|
308
|
+
type: BooleanConstructor;
|
|
309
|
+
required: true;
|
|
310
|
+
};
|
|
311
|
+
crossId: {
|
|
312
|
+
type: StringConstructor;
|
|
313
|
+
required: true;
|
|
314
|
+
};
|
|
315
|
+
roadId: {
|
|
316
|
+
type: StringConstructor;
|
|
317
|
+
required: true;
|
|
318
|
+
};
|
|
319
|
+
mapPoint: {
|
|
320
|
+
type: ArrayConstructor;
|
|
321
|
+
required: true;
|
|
322
|
+
};
|
|
323
|
+
stopLine: {
|
|
324
|
+
type: ArrayConstructor;
|
|
325
|
+
required: true;
|
|
326
|
+
};
|
|
327
|
+
scale: {
|
|
328
|
+
type: NumberConstructor;
|
|
329
|
+
required: true;
|
|
330
|
+
};
|
|
331
|
+
position: {
|
|
332
|
+
type: ObjectConstructor;
|
|
333
|
+
required: true;
|
|
334
|
+
};
|
|
335
|
+
rotation: {
|
|
336
|
+
type: NumberConstructor;
|
|
337
|
+
required: true;
|
|
338
|
+
};
|
|
339
|
+
lampStatus: {
|
|
340
|
+
type: ObjectConstructor;
|
|
341
|
+
required: true;
|
|
342
|
+
};
|
|
343
|
+
}>>, {}, {}>;
|
|
221
344
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("mapLoaded" | "markerClick" | "mapClick" | "update:zoom")[], "mapLoaded" | "markerClick" | "mapClick" | "update:zoom", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
222
345
|
config: {
|
|
223
346
|
type: StringConstructor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),B=require("../stores/index.js");require("./style/index.css");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),B=require("../stores/index.js");require("./style/index.css");const Ct=require("./utils/dbscan-cluster/index.js"),bt=require("./utils/detect-gpu.js"),Ot=require("./utils/edpass-device-controller.js"),N=require("./utils/green-wave-band-controller/index.js"),kt=require("./utils/holo-flow/index.js"),At=require("./utils/holo-flow/signal-countdown-panel.vue.js"),Dt=require("./utils/map-initializer.js"),z=require("./utils/open-drive-renderer/index.js"),E=require("./utils/overlay.js"),Lt=require("./utils/police-jurisdiction.js"),Tt=require("./utils/queue-length.js"),H=require("./utils/road-config-tool/index.js"),qt=require("./utils/signal-control-area/edit-area.js"),V=require("./utils/signal-control-area/signal-area-controller.js"),Bt=require("./utils/signal-control-area/signal-cross-controller.js"),G=require("./utils/signal-system/signal-system-controller.js"),Vt=require("./utils/traffic-flow.js"),_t={class:"gis-viewer"},It={style:{position:"absolute",bottom:"80px",left:"10px","z-index":"9999"}},Mt=r.defineComponent({__name:"gis-map",props:{config:{},assetsRoot:{}},emits:["mapLoaded","markerClick","mapClick","update:zoom"],setup(Z,{expose:W,emit:j}){const O=r.ref(null);let n,g,l,i,s,o,w,t,u,a,S,f,h,k,y,p;const A=r.ref(!1);B.registerStore();const _=B.default.useAppDataStore,I=r.reactive([]),M=e=>Math.log2(591657527591555e-6/e);let v=null,x=null;const D=e=>{if(!Number.isFinite(e))return;const d=Math.round(e);d!==x&&(x=d,C("update:zoom",d))};bt.default(),r.onMounted(async()=>{if(!O.value)return;document.addEventListener("keydown",m=>{m.ctrlKey&&m.key==="i"&&(A.value=!A.value)});const e=r.getCurrentInstance(),{$gisviewerAssetsRoot:d}=e.appContext.config.globalProperties,c=await(await fetch(P.config)).json();c.assetsRoot=P.assetsRoot||d,_.mapConfig=c,g=new Dt.default,_.mapInitializer=g,n=await g.initialize({container:O.value,mapConfig:c,markerClickCallback:(m,T,q,vt)=>{C("markerClick",m,T,q,vt)},mapClickCallback:(m,T,q)=>{C("mapClick",m,T,q)}});const b=n.zoom??(n.scale?M(n.scale):void 0);typeof b=="number"&&D(b);const ht=n.zoom!==void 0?n.watch("zoom",m=>{D(m)}):n.watch("scale",m=>{typeof m=="number"&&m>0&&D(M(m))});v=()=>ht.remove(),s=new kt.default(n,I),await s.init(),C("mapLoaded")}),r.onUnmounted(()=>{a==null||a.clearSignalControlArea(),t==null||t.clearOpenDrive(),s.clearHoloTrace(),s.clearHoloSignal(),i==null||i.disconnectTrafficFlow(),v==null||v(),v=null});const J=r.computed(()=>n),Q=()=>{const e=B.default.useAppDataStore;e.saveTrackLog=!0},U=()=>{s.downloadTrackLog()},K=()=>{L("vehicleId")},F=()=>{L("plateNumber")},X=async e=>await g.setMapCenter(e),Y=async e=>await g.setMapCamera(e),R=e=>g.setMapZoom(e),$=async e=>await g.lookAt(e),ee=e=>g.setLayerVisibility(e),te=(e,d)=>g.requestCoordinateTransform(e,d),ne=e=>{g.cancelCoordinateTransform(e)},ae=e=>{g.setMapZoomRange(e)},se=e=>(l||(l=new H.default(n)),l.showLaneNumber(e)),re=()=>{l==null||l.clearLaneNumber()},oe=async e=>(l||(l=new H.default(n)),await l.initializeSearch(e)),ie=async()=>l==null?void 0:l.calCrossIndicatorArea(),ce=async()=>{},le=async(e,d)=>{i||(i=new Vt.default(n)),i.connectTrafficFlow(e,d)},ue=()=>{i==null||i.disconnectTrafficFlow()},de=async e=>{s.handleVehicleTraceData(e)},me=()=>{s.clearHoloTrace()},ge=e=>{s.setInterpolate(e)},pe=async e=>{await s.handleSignalData(e)},fe=async e=>{await s.initializeLampGroup(e)},Se=e=>{s.handleUniSignalData(e)},we=()=>{s.clearHoloSignal()},ye=e=>{i==null||i.toggleTrafficInfo(e),s==null||s.toggleTrafficInfo(e)},he=e=>{s==null||s.togglePause(e)},ve=e=>{i==null||i.toggleTrafficObject(e),s==null||s.toggleTrafficObject(e)},L=e=>{s==null||s.updatePanelContent(e)},Ce=async e=>(o||(o=new E.default(n)),o.addOverlays(e)),be=async e=>(y||(y=new Ct.default(n)),y.addClusterPoints(e)),Oe=()=>{y==null||y.removeAllClusterPoints()},ke=e=>(o||(o=new E.default(n)),o.addMask(e)),Ae=()=>{o==null||o.removeMask()},De=e=>o==null?void 0:o.removeOverlaysByType(e),Le=e=>o==null?void 0:o.removeOverlaysById(e),Te=()=>o==null?void 0:o.removeAllOverlays(),qe=()=>{o==null||o.showAllOverlays()},Be=e=>{w||(w=new Tt.default(n)),w.updateQueueLength(e)},Ve=()=>{w==null||w.removeQueueLength()},_e=async(e,d)=>(t||(t=new z.default(n)),await t.showOpenDriveFromServer(e,d)),Ie=async e=>(t||(t=new z.default(n)),await t.clearOpenDrive(),await t.showOpenDriveFromFile(e)),Me=e=>t?t.setOpendriveVisibility(e):{status:-1,message:"未加载OpenDrive地图"},xe=async()=>await(t==null?void 0:t.clearOpenDrive()),Pe=async e=>t?await(t==null?void 0:t.findSumo(e)):{status:-1,message:"未加载OpenDrive地图"},Ne=async e=>t?t.selectSumo(e):{status:-1,message:"未加载OpenDrive地图"},ze=async e=>t?t.unselectSumo(e):{status:-1,message:"未加载OpenDrive地图"},Ee=async e=>t?t.selectComputable(e):{status:-1,message:"未加载OpenDrive地图"},He=async e=>t?await t.geometrySearch(e):{status:-1,message:"未加载OpenDrive地图"},Ge=async e=>t?await t.getSumoInfo(e):{status:-1,message:"未加载OpenDrive地图"},Ze=async e=>t?await(t==null?void 0:t.splitLane(e)):{status:-1,message:"未加载OpenDrive地图"},We=async()=>t?t==null?void 0:t.clearSplitLane():{status:-1,message:"未加载OpenDrive地图"},je=async e=>t?t==null?void 0:t.blockLane(e):{status:-1,message:"未加载OpenDrive地图"},Je=e=>t?t==null?void 0:t.clearBlockLane(e):{status:-1,message:"未加载OpenDrive地图"},Qe=async e=>(a||(a=new V.default(n)),await a.showSignalControlArea(e)),Ue=async e=>(a||(a=new V.default(n)),await a.showDistrict(e)),Ke=async e=>(a||(a=new V.default(n)),await a.showSubDistrict(e)),Fe=async()=>await(a==null?void 0:a.clearSignalControlArea()),Xe=e=>a==null?void 0:a.setLayerVisibility(e),Ye=async e=>a?await(a==null?void 0:a.locateSignalControlArea(e)):{status:-1,message:"未加载信号控制区"},Re=async e=>a?await a.highlightSignalControlArea(e):{status:-1,message:"未加载信号控制区"},$e=()=>a?a.resetHighlight():{status:-1,message:"未加载信号控制区"},et=e=>(u||(u=new qt.default(n)),u.showSubSignalControlArea(e)),tt=e=>u?u.editSubSignalControlArea(e):{status:-1,message:"未加载信号控制区"},nt=()=>u?u.stopEditSubSignalControlArea():{status:-1,message:"未加载信号控制区"},at=e=>u?u.selectSubSignalControlAreaCross(e):{status:-1,message:"未加载信号控制区"},st=e=>u?u.unselectSubSignalControlAreaCross(e):{status:-1,message:"未加载信号控制区"},rt=e=>{if(!u)return{status:-1,message:"未加载信号控制区"}},ot=e=>(S||(S=new Bt.default(n)),S.showSignalCross(e)),it=()=>S?S.clearSignalCross():{status:-1,message:"未加载信号路口"},ct=e=>S?S.changeShowName(e):{status:-1,message:"未加载信号路口"},lt=e=>(p||(p=new G.default(n)),p.showSignalSystems(e)),ut=e=>(p||(p=new G.default(n)),p.showSubSignalSystems(e)),dt=e=>p?p.removeSubSignalSystems(e):{status:-1,message:"未加载信号系统"},mt=e=>p?p.removeSignalSystems(e):{status:-1,message:"未加载信号系统"},gt=e=>(f||(f=new N.default(n)),f.addGreenWaveBand(e)),pt=()=>{if(!f)return{status:-1,message:"未加载绿波带"};f.stopAddGreenWaveBand()},ft=async e=>(f||(f=new N.default(n)),await f.showGreenWaveBand(e)),St=async e=>(h||(h=new Lt.default(n)),await h.showJurisdiction(e)),wt=()=>{if(!h)return{status:-1,message:"未加载警务管辖区"};h.clearJurisdiction()},yt=async e=>(k||(k=new Ot.default(n)),await k.setEdpassLayerVisibility(e)),P=Z,C=j;return W({mapViewer:J,setLayerVisibility:ee,setMapCenter:X,lookAt:$,setMapCamera:Y,setMapZoom:R,setMapZoomRange:ae,requestCoordinateTransform:te,cancelCoordinateTransform:ne,addOverlays:Ce,addClusterPoints:be,removeAllClusterPoints:Oe,addMask:ke,removeMask:Ae,showAllOverlays:qe,removeOverlaysByType:De,removeOverlaysById:Le,removeAllOverlays:Te,showLaneNumber:se,clearLaneNumber:re,initializeAreaTool:oe,calCrossIndicatorArea:ie,calRoadIndicatorArea:ce,connectCarFlow:le,disconnectCarFlow:ue,handleHoloVehicleTraceData:de,clearHoloTrace:me,initializeLampGroup:fe,handleUniSignalData:Se,handleHoloSignalData:pe,clearHoloSignal:we,setInterpolate:ge,toggleTrafficInfo:ye,toggleTrafficObject:ve,toggleVehicleInfo:L,togglePause:he,updateQueueLength:Be,removeQueueLength:Ve,showOpenDriveFromServer:_e,showOpenDriveFromFile:Ie,clearOpenDrive:xe,setOpendriveVisibility:Me,geometrySearchInOpenDrive:He,findSumoInOpenDrive:Pe,selectSumoInOpenDrive:Ne,unselectSumoInOpenDrive:ze,selectComputableInOpenDrive:Ee,getSumoInfo:Ge,splitOpenDriveLane:Ze,clearSplitOpenDriveLane:We,blockOpenDriveLane:je,clearBlockOpenDriveLane:Je,showSignalControlArea:Qe,showDistrictArea:Ue,showSubDistrictArea:Ke,clearSignalControlArea:Fe,setSignalControlAreaVisibility:Xe,locateSignalControlArea:Ye,highlightSignalControlArea:Re,resetHighlightSignalControlArea:$e,showSubSignalControlArea:et,editSubSignalControlArea:tt,stopEditSubSignalControlArea:nt,selectSubSignalControlAreaCross:at,unselectSubSignalControlAreaCross:st,changeSubSignalControlAreaBorderVisibility:rt,showSignalCross:ot,clearSignalCross:it,changeSignalCrossShowName:ct,showSignalSystem:lt,showSubSignalSystem:ut,removeSubSignalSystem:dt,removeSignalSystem:mt,addGreenWaveBand:gt,stopAddGreenWaveBand:pt,showGreenWaveBand:ft,showPoliceArea:St,clearPoliceArea:wt,setEdpassLayerVisibility:yt}),(e,d)=>(r.openBlock(),r.createElementBlock("div",_t,[r.createElementVNode("div",{class:"gis-viewer-main",ref_key:"mapContainer",ref:O},[r.withDirectives(r.createElementVNode("div",It,[r.createElementVNode("button",{style:{"margin-right":"10px"},onClick:Q}," 开始记录 "),r.createElementVNode("button",{style:{"margin-right":"10px"},onClick:U}," 下载日志 "),r.createElementVNode("button",{style:{"margin-right":"10px"},onClick:K}," 显示车辆id "),r.createElementVNode("button",{onClick:F},"显示车辆号牌")],512),[[r.vShow,A.value]])],512),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(I,(c,b)=>(r.openBlock(),r.createBlock(At.default,{key:b,"display-mode":c.displayMode,flash:c.flash,"road-id":c.crossId,"cross-id":c.roadId,"map-point":c.mapPoint,"stop-line":c.stopLine,position:c.position,rotation:c.rotation,scale:c.scale,"lamp-status":c.lampStatus},null,8,["display-mode","flash","road-id","cross-id","map-point","stop-line","position","rotation","scale","lamp-status"]))),128))]))}});exports.default=Mt;
|