gisviewer-vue3-arcgis 1.0.130 → 1.0.132
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 +7 -1
- package/es/src/gis-map/gis-map.vue.mjs +98 -94
- package/es/src/gis-map/index.d.ts +7 -1
- package/es/src/gis-map/utils/holo-flow/index.mjs +2 -1
- package/es/src/gis-map/utils/open-drive-renderer/index.mjs +137 -135
- package/es/src/gis-map/utils/signal-control-area-controller/district-controller.d.ts +1 -0
- package/es/src/gis-map/utils/signal-control-area-controller/district-controller.mjs +2 -2
- package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +12 -1
- package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +87 -52
- package/lib/src/gis-map/gis-map.vue.d.ts +7 -1
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +7 -1
- package/lib/src/gis-map/utils/holo-flow/index.js +1 -1
- package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/district-controller.d.ts +1 -0
- package/lib/src/gis-map/utils/signal-control-area-controller/district-controller.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +12 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
- package/package.json +1 -1
|
@@ -79,7 +79,13 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
79
79
|
splitOpenDriveLane: (params: ISplitOpenDriveLaneParams) => Promise<import("../types").IResult>;
|
|
80
80
|
showSignalControlArea: (params: any) => import("../types").IResult;
|
|
81
81
|
clearSignalControlArea: () => void;
|
|
82
|
-
locateSignalControlArea: (params:
|
|
82
|
+
locateSignalControlArea: (params: {
|
|
83
|
+
id: string;
|
|
84
|
+
}) => Promise<import("../types").IResult>;
|
|
85
|
+
highlightSignalControlArea: (params: {
|
|
86
|
+
id: string;
|
|
87
|
+
}) => Promise<import("../types").IResult>;
|
|
88
|
+
resetHighlightSignalControlArea: () => import("../types").IResult;
|
|
83
89
|
props: any;
|
|
84
90
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
85
91
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("mapLoaded" | "markerClick" | "mapClick")[], "mapLoaded" | "markerClick" | "mapClick", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,91 +1,93 @@
|
|
|
1
|
-
import { defineComponent as Ce, ref as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as Ce, ref as S, onMounted as Oe, getCurrentInstance as ke, onUnmounted as Te, computed as Ae, openBlock as De, createElementBlock as Ie, createElementVNode as p, withDirectives as Le, vShow as be } from "vue";
|
|
2
|
+
import C, { registerStore as _e } from "./stores/index.mjs";
|
|
3
3
|
import "./style/index.css";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
4
|
+
import He from "./utils/holo-flow/index.mjs";
|
|
5
|
+
import xe from "./utils/map-initializer.mjs";
|
|
6
|
+
import O from "./utils/open-drive-renderer/index.mjs";
|
|
7
|
+
import Me from "./utils/overlay.mjs";
|
|
8
|
+
import Ve from "./utils/queue-length.mjs";
|
|
9
9
|
import k from "./utils/road-config-tool/index.mjs";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
const
|
|
10
|
+
import Be from "./utils/signal-control-area-controller/index.mjs";
|
|
11
|
+
import ze from "./utils/traffic-flow.mjs";
|
|
12
|
+
const Ne = { class: "gis-viewer" }, Qe = { style: { position: "absolute", bottom: "10px", left: "10px" } }, Je = /* @__PURE__ */ Ce({
|
|
13
13
|
__name: "gis-map",
|
|
14
14
|
props: {
|
|
15
15
|
config: {},
|
|
16
16
|
assetsRoot: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["mapLoaded", "markerClick", "mapClick"],
|
|
19
|
-
setup(
|
|
20
|
-
const g =
|
|
21
|
-
let
|
|
22
|
-
const f =
|
|
23
|
-
|
|
24
|
-
if (
|
|
19
|
+
setup(T, { expose: A, emit: D }) {
|
|
20
|
+
const g = S(null);
|
|
21
|
+
let i, c, s, n, a, r, u, t, o;
|
|
22
|
+
const f = S(!1);
|
|
23
|
+
Oe(async () => {
|
|
24
|
+
if (_e(), !g.value)
|
|
25
25
|
return;
|
|
26
|
-
document.addEventListener("keydown", (
|
|
27
|
-
|
|
26
|
+
document.addEventListener("keydown", (m) => {
|
|
27
|
+
m.ctrlKey && m.key === "i" && (f.value = !f.value);
|
|
28
28
|
});
|
|
29
|
-
const e =
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
29
|
+
const e = ke(), { $gisviewerAssetsRoot: l } = e.appContext.config.globalProperties, h = await (await fetch(y.config)).json();
|
|
30
|
+
h.assetsRoot = y.assetsRoot || l;
|
|
31
|
+
const he = C.useAppDataStore;
|
|
32
|
+
he.mapConfig = h, c = new xe(), i = await c.initialize({
|
|
33
33
|
container: g.value,
|
|
34
|
-
markerClickCallback: (
|
|
35
|
-
w("markerClick",
|
|
34
|
+
markerClickCallback: (m, d, v, Se) => {
|
|
35
|
+
w("markerClick", m, d, v, Se);
|
|
36
36
|
},
|
|
37
|
-
mapClickCallback: (
|
|
38
|
-
w("mapClick",
|
|
37
|
+
mapClickCallback: (m, d, v) => {
|
|
38
|
+
w("mapClick", m, d, v);
|
|
39
39
|
}
|
|
40
|
-
}),
|
|
40
|
+
}), a = new He(i), await a.init(), w("mapLoaded");
|
|
41
|
+
}), Te(() => {
|
|
42
|
+
o == null || o.clearSignalControlArea(), t == null || t.clearOpenDrive(), a == null || a.clearHoloTrace(), a == null || a.clearHoloSignal(), n == null || n.disconnectTrafficFlow();
|
|
41
43
|
});
|
|
42
|
-
const
|
|
43
|
-
const e =
|
|
44
|
+
const I = Ae(() => i), L = () => {
|
|
45
|
+
const e = C.useAppDataStore;
|
|
44
46
|
e.saveTrackLog = !0;
|
|
45
47
|
}, b = () => {
|
|
46
|
-
|
|
47
|
-
}, _ = async (e) => await
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
|
|
48
|
+
a.downloadTrackLog();
|
|
49
|
+
}, _ = async (e) => await c.setMapCenter(e), H = async (e) => await c.setMapCamera(e), x = async (e) => await c.lookAt(e), M = (e) => c.setLayerVisibility(e), V = (e, l) => c.requestCoordinateTransform(e, l), B = (e) => {
|
|
50
|
+
c.cancelCoordinateTransform(e);
|
|
51
|
+
}, z = (e) => {
|
|
52
|
+
c.setMapZoomRange(e);
|
|
53
|
+
}, N = (e) => (s || (s = new k(i)), s.showLaneNumber(e)), Q = () => {
|
|
54
|
+
s == null || s.clearLaneNumber();
|
|
55
|
+
}, j = async (e) => (s || (s = new k(i)), await s.initializeSearch(e)), P = async () => s == null ? void 0 : s.calCrossIndicatorArea(), E = async () => {
|
|
56
|
+
}, F = async (e, l) => {
|
|
57
|
+
n || (n = new ze(i)), n.connectTrafficFlow(e, l);
|
|
58
|
+
}, R = () => {
|
|
59
|
+
n == null || n.disconnectTrafficFlow();
|
|
58
60
|
}, Z = (e) => {
|
|
59
|
-
|
|
61
|
+
a.handleVehicleTraceData(e);
|
|
60
62
|
}, q = () => {
|
|
61
|
-
|
|
63
|
+
a.clearHoloTrace();
|
|
62
64
|
}, K = (e) => {
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
await
|
|
66
|
-
},
|
|
67
|
-
|
|
65
|
+
a.setInterpolate(e);
|
|
66
|
+
}, U = async (e) => {
|
|
67
|
+
await a.handleSignalData(e);
|
|
68
|
+
}, $ = () => {
|
|
69
|
+
a.clearHoloSignal();
|
|
70
|
+
}, G = (e) => {
|
|
71
|
+
n == null || n.toggleTrafficInfo(e), a.toggleTrafficInfo(e);
|
|
68
72
|
}, J = (e) => {
|
|
69
|
-
|
|
70
|
-
}, U = (e) => {
|
|
71
|
-
r.togglePause(e);
|
|
73
|
+
a.togglePause(e);
|
|
72
74
|
}, W = (e) => {
|
|
73
|
-
|
|
75
|
+
n == null || n.toggleTrafficObject(e), a.toggleTrafficObject(e);
|
|
74
76
|
}, X = (e) => {
|
|
75
|
-
|
|
76
|
-
}, Y = async (e) => (
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
}, se = async (e, l) => (t || (t = new
|
|
77
|
+
a.updatePanelContent(e);
|
|
78
|
+
}, Y = async (e) => (r || (r = new Me(i)), r.addOverlays(e)), ee = (e) => r == null ? void 0 : r.removeOverlaysByType(e), te = (e) => r == null ? void 0 : r.removeOverlaysById(e), ae = () => r == null ? void 0 : r.removeAllOverlays(), ne = () => {
|
|
79
|
+
r == null || r.showAllOverlays();
|
|
80
|
+
}, re = (e) => {
|
|
81
|
+
u || (u = new Ve(i)), u.updateQueueLength(e);
|
|
82
|
+
}, oe = () => {
|
|
83
|
+
u == null || u.removeQueueLength();
|
|
84
|
+
}, se = async (e, l) => (t || (t = new O(i)), await t.showOpenDriveFromServer(e, l)), ie = async (e) => (t || (t = new O(i)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), ce = async () => await (t == null ? void 0 : t.clearOpenDrive()), le = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
|
|
83
85
|
status: -1,
|
|
84
86
|
message: "未加载OpenDrive地图"
|
|
85
|
-
},
|
|
87
|
+
}, ue = async (e) => t ? t.selectSumo(e) : {
|
|
86
88
|
status: -1,
|
|
87
89
|
message: "未加载OpenDrive地图"
|
|
88
|
-
},
|
|
90
|
+
}, me = async (e) => t ? t.unselectSumo(e) : {
|
|
89
91
|
status: -1,
|
|
90
92
|
message: "未加载OpenDrive地图"
|
|
91
93
|
}, pe = async (e) => t ? await t.getSumoInfo(e) : {
|
|
@@ -94,71 +96,73 @@ const Ve = { class: "gis-viewer" }, Be = { style: { position: "absolute", bottom
|
|
|
94
96
|
}, ge = async (e) => t ? await (t == null ? void 0 : t.splitLane(e)) : {
|
|
95
97
|
status: -1,
|
|
96
98
|
message: "未加载OpenDrive地图"
|
|
97
|
-
}, fe = (e) => (
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
return
|
|
101
|
-
mapViewer:
|
|
102
|
-
setLayerVisibility:
|
|
99
|
+
}, fe = (e) => (o || (o = new Be(i)), o.showSignalControlArea(e)), we = () => {
|
|
100
|
+
o == null || o.clearSignalControlArea();
|
|
101
|
+
}, de = async (e) => o ? await o.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, ve = async (e) => o ? await o.highlightSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, ye = () => o ? o.resetHighlight() : { status: -1, message: "未加载信号控制区" }, y = T, w = D;
|
|
102
|
+
return A({
|
|
103
|
+
mapViewer: I,
|
|
104
|
+
setLayerVisibility: M,
|
|
103
105
|
setMapCenter: _,
|
|
104
|
-
lookAt:
|
|
105
|
-
setMapCamera:
|
|
106
|
-
setMapZoomRange:
|
|
106
|
+
lookAt: x,
|
|
107
|
+
setMapCamera: H,
|
|
108
|
+
setMapZoomRange: z,
|
|
107
109
|
requestCoordinateTransform: V,
|
|
108
110
|
cancelCoordinateTransform: B,
|
|
109
111
|
addOverlays: Y,
|
|
110
|
-
showAllOverlays:
|
|
112
|
+
showAllOverlays: ne,
|
|
111
113
|
removeOverlaysByType: ee,
|
|
112
114
|
removeOverlaysById: te,
|
|
113
|
-
removeAllOverlays:
|
|
114
|
-
showLaneNumber:
|
|
115
|
-
clearLaneNumber:
|
|
116
|
-
initializeAreaTool:
|
|
117
|
-
calCrossIndicatorArea:
|
|
118
|
-
calRoadIndicatorArea:
|
|
119
|
-
connectCarFlow:
|
|
120
|
-
disconnectCarFlow:
|
|
115
|
+
removeAllOverlays: ae,
|
|
116
|
+
showLaneNumber: N,
|
|
117
|
+
clearLaneNumber: Q,
|
|
118
|
+
initializeAreaTool: j,
|
|
119
|
+
calCrossIndicatorArea: P,
|
|
120
|
+
calRoadIndicatorArea: E,
|
|
121
|
+
connectCarFlow: F,
|
|
122
|
+
disconnectCarFlow: R,
|
|
121
123
|
handleHoloVehicleTraceData: Z,
|
|
122
124
|
clearHoloTrace: q,
|
|
123
|
-
handleHoloSignalData:
|
|
124
|
-
clearHoloSignal:
|
|
125
|
+
handleHoloSignalData: U,
|
|
126
|
+
clearHoloSignal: $,
|
|
125
127
|
setInterpolate: K,
|
|
126
|
-
toggleTrafficInfo:
|
|
128
|
+
toggleTrafficInfo: G,
|
|
127
129
|
toggleTrafficObject: W,
|
|
128
130
|
toggleVehicleInfo: X,
|
|
129
|
-
togglePause:
|
|
130
|
-
updateQueueLength:
|
|
131
|
-
removeQueueLength:
|
|
131
|
+
togglePause: J,
|
|
132
|
+
updateQueueLength: re,
|
|
133
|
+
removeQueueLength: oe,
|
|
132
134
|
showOpenDriveFromServer: se,
|
|
133
135
|
showOpenDriveFromFile: ie,
|
|
134
136
|
clearOpenDrive: ce,
|
|
135
137
|
findSumoInOpenDrive: le,
|
|
136
|
-
selectSumoInOpenDrive:
|
|
137
|
-
unselectSumoInOpenDrive:
|
|
138
|
+
selectSumoInOpenDrive: ue,
|
|
139
|
+
unselectSumoInOpenDrive: me,
|
|
138
140
|
getSumoInfo: pe,
|
|
139
141
|
splitOpenDriveLane: ge,
|
|
140
142
|
showSignalControlArea: fe,
|
|
141
143
|
clearSignalControlArea: we,
|
|
142
|
-
locateSignalControlArea:
|
|
143
|
-
|
|
144
|
+
locateSignalControlArea: de,
|
|
145
|
+
highlightSignalControlArea: ve,
|
|
146
|
+
resetHighlightSignalControlArea: ye
|
|
147
|
+
}), (e, l) => (De(), Ie("div", Ne, [
|
|
144
148
|
p("div", {
|
|
145
149
|
class: "gis-viewer-main",
|
|
146
150
|
ref_key: "mapContainer",
|
|
147
151
|
ref: g
|
|
148
152
|
}, [
|
|
149
|
-
|
|
153
|
+
Le(p("div", Qe, [
|
|
150
154
|
p("button", {
|
|
151
155
|
style: { "margin-right": "10px" },
|
|
152
|
-
onClick:
|
|
156
|
+
onClick: L
|
|
153
157
|
}, " 开始记录 "),
|
|
154
158
|
p("button", { onClick: b }, "下载日志")
|
|
155
159
|
], 512), [
|
|
156
|
-
[
|
|
160
|
+
[be, f.value]
|
|
157
161
|
])
|
|
158
162
|
], 512)
|
|
159
163
|
]));
|
|
160
164
|
}
|
|
161
165
|
});
|
|
162
166
|
export {
|
|
163
|
-
|
|
167
|
+
Je as default
|
|
164
168
|
};
|
|
@@ -68,7 +68,13 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
68
68
|
splitOpenDriveLane: (params: import("../types").ISplitOpenDriveLaneParams) => Promise<import("../types").IResult>;
|
|
69
69
|
showSignalControlArea: (params: any) => import("../types").IResult;
|
|
70
70
|
clearSignalControlArea: () => void;
|
|
71
|
-
locateSignalControlArea: (params:
|
|
71
|
+
locateSignalControlArea: (params: {
|
|
72
|
+
id: string;
|
|
73
|
+
}) => Promise<import("../types").IResult>;
|
|
74
|
+
highlightSignalControlArea: (params: {
|
|
75
|
+
id: string;
|
|
76
|
+
}) => Promise<import("../types").IResult>;
|
|
77
|
+
resetHighlightSignalControlArea: () => import("../types").IResult;
|
|
72
78
|
props: any;
|
|
73
79
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
74
80
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("mapLoaded" | "markerClick" | "mapClick")[], "mapLoaded" | "markerClick" | "mapClick", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -58,7 +58,8 @@ class n {
|
|
|
58
58
|
this.signalHoloFlow || (this.signalHoloFlow = new a(this.view)), await this.signalHoloFlow.initializeLayer(), await this.signalHoloFlow.handleSignalData(e);
|
|
59
59
|
}
|
|
60
60
|
clearHoloSignal() {
|
|
61
|
-
|
|
61
|
+
var e;
|
|
62
|
+
(e = this.signalHoloFlow) == null || e.clearSignal();
|
|
62
63
|
}
|
|
63
64
|
setInterpolate(e) {
|
|
64
65
|
this.traceHoloFlow.setInterpolate(e);
|