gisviewer-vue3-arcgis 1.0.154 → 1.0.156
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/src/gis-map/gis-map.vue.d.ts +4 -2
- package/es/src/gis-map/gis-map.vue.mjs +120 -116
- package/es/src/gis-map/index.d.ts +3 -1
- package/es/src/gis-map/utils/holo-flow/index.d.ts +1 -2
- package/es/src/gis-map/utils/holo-flow/index.mjs +19 -12
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +9 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +43 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +3 -4
- package/es/src/gis-map/utils/open-drive-renderer/index.d.ts +1 -0
- package/es/src/gis-map/utils/open-drive-renderer/index.mjs +52 -46
- package/es/src/gis-map/utils/overlay.d.ts +3 -1
- package/es/src/gis-map/utils/overlay.mjs +75 -43
- package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +8 -4
- package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +216 -137
- package/es/src/types/index.d.ts +5 -0
- package/lib/src/gis-map/gis-map.vue.d.ts +4 -2
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +3 -1
- package/lib/src/gis-map/utils/holo-flow/index.d.ts +1 -2
- package/lib/src/gis-map/utils/holo-flow/index.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +9 -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.d.ts +3 -4
- package/lib/src/gis-map/utils/open-drive-renderer/index.d.ts +1 -0
- package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
- package/lib/src/gis-map/utils/overlay.d.ts +3 -1
- package/lib/src/gis-map/utils/overlay.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +8 -4
- package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
- package/lib/src/types/index.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import MapView from '@arcgis/core/views/MapView';
|
|
2
2
|
import SceneView from '@arcgis/core/views/SceneView';
|
|
3
|
-
import { IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowOpenDriveFromFileParams, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
|
|
3
|
+
import { IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowOpenDriveFromFileParams, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
|
|
4
4
|
import HoloFlow from './utils/holo-flow';
|
|
5
5
|
import MapInitializer from './utils/map-initializer';
|
|
6
6
|
import OpenDriveRenderer from './utils/open-drive-renderer';
|
|
@@ -63,6 +63,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
63
63
|
toggleTrafficObject: (params: IToggleTrafficInfoParams) => void;
|
|
64
64
|
toggleVehicleInfo: (contentType: string) => void;
|
|
65
65
|
addOverlays: (params: IOverlayParam) => Promise<import("../types").IResult>;
|
|
66
|
+
addMask: (params: IMaskParam) => void;
|
|
67
|
+
removeMask: () => void;
|
|
66
68
|
removeOverlaysByType: (types: string[]) => import("../types").IResult;
|
|
67
69
|
removeOverlaysById: (ids: string[]) => import("../types").IResult;
|
|
68
70
|
removeAllOverlays: () => import("../types").IResult;
|
|
@@ -82,7 +84,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
82
84
|
status: number;
|
|
83
85
|
message: string;
|
|
84
86
|
}>;
|
|
85
|
-
showSignalControlArea: (params: any) => import("../types").IResult
|
|
87
|
+
showSignalControlArea: (params: any) => Promise<import("../types").IResult>;
|
|
86
88
|
clearSignalControlArea: () => void;
|
|
87
89
|
locateSignalControlArea: (params: {
|
|
88
90
|
id: string;
|
|
@@ -1,176 +1,180 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import O, { registerStore as
|
|
1
|
+
import { defineComponent as Le, ref as S, onMounted as Ae, getCurrentInstance as Ie, onUnmounted as be, computed as Me, openBlock as _e, createElementBlock as He, createElementVNode as p, withDirectives as xe, vShow as Ve } from "vue";
|
|
2
|
+
import O, { registerStore as Be } from "./stores/index.mjs";
|
|
3
3
|
import "./style/index.css";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import ze from "./utils/holo-flow/index.mjs";
|
|
5
|
+
import Ne from "./utils/map-initializer.mjs";
|
|
6
6
|
import C from "./utils/open-drive-renderer/index.mjs";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
7
|
+
import k from "./utils/overlay.mjs";
|
|
8
|
+
import Qe from "./utils/queue-length.mjs";
|
|
9
|
+
import T from "./utils/road-config-tool/index.mjs";
|
|
10
|
+
import je from "./utils/signal-control-area-controller/index.mjs";
|
|
11
|
+
import Pe from "./utils/traffic-flow.mjs";
|
|
12
|
+
const Ee = { class: "gis-viewer" }, Fe = { style: { position: "absolute", bottom: "10px", left: "10px" } }, et = /* @__PURE__ */ Le({
|
|
13
13
|
__name: "gis-map",
|
|
14
14
|
props: {
|
|
15
15
|
config: {},
|
|
16
16
|
assetsRoot: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["mapLoaded", "markerClick", "mapClick"],
|
|
19
|
-
setup(
|
|
19
|
+
setup(D, { expose: L, emit: A }) {
|
|
20
20
|
const g = S(null);
|
|
21
|
-
let
|
|
21
|
+
let s, c, i, r, n, a, u, t, o;
|
|
22
22
|
const f = S(!1);
|
|
23
|
-
|
|
24
|
-
if (
|
|
23
|
+
Ae(async () => {
|
|
24
|
+
if (Be(), !g.value)
|
|
25
25
|
return;
|
|
26
26
|
document.addEventListener("keydown", (m) => {
|
|
27
27
|
m.ctrlKey && m.key === "i" && (f.value = !f.value);
|
|
28
28
|
});
|
|
29
|
-
const e =
|
|
30
|
-
h.assetsRoot =
|
|
31
|
-
const
|
|
32
|
-
|
|
29
|
+
const e = Ie(), { $gisviewerAssetsRoot: l } = e.appContext.config.globalProperties, h = await (await fetch(y.config)).json();
|
|
30
|
+
h.assetsRoot = y.assetsRoot || l;
|
|
31
|
+
const Te = O.useAppDataStore;
|
|
32
|
+
Te.mapConfig = h, c = new Ne(), s = await c.initialize({
|
|
33
33
|
container: g.value,
|
|
34
|
-
markerClickCallback: (m,
|
|
35
|
-
w("markerClick", m,
|
|
34
|
+
markerClickCallback: (m, d, v, De) => {
|
|
35
|
+
w("markerClick", m, d, v, De);
|
|
36
36
|
},
|
|
37
|
-
mapClickCallback: (m,
|
|
38
|
-
w("mapClick", m,
|
|
37
|
+
mapClickCallback: (m, d, v) => {
|
|
38
|
+
w("mapClick", m, d, v);
|
|
39
39
|
}
|
|
40
|
-
}),
|
|
41
|
-
}),
|
|
42
|
-
o == null || o.clearSignalControlArea(), t == null || t.clearOpenDrive(),
|
|
40
|
+
}), n = new ze(s), await n.init(), w("mapLoaded");
|
|
41
|
+
}), be(() => {
|
|
42
|
+
o == null || o.clearSignalControlArea(), t == null || t.clearOpenDrive(), n == null || n.clearHoloTrace(), n == null || n.clearHoloSignal(), r == null || r.disconnectTrafficFlow();
|
|
43
43
|
});
|
|
44
|
-
const
|
|
44
|
+
const I = Me(() => s), b = () => {
|
|
45
45
|
const e = O.useAppDataStore;
|
|
46
46
|
e.saveTrackLog = !0;
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
}, _ = async (e) => await c.setMapCenter(e), H = async (e) => await c.setMapCamera(e), x = async (e) => await c.lookAt(e),
|
|
47
|
+
}, M = () => {
|
|
48
|
+
n.downloadTrackLog();
|
|
49
|
+
}, _ = async (e) => await c.setMapCenter(e), H = async (e) => await c.setMapCamera(e), x = async (e) => await c.lookAt(e), V = (e) => c.setLayerVisibility(e), B = (e, l) => c.requestCoordinateTransform(e, l), z = (e) => {
|
|
50
50
|
c.cancelCoordinateTransform(e);
|
|
51
|
-
},
|
|
51
|
+
}, N = (e) => {
|
|
52
52
|
c.setMapZoomRange(e);
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
await
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
}, J = (e) => {
|
|
71
|
-
n == null || n.toggleTrafficInfo(e), a.toggleTrafficInfo(e);
|
|
53
|
+
}, Q = (e) => (i || (i = new T(s)), i.showLaneNumber(e)), j = () => {
|
|
54
|
+
i == null || i.clearLaneNumber();
|
|
55
|
+
}, P = async (e) => (i || (i = new T(s)), await i.initializeSearch(e)), E = async () => i == null ? void 0 : i.calCrossIndicatorArea(), F = async () => {
|
|
56
|
+
}, Z = async (e, l) => {
|
|
57
|
+
r || (r = new Pe(s)), r.connectTrafficFlow(e, l);
|
|
58
|
+
}, q = () => {
|
|
59
|
+
r == null || r.disconnectTrafficFlow();
|
|
60
|
+
}, K = (e) => {
|
|
61
|
+
n.handleVehicleTraceData(e);
|
|
62
|
+
}, U = () => {
|
|
63
|
+
n.clearHoloTrace();
|
|
64
|
+
}, $ = (e) => {
|
|
65
|
+
n.setInterpolate(e);
|
|
66
|
+
}, G = async (e) => {
|
|
67
|
+
await n.handleSignalData(e);
|
|
68
|
+
}, J = () => {
|
|
69
|
+
n.clearHoloSignal();
|
|
72
70
|
}, R = (e) => {
|
|
73
|
-
|
|
71
|
+
r == null || r.toggleTrafficInfo(e), n.toggleTrafficInfo(e);
|
|
74
72
|
}, W = (e) => {
|
|
75
|
-
n
|
|
73
|
+
n.togglePause(e);
|
|
76
74
|
}, X = (e) => {
|
|
77
|
-
|
|
78
|
-
}, Y =
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
}, oe = () => {
|
|
75
|
+
r == null || r.toggleTrafficObject(e), n.toggleTrafficObject(e);
|
|
76
|
+
}, Y = (e) => {
|
|
77
|
+
n.updatePanelContent(e);
|
|
78
|
+
}, ee = async (e) => (a || (a = new k(s)), a.addOverlays(e)), te = (e) => (a || (a = new k(s)), a.addMask(e)), ae = () => {
|
|
79
|
+
a == null || a.removeMask();
|
|
80
|
+
}, ne = (e) => a == null ? void 0 : a.removeOverlaysByType(e), re = (e) => a == null ? void 0 : a.removeOverlaysById(e), oe = () => a == null ? void 0 : a.removeAllOverlays(), se = () => {
|
|
81
|
+
a == null || a.showAllOverlays();
|
|
82
|
+
}, ie = (e) => {
|
|
83
|
+
u || (u = new Qe(s)), u.updateQueueLength(e);
|
|
84
|
+
}, ce = () => {
|
|
83
85
|
u == null || u.removeQueueLength();
|
|
84
|
-
},
|
|
86
|
+
}, le = async (e, l) => (t || (t = new C(s)), await t.showOpenDriveFromServer(e, l)), ue = async (e) => (t || (t = new C(s)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), me = async () => await (t == null ? void 0 : t.clearOpenDrive()), pe = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
|
|
85
87
|
status: -1,
|
|
86
88
|
message: "未加载OpenDrive地图"
|
|
87
|
-
},
|
|
89
|
+
}, ge = async (e) => t ? t.selectSumo(e) : {
|
|
88
90
|
status: -1,
|
|
89
91
|
message: "未加载OpenDrive地图"
|
|
90
|
-
},
|
|
92
|
+
}, fe = async (e) => t ? t.unselectSumo(e) : {
|
|
91
93
|
status: -1,
|
|
92
94
|
message: "未加载OpenDrive地图"
|
|
93
|
-
},
|
|
95
|
+
}, we = async (e) => t ? await t.geometrySearch(e) : {
|
|
94
96
|
status: -1,
|
|
95
97
|
message: "未加载OpenDrive地图"
|
|
96
|
-
},
|
|
98
|
+
}, de = async (e) => t ? await t.getSumoInfo(e) : {
|
|
97
99
|
status: -1,
|
|
98
100
|
message: "未加载OpenDrive地图"
|
|
99
|
-
},
|
|
101
|
+
}, ve = async (e) => t ? await (t == null ? void 0 : t.splitLane(e)) : {
|
|
100
102
|
status: -1,
|
|
101
103
|
message: "未加载OpenDrive地图"
|
|
102
|
-
},
|
|
104
|
+
}, ye = async () => t ? t == null ? void 0 : t.clearSplitLane() : {
|
|
103
105
|
status: -1,
|
|
104
106
|
message: "未加载OpenDrive地图"
|
|
105
|
-
},
|
|
107
|
+
}, he = async (e) => (o || (o = new je(s)), await o.showSignalControlArea(e)), Se = () => {
|
|
106
108
|
o == null || o.clearSignalControlArea();
|
|
107
|
-
},
|
|
108
|
-
return
|
|
109
|
-
mapViewer:
|
|
110
|
-
setLayerVisibility:
|
|
109
|
+
}, Oe = async (e) => o ? await o.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, Ce = async (e) => o ? await o.highlightSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, ke = () => o ? o.resetHighlight() : { status: -1, message: "未加载信号控制区" }, y = D, w = A;
|
|
110
|
+
return L({
|
|
111
|
+
mapViewer: I,
|
|
112
|
+
setLayerVisibility: V,
|
|
111
113
|
setMapCenter: _,
|
|
112
114
|
lookAt: x,
|
|
113
115
|
setMapCamera: H,
|
|
114
|
-
setMapZoomRange:
|
|
115
|
-
requestCoordinateTransform:
|
|
116
|
-
cancelCoordinateTransform:
|
|
117
|
-
addOverlays:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
116
|
+
setMapZoomRange: N,
|
|
117
|
+
requestCoordinateTransform: B,
|
|
118
|
+
cancelCoordinateTransform: z,
|
|
119
|
+
addOverlays: ee,
|
|
120
|
+
addMask: te,
|
|
121
|
+
removeMask: ae,
|
|
122
|
+
showAllOverlays: se,
|
|
123
|
+
removeOverlaysByType: ne,
|
|
124
|
+
removeOverlaysById: re,
|
|
125
|
+
removeAllOverlays: oe,
|
|
126
|
+
showLaneNumber: Q,
|
|
127
|
+
clearLaneNumber: j,
|
|
128
|
+
initializeAreaTool: P,
|
|
129
|
+
calCrossIndicatorArea: E,
|
|
130
|
+
calRoadIndicatorArea: F,
|
|
131
|
+
connectCarFlow: Z,
|
|
132
|
+
disconnectCarFlow: q,
|
|
133
|
+
handleHoloVehicleTraceData: K,
|
|
134
|
+
clearHoloTrace: U,
|
|
135
|
+
handleHoloSignalData: G,
|
|
136
|
+
clearHoloSignal: J,
|
|
137
|
+
setInterpolate: $,
|
|
138
|
+
toggleTrafficInfo: R,
|
|
139
|
+
toggleTrafficObject: X,
|
|
140
|
+
toggleVehicleInfo: Y,
|
|
141
|
+
togglePause: W,
|
|
142
|
+
updateQueueLength: ie,
|
|
143
|
+
removeQueueLength: ce,
|
|
144
|
+
showOpenDriveFromServer: le,
|
|
145
|
+
showOpenDriveFromFile: ue,
|
|
146
|
+
clearOpenDrive: me,
|
|
147
|
+
geometrySearchInOpenDrive: we,
|
|
148
|
+
findSumoInOpenDrive: pe,
|
|
149
|
+
selectSumoInOpenDrive: ge,
|
|
150
|
+
unselectSumoInOpenDrive: fe,
|
|
151
|
+
getSumoInfo: de,
|
|
152
|
+
splitOpenDriveLane: ve,
|
|
153
|
+
clearSplitOpenDriveLane: ye,
|
|
154
|
+
showSignalControlArea: he,
|
|
155
|
+
clearSignalControlArea: Se,
|
|
156
|
+
locateSignalControlArea: Oe,
|
|
157
|
+
highlightSignalControlArea: Ce,
|
|
158
|
+
resetHighlightSignalControlArea: ke
|
|
159
|
+
}), (e, l) => (_e(), He("div", Ee, [
|
|
156
160
|
p("div", {
|
|
157
161
|
class: "gis-viewer-main",
|
|
158
162
|
ref_key: "mapContainer",
|
|
159
163
|
ref: g
|
|
160
164
|
}, [
|
|
161
|
-
|
|
165
|
+
xe(p("div", Fe, [
|
|
162
166
|
p("button", {
|
|
163
167
|
style: { "margin-right": "10px" },
|
|
164
|
-
onClick:
|
|
168
|
+
onClick: b
|
|
165
169
|
}, " 开始记录 "),
|
|
166
|
-
p("button", { onClick:
|
|
170
|
+
p("button", { onClick: M }, "下载日志")
|
|
167
171
|
], 512), [
|
|
168
|
-
[
|
|
172
|
+
[Ve, f.value]
|
|
169
173
|
])
|
|
170
174
|
], 512)
|
|
171
175
|
]));
|
|
172
176
|
}
|
|
173
177
|
});
|
|
174
178
|
export {
|
|
175
|
-
|
|
179
|
+
et as default
|
|
176
180
|
};
|
|
@@ -52,6 +52,8 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
52
52
|
toggleTrafficObject: (params: import("../types").IToggleTrafficInfoParams) => void;
|
|
53
53
|
toggleVehicleInfo: (contentType: string) => void;
|
|
54
54
|
addOverlays: (params: import("../types").IOverlayParam) => Promise<import("../types").IResult>;
|
|
55
|
+
addMask: (params: import("../types").IMaskParam) => void;
|
|
56
|
+
removeMask: () => void;
|
|
55
57
|
removeOverlaysByType: (types: string[]) => import("../types").IResult;
|
|
56
58
|
removeOverlaysById: (ids: string[]) => import("../types").IResult;
|
|
57
59
|
removeAllOverlays: () => import("../types").IResult;
|
|
@@ -71,7 +73,7 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
71
73
|
status: number;
|
|
72
74
|
message: string;
|
|
73
75
|
}>;
|
|
74
|
-
showSignalControlArea: (params: any) => import("../types").IResult
|
|
76
|
+
showSignalControlArea: (params: any) => Promise<import("../types").IResult>;
|
|
75
77
|
clearSignalControlArea: () => void;
|
|
76
78
|
locateSignalControlArea: (params: {
|
|
77
79
|
id: string;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import View from '@arcgis/core/views/View';
|
|
2
1
|
import { IToggleTrafficInfoParams } from '../../../types';
|
|
3
2
|
export default class Index {
|
|
4
3
|
private readonly view;
|
|
5
4
|
private traceHoloFlow;
|
|
6
5
|
private signalHoloFlow;
|
|
7
|
-
constructor(view:
|
|
6
|
+
constructor(view: __esri.MapView | __esri.SceneView);
|
|
8
7
|
init(): Promise<void>;
|
|
9
8
|
/**
|
|
10
9
|
* 处理全息流轨迹数据
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { EVehiclePlateState as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { EVehiclePlateState as a } from "../../../types/index.mjs";
|
|
2
|
+
import i from "../../stores/index.mjs";
|
|
3
|
+
import r from "./signal-holo-flow.mjs";
|
|
4
|
+
import s from "./signal-holo-flow-lsr.mjs";
|
|
5
|
+
import n from "./trace-holo-flow.mjs";
|
|
6
|
+
class p {
|
|
5
7
|
constructor(e) {
|
|
6
8
|
this.view = e;
|
|
7
9
|
}
|
|
8
10
|
async init() {
|
|
9
|
-
this.traceHoloFlow = new
|
|
11
|
+
this.traceHoloFlow = new n(this.view), await this.traceHoloFlow.init();
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* 处理全息流轨迹数据
|
|
@@ -37,25 +39,30 @@ class n {
|
|
|
37
39
|
this.traceHoloFlow.togglePause(e);
|
|
38
40
|
}
|
|
39
41
|
updatePanelContent(e) {
|
|
40
|
-
let o =
|
|
42
|
+
let o = a.None;
|
|
41
43
|
switch (e) {
|
|
42
44
|
case "none":
|
|
43
|
-
o =
|
|
45
|
+
o = a.None;
|
|
44
46
|
break;
|
|
45
47
|
case "plateNumber":
|
|
46
|
-
o =
|
|
48
|
+
o = a.PlateNumber;
|
|
47
49
|
break;
|
|
48
50
|
case "vehicleId":
|
|
49
|
-
o =
|
|
51
|
+
o = a.Id;
|
|
50
52
|
break;
|
|
51
53
|
case "mix":
|
|
52
|
-
o =
|
|
54
|
+
o = a.Mix;
|
|
53
55
|
break;
|
|
54
56
|
}
|
|
55
57
|
this.traceHoloFlow.updatePanelContent(o);
|
|
56
58
|
}
|
|
57
59
|
async handleSignalData(e) {
|
|
58
|
-
|
|
60
|
+
var o, l;
|
|
61
|
+
if (!this.signalHoloFlow) {
|
|
62
|
+
const t = i.useAppDataStore;
|
|
63
|
+
((l = (o = JSON.parse(JSON.stringify(t.mapConfig)).holoFlow) == null ? void 0 : o.signal) == null ? void 0 : l.style) === "LSR" ? this.signalHoloFlow = new s(this.view) : this.signalHoloFlow = new r(this.view), await this.signalHoloFlow.initializeLayer();
|
|
64
|
+
}
|
|
65
|
+
await this.signalHoloFlow.handleSignalData(e);
|
|
59
66
|
}
|
|
60
67
|
clearHoloSignal() {
|
|
61
68
|
var e;
|
|
@@ -69,5 +76,5 @@ class n {
|
|
|
69
76
|
}
|
|
70
77
|
}
|
|
71
78
|
export {
|
|
72
|
-
|
|
79
|
+
p as default
|
|
73
80
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import SignalHoloFlow from './signal-holo-flow';
|
|
2
|
+
export default class LSRSignalHoloFlow extends SignalHoloFlow {
|
|
3
|
+
private stopLineLayer;
|
|
4
|
+
constructor(view: __esri.MapView | __esri.SceneView);
|
|
5
|
+
private stopLineMap;
|
|
6
|
+
initializeLayer(): Promise<void>;
|
|
7
|
+
handleSignalData(data: any): Promise<void>;
|
|
8
|
+
clearSignal(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import c from "@arcgis/core/Graphic";
|
|
2
|
+
import h from "@arcgis/core/layers/GraphicsLayer";
|
|
3
|
+
import d from "./signal-holo-flow.mjs";
|
|
4
|
+
class f extends d {
|
|
5
|
+
constructor(e) {
|
|
6
|
+
super(e), this.stopLineLayer = new h(), this.stopLineMap = /* @__PURE__ */ new Map(), this.view.map.add(this.stopLineLayer);
|
|
7
|
+
}
|
|
8
|
+
async initializeLayer() {
|
|
9
|
+
var s, a;
|
|
10
|
+
console.time("初始化停止线图层");
|
|
11
|
+
let e = (a = (s = this.mapConfig.holoFlow) == null ? void 0 : s.signal) == null ? void 0 : a.stopLineLayer;
|
|
12
|
+
if (!e)
|
|
13
|
+
return;
|
|
14
|
+
e = this.mapConfig.assetsRoot + "/" + e;
|
|
15
|
+
const o = await (await fetch(e)).json();
|
|
16
|
+
console.log(o.features.length), o.features.forEach((t) => {
|
|
17
|
+
const { roadId: n, nodeId: r } = t.properties, { coordinates: p } = t.geometry, l = this.stopLineMap.get(r);
|
|
18
|
+
l ? l.set(n, p) : this.stopLineMap.set(r, /* @__PURE__ */ new Map([[n, p]]));
|
|
19
|
+
}), console.timeEnd("初始化停止线图层"), console.log(this.stopLineMap.size);
|
|
20
|
+
}
|
|
21
|
+
async handleSignalData(e) {
|
|
22
|
+
const { crossId: i } = e, o = this.stopLineMap.get(i);
|
|
23
|
+
o && o.forEach((s, a) => {
|
|
24
|
+
const t = new c({
|
|
25
|
+
geometry: {
|
|
26
|
+
type: "polyline",
|
|
27
|
+
paths: [s]
|
|
28
|
+
},
|
|
29
|
+
symbol: {
|
|
30
|
+
type: "simple-line",
|
|
31
|
+
color: [255, 0, 0],
|
|
32
|
+
width: 4
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
this.stopLineLayer.add(t);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
clearSignal() {
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
f as default
|
|
43
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import View from '@arcgis/core/views/View';
|
|
2
1
|
export default class SignalHoloFlow {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
protected view: __esri.MapView | __esri.SceneView;
|
|
3
|
+
protected mapConfig: any;
|
|
5
4
|
/** 显示停止线的图层 */
|
|
6
5
|
private phaseLineLayer;
|
|
7
6
|
/** 每个路口的当前相位 */
|
|
@@ -11,7 +10,7 @@ export default class SignalHoloFlow {
|
|
|
11
10
|
private countdownWatchHandel;
|
|
12
11
|
private plateBackground;
|
|
13
12
|
private lastDataTime;
|
|
14
|
-
constructor(view:
|
|
13
|
+
constructor(view: __esri.MapView | __esri.SceneView);
|
|
15
14
|
/**
|
|
16
15
|
* 初始化相位线图层
|
|
17
16
|
* */
|