gisviewer-vue3-arcgis 1.0.179 → 1.0.181
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 +9 -1
- package/es/src/gis-map/gis-map.vue.mjs +65 -60
- package/es/src/gis-map/index.d.ts +9 -1
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +1 -0
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +58 -73
- package/es/src/gis-map/utils/holo-flow/trace-renderer-external.mjs +3 -5
- package/es/src/gis-map/utils/open-drive-renderer/index.mjs +21 -21
- package/es/src/gis-map/utils/signal-control-area-controller/district-controller.mjs +25 -35
- package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +23 -1
- package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +53 -17
- package/lib/src/gis-map/gis-map.vue.d.ts +9 -1
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +9 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.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.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +23 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
- package/package.json +1 -1
|
@@ -125,10 +125,17 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
125
125
|
}) => Promise<import("../types").IResult>;
|
|
126
126
|
resetHighlightSignalControlArea: () => import("../types").IResult;
|
|
127
127
|
showSubSignalControlArea: (params: any) => import("../types").IResult;
|
|
128
|
-
editSubSignalControlArea: (
|
|
128
|
+
editSubSignalControlArea: (addCrossCallback: (params: {
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
}) => void, removeCrossCallback: (params: {
|
|
132
|
+
id: string;
|
|
133
|
+
}) => void) => Promise<import("../types").IResult> | {
|
|
129
134
|
status: number;
|
|
130
135
|
message: string;
|
|
131
136
|
};
|
|
137
|
+
selectSubSignalControlAreaCross: (id: string) => import("../types").IResult;
|
|
138
|
+
unselectSubSignalControlAreaCross: (id: string) => import("../types").IResult;
|
|
132
139
|
props: any;
|
|
133
140
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
134
141
|
SignalCountdownPanel: import("vue").DefineComponent<{
|
|
@@ -185,6 +192,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
185
192
|
rImage: import("vue").ComputedRef<string>;
|
|
186
193
|
rNumberStyle: import("vue").ComputedRef<any>;
|
|
187
194
|
getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
|
|
195
|
+
getNumberStyle: (color: string | undefined) => any;
|
|
188
196
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
189
197
|
displayMode: {
|
|
190
198
|
type: StringConstructor;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import b, { registerStore as
|
|
1
|
+
import { defineComponent as Be, ref as k, reactive as Ne, onMounted as ze, getCurrentInstance as Qe, onUnmounted as je, computed as Ee, openBlock as C, createElementBlock as A, createElementVNode as g, withDirectives as Ze, vShow as $e, Fragment as qe, renderList as Ke, createBlock as Ue } from "vue";
|
|
2
|
+
import b, { registerStore as Ge } from "./stores/index.mjs";
|
|
3
3
|
import "./style/index.css";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import Je from "./utils/holo-flow/index.mjs";
|
|
5
|
+
import Re from "./utils/holo-flow/signal-countdown-panel.vue.mjs";
|
|
6
|
+
import We from "./utils/map-initializer.mjs";
|
|
7
7
|
import D from "./utils/open-drive-renderer/index.mjs";
|
|
8
8
|
import L from "./utils/overlay.mjs";
|
|
9
|
-
import
|
|
9
|
+
import Xe from "./utils/queue-length.mjs";
|
|
10
10
|
import T from "./utils/road-config-tool/index.mjs";
|
|
11
11
|
import I from "./utils/signal-control-area-controller/index.mjs";
|
|
12
|
-
import
|
|
13
|
-
const
|
|
12
|
+
import Ye from "./utils/traffic-flow.mjs";
|
|
13
|
+
const Fe = { class: "gis-viewer" }, et = { style: { position: "absolute", bottom: "80px", left: "10px", "z-index": "9999" } }, gt = /* @__PURE__ */ Be({
|
|
14
14
|
__name: "gis-map",
|
|
15
15
|
props: {
|
|
16
16
|
config: {},
|
|
@@ -19,83 +19,83 @@ const Xe = { class: "gis-viewer" }, Ye = { style: { position: "absolute", bottom
|
|
|
19
19
|
emits: ["mapLoaded", "markerClick", "mapClick"],
|
|
20
20
|
setup(M, { expose: _, emit: x }) {
|
|
21
21
|
const d = k(null);
|
|
22
|
-
let
|
|
22
|
+
let o, u, c, s, n, r, p, t, a;
|
|
23
23
|
const f = k(!1);
|
|
24
|
-
|
|
25
|
-
const H = b.useAppDataStore,
|
|
26
|
-
|
|
24
|
+
Ge();
|
|
25
|
+
const H = b.useAppDataStore, v = Ne([]);
|
|
26
|
+
ze(async () => {
|
|
27
27
|
if (!d.value)
|
|
28
28
|
return;
|
|
29
29
|
document.addEventListener("keydown", (m) => {
|
|
30
30
|
m.ctrlKey && m.key === "i" && (f.value = !f.value);
|
|
31
31
|
});
|
|
32
|
-
const e =
|
|
33
|
-
i.assetsRoot = O.assetsRoot ||
|
|
32
|
+
const e = Qe(), { $gisviewerAssetsRoot: l } = e.appContext.config.globalProperties, i = await (await fetch(O.config)).json();
|
|
33
|
+
i.assetsRoot = O.assetsRoot || l, H.mapConfig = i, u = new We(), o = await u.initialize({
|
|
34
34
|
container: d.value,
|
|
35
35
|
mapConfig: i,
|
|
36
|
-
markerClickCallback: (m, w, h,
|
|
37
|
-
y("markerClick", m, w, h,
|
|
36
|
+
markerClickCallback: (m, w, h, Ve) => {
|
|
37
|
+
y("markerClick", m, w, h, Ve);
|
|
38
38
|
},
|
|
39
39
|
mapClickCallback: (m, w, h) => {
|
|
40
40
|
y("mapClick", m, w, h);
|
|
41
41
|
}
|
|
42
|
-
}),
|
|
43
|
-
}),
|
|
44
|
-
|
|
42
|
+
}), n = new Je(o, v), await n.init(), y("mapLoaded");
|
|
43
|
+
}), je(() => {
|
|
44
|
+
a == null || a.clearSignalControlArea(), t == null || t.clearOpenDrive(), n.clearHoloTrace(), n.clearHoloSignal(), s == null || s.disconnectTrafficFlow();
|
|
45
45
|
});
|
|
46
|
-
const P =
|
|
46
|
+
const P = Ee(() => o), V = () => {
|
|
47
47
|
const e = b.useAppDataStore;
|
|
48
48
|
e.saveTrackLog = !0;
|
|
49
49
|
}, B = () => {
|
|
50
|
-
|
|
50
|
+
n.downloadTrackLog();
|
|
51
51
|
}, N = () => {
|
|
52
52
|
S("vehicleId");
|
|
53
53
|
}, z = () => {
|
|
54
54
|
S("plateNumber");
|
|
55
|
-
}, Q = async (e) => await
|
|
56
|
-
|
|
55
|
+
}, Q = async (e) => await u.setMapCenter(e), j = async (e) => await u.setMapCamera(e), E = async (e) => await u.lookAt(e), Z = (e) => u.setLayerVisibility(e), $ = (e, l) => u.requestCoordinateTransform(e, l), q = (e) => {
|
|
56
|
+
u.cancelCoordinateTransform(e);
|
|
57
57
|
}, K = (e) => {
|
|
58
|
-
|
|
59
|
-
}, U = (e) => (c || (c = new T(
|
|
58
|
+
u.setMapZoomRange(e);
|
|
59
|
+
}, U = (e) => (c || (c = new T(o)), c.showLaneNumber(e)), G = () => {
|
|
60
60
|
c == null || c.clearLaneNumber();
|
|
61
|
-
}, J = async (e) => (c || (c = new T(
|
|
62
|
-
}, X = async (e,
|
|
63
|
-
|
|
61
|
+
}, J = async (e) => (c || (c = new T(o)), await c.initializeSearch(e)), R = async () => c == null ? void 0 : c.calCrossIndicatorArea(), W = async () => {
|
|
62
|
+
}, X = async (e, l) => {
|
|
63
|
+
s || (s = new Ye(o)), s.connectTrafficFlow(e, l);
|
|
64
64
|
}, Y = () => {
|
|
65
|
-
|
|
65
|
+
s == null || s.disconnectTrafficFlow();
|
|
66
66
|
}, F = async (e) => {
|
|
67
|
-
|
|
67
|
+
n.handleVehicleTraceData(e);
|
|
68
68
|
}, ee = () => {
|
|
69
|
-
|
|
69
|
+
n.clearHoloTrace();
|
|
70
70
|
}, te = (e) => {
|
|
71
|
-
|
|
71
|
+
n.setInterpolate(e);
|
|
72
72
|
}, ae = async (e) => {
|
|
73
|
-
await
|
|
73
|
+
await n.handleSignalData(e);
|
|
74
74
|
}, ne = () => {
|
|
75
|
-
|
|
75
|
+
n.clearHoloSignal();
|
|
76
76
|
}, re = (e) => {
|
|
77
|
-
|
|
78
|
-
}, oe = (e) => {
|
|
79
|
-
a == null || a.togglePause(e);
|
|
77
|
+
s == null || s.toggleTrafficInfo(e), n == null || n.toggleTrafficInfo(e);
|
|
80
78
|
}, se = (e) => {
|
|
81
|
-
|
|
79
|
+
n == null || n.togglePause(e);
|
|
80
|
+
}, oe = (e) => {
|
|
81
|
+
s == null || s.toggleTrafficObject(e), n == null || n.toggleTrafficObject(e);
|
|
82
82
|
}, S = (e) => {
|
|
83
|
-
|
|
84
|
-
}, ie = async (e) => (
|
|
85
|
-
|
|
86
|
-
}, ue = (e) =>
|
|
87
|
-
|
|
83
|
+
n == null || n.updatePanelContent(e);
|
|
84
|
+
}, ie = async (e) => (r || (r = new L(o)), r.addOverlays(e)), ce = (e) => (r || (r = new L(o)), r.addMask(e)), le = () => {
|
|
85
|
+
r == null || r.removeMask();
|
|
86
|
+
}, ue = (e) => r == null ? void 0 : r.removeOverlaysByType(e), me = (e) => r == null ? void 0 : r.removeOverlaysById(e), pe = () => r == null ? void 0 : r.removeAllOverlays(), ge = () => {
|
|
87
|
+
r == null || r.showAllOverlays();
|
|
88
88
|
}, de = (e) => {
|
|
89
|
-
p || (p = new
|
|
89
|
+
p || (p = new Xe(o)), p.updateQueueLength(e);
|
|
90
90
|
}, fe = () => {
|
|
91
91
|
p == null || p.removeQueueLength();
|
|
92
|
-
}, Se = async (e,
|
|
92
|
+
}, Se = async (e, l) => (t || (t = new D(o)), await t.showOpenDriveFromServer(e, l)), ye = async (e) => (t || (t = new D(o)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), we = async () => await (t == null ? void 0 : t.clearOpenDrive()), he = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
|
|
93
93
|
status: -1,
|
|
94
94
|
message: "未加载OpenDrive地图"
|
|
95
|
-
},
|
|
95
|
+
}, Ce = async (e) => t ? t.selectSumo(e) : {
|
|
96
96
|
status: -1,
|
|
97
97
|
message: "未加载OpenDrive地图"
|
|
98
|
-
},
|
|
98
|
+
}, ve = async (e) => t ? t.unselectSumo(e) : {
|
|
99
99
|
status: -1,
|
|
100
100
|
message: "未加载OpenDrive地图"
|
|
101
101
|
}, Oe = async (e) => t ? await t.geometrySearch(e) : {
|
|
@@ -110,9 +110,12 @@ const Xe = { class: "gis-viewer" }, Ye = { style: { position: "absolute", bottom
|
|
|
110
110
|
}, be = async () => t ? t == null ? void 0 : t.clearSplitLane() : {
|
|
111
111
|
status: -1,
|
|
112
112
|
message: "未加载OpenDrive地图"
|
|
113
|
-
}, De = (e) => (
|
|
114
|
-
|
|
115
|
-
}, Te = async (e) =>
|
|
113
|
+
}, De = (e) => (a || (a = new I(o)), a.showSignalControlArea(e)), Le = () => {
|
|
114
|
+
a == null || a.clearSignalControlArea();
|
|
115
|
+
}, Te = async (e) => a ? await a.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, Ie = async (e) => a ? await a.highlightSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, Me = () => a ? a.resetHighlight() : { status: -1, message: "未加载信号控制区" }, _e = (e) => (a || (a = new I(o)), a.showSubSignalControlArea(e)), xe = (e, l) => a ? a.editSubSignalArea(
|
|
116
|
+
e,
|
|
117
|
+
l
|
|
118
|
+
) : { status: -1, message: "未加载信号控制区" }, He = (e) => a ? a.selectSubSignalControlAreaCross(e) : { status: -1, message: "未加载信号控制区" }, Pe = (e) => a ? a.unselectSubSignalControlAreaCross(e) : { status: -1, message: "未加载信号控制区" }, O = M, y = x;
|
|
116
119
|
return _({
|
|
117
120
|
mapViewer: P,
|
|
118
121
|
setLayerVisibility: Z,
|
|
@@ -142,9 +145,9 @@ const Xe = { class: "gis-viewer" }, Ye = { style: { position: "absolute", bottom
|
|
|
142
145
|
clearHoloSignal: ne,
|
|
143
146
|
setInterpolate: te,
|
|
144
147
|
toggleTrafficInfo: re,
|
|
145
|
-
toggleTrafficObject:
|
|
148
|
+
toggleTrafficObject: oe,
|
|
146
149
|
toggleVehicleInfo: S,
|
|
147
|
-
togglePause:
|
|
150
|
+
togglePause: se,
|
|
148
151
|
updateQueueLength: de,
|
|
149
152
|
removeQueueLength: fe,
|
|
150
153
|
showOpenDriveFromServer: Se,
|
|
@@ -152,8 +155,8 @@ const Xe = { class: "gis-viewer" }, Ye = { style: { position: "absolute", bottom
|
|
|
152
155
|
clearOpenDrive: we,
|
|
153
156
|
geometrySearchInOpenDrive: Oe,
|
|
154
157
|
findSumoInOpenDrive: he,
|
|
155
|
-
selectSumoInOpenDrive:
|
|
156
|
-
unselectSumoInOpenDrive:
|
|
158
|
+
selectSumoInOpenDrive: Ce,
|
|
159
|
+
unselectSumoInOpenDrive: ve,
|
|
157
160
|
getSumoInfo: ke,
|
|
158
161
|
splitOpenDriveLane: Ae,
|
|
159
162
|
clearSplitOpenDriveLane: be,
|
|
@@ -163,14 +166,16 @@ const Xe = { class: "gis-viewer" }, Ye = { style: { position: "absolute", bottom
|
|
|
163
166
|
highlightSignalControlArea: Ie,
|
|
164
167
|
resetHighlightSignalControlArea: Me,
|
|
165
168
|
showSubSignalControlArea: _e,
|
|
166
|
-
editSubSignalControlArea: xe
|
|
167
|
-
|
|
169
|
+
editSubSignalControlArea: xe,
|
|
170
|
+
selectSubSignalControlAreaCross: He,
|
|
171
|
+
unselectSubSignalControlAreaCross: Pe
|
|
172
|
+
}), (e, l) => (C(), A("div", Fe, [
|
|
168
173
|
g("div", {
|
|
169
174
|
class: "gis-viewer-main",
|
|
170
175
|
ref_key: "mapContainer",
|
|
171
176
|
ref: d
|
|
172
177
|
}, [
|
|
173
|
-
|
|
178
|
+
Ze(g("div", et, [
|
|
174
179
|
g("button", {
|
|
175
180
|
style: { "margin-right": "10px" },
|
|
176
181
|
onClick: V
|
|
@@ -185,10 +190,10 @@ const Xe = { class: "gis-viewer" }, Ye = { style: { position: "absolute", bottom
|
|
|
185
190
|
}, " 显示车辆id "),
|
|
186
191
|
g("button", { onClick: z }, "显示车辆号牌")
|
|
187
192
|
], 512), [
|
|
188
|
-
[
|
|
193
|
+
[$e, f.value]
|
|
189
194
|
])
|
|
190
195
|
], 512),
|
|
191
|
-
(
|
|
196
|
+
(C(!0), A(qe, null, Ke(v, (i, m) => (C(), Ue(Re, {
|
|
192
197
|
key: m,
|
|
193
198
|
"display-mode": i.displayMode,
|
|
194
199
|
"road-id": i.crossId,
|
|
@@ -204,5 +209,5 @@ const Xe = { class: "gis-viewer" }, Ye = { style: { position: "absolute", bottom
|
|
|
204
209
|
}
|
|
205
210
|
});
|
|
206
211
|
export {
|
|
207
|
-
|
|
212
|
+
gt as default
|
|
208
213
|
};
|
|
@@ -114,10 +114,17 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
114
114
|
}) => Promise<import("../types").IResult>;
|
|
115
115
|
resetHighlightSignalControlArea: () => import("../types").IResult;
|
|
116
116
|
showSubSignalControlArea: (params: any) => import("../types").IResult;
|
|
117
|
-
editSubSignalControlArea: (
|
|
117
|
+
editSubSignalControlArea: (addCrossCallback: (params: {
|
|
118
|
+
id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
}) => void, removeCrossCallback: (params: {
|
|
121
|
+
id: string;
|
|
122
|
+
}) => void) => Promise<import("../types").IResult> | {
|
|
118
123
|
status: number;
|
|
119
124
|
message: string;
|
|
120
125
|
};
|
|
126
|
+
selectSubSignalControlAreaCross: (id: string) => import("../types").IResult;
|
|
127
|
+
unselectSubSignalControlAreaCross: (id: string) => import("../types").IResult;
|
|
121
128
|
props: any;
|
|
122
129
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
123
130
|
SignalCountdownPanel: import("vue").DefineComponent<{
|
|
@@ -174,6 +181,7 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
174
181
|
rImage: import("vue").ComputedRef<string>;
|
|
175
182
|
rNumberStyle: import("vue").ComputedRef<any>;
|
|
176
183
|
getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
|
|
184
|
+
getNumberStyle: (color: string | undefined) => any;
|
|
177
185
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
178
186
|
displayMode: {
|
|
179
187
|
type: StringConstructor;
|
|
@@ -52,6 +52,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
52
52
|
rImage: import("vue").ComputedRef<string>;
|
|
53
53
|
rNumberStyle: import("vue").ComputedRef<any>;
|
|
54
54
|
getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
|
|
55
|
+
getNumberStyle: (color: string | undefined) => any;
|
|
55
56
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
56
57
|
displayMode: {
|
|
57
58
|
type: StringConstructor;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as f, computed as o, openBlock as n, createElementBlock as l, normalizeStyle as a, createElementVNode as s, toDisplayString as i, createCommentVNode as u } from "vue";
|
|
2
|
+
const N = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "signal-countdown-container"
|
|
5
|
-
},
|
|
5
|
+
}, I = ["src"], $ = {
|
|
6
6
|
key: 1,
|
|
7
7
|
class: "signal-countdown-container"
|
|
8
|
-
},
|
|
8
|
+
}, k = ["src"], V = {
|
|
9
9
|
key: 2,
|
|
10
10
|
class: "signal-countdown-container"
|
|
11
|
-
},
|
|
11
|
+
}, L = ["src"], x = {
|
|
12
12
|
key: 3,
|
|
13
13
|
class: "signal-countdown-container"
|
|
14
|
-
},
|
|
14
|
+
}, A = ["src"], B = /* @__PURE__ */ f({
|
|
15
15
|
__name: "signal-countdown-panel",
|
|
16
16
|
props: {
|
|
17
17
|
displayMode: {},
|
|
@@ -24,42 +24,22 @@ const b = {
|
|
|
24
24
|
rotation: {},
|
|
25
25
|
lampStatus: {}
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const t =
|
|
27
|
+
setup(p) {
|
|
28
|
+
const t = p, d = o(() => ({
|
|
29
29
|
top: `${t.position.top}px`,
|
|
30
30
|
left: `${t.position.left}px`,
|
|
31
31
|
"transform-origin": "bottom center",
|
|
32
32
|
transform: `translateX(-50%) translateY(-100%) rotate(${t.rotation}deg) scale(${t.scale})`
|
|
33
|
-
})),
|
|
33
|
+
})), g = o(
|
|
34
34
|
() => `/GisViewerAssets/Images/SignalLamp/u-${t.lampStatus.uColor}.png`
|
|
35
|
-
),
|
|
36
|
-
const o = {
|
|
37
|
-
color: i(t.lampStatus.uColor)
|
|
38
|
-
}, s = t.rotation < 0 ? t.rotation + 360 : t.rotation;
|
|
39
|
-
return s > 135 && s < 315 && (o.transform = "rotate(180deg)"), o;
|
|
40
|
-
}), S = n(
|
|
35
|
+
), S = o(() => r(t.lampStatus.uColor)), h = o(
|
|
41
36
|
() => `/GisViewerAssets/Images/SignalLamp/l-${t.lampStatus.lColor}.png`
|
|
42
|
-
),
|
|
43
|
-
const o = {
|
|
44
|
-
color: i(t.lampStatus.lColor)
|
|
45
|
-
}, s = t.rotation < 0 ? t.rotation + 360 : t.rotation;
|
|
46
|
-
return s > 135 && s < 315 && (o.transform = "rotate(180deg)"), o;
|
|
47
|
-
}), v = n(
|
|
37
|
+
), v = o(() => r(t.lampStatus.lColor)), w = o(
|
|
48
38
|
() => `/GisViewerAssets/Images/SignalLamp/s-${t.lampStatus.sColor}.png`
|
|
49
|
-
), y =
|
|
50
|
-
const o = {
|
|
51
|
-
color: i(t.lampStatus.sColor)
|
|
52
|
-
}, s = t.rotation < 0 ? t.rotation + 360 : t.rotation;
|
|
53
|
-
return s > 135 && s < 315 && (o.transform = "rotate(180deg)"), o;
|
|
54
|
-
}), w = n(
|
|
39
|
+
), y = o(() => r(t.lampStatus.sColor)), b = o(
|
|
55
40
|
() => `/GisViewerAssets/Images/SignalLamp/r-${t.lampStatus.rColor}.png`
|
|
56
|
-
),
|
|
57
|
-
|
|
58
|
-
color: i(t.lampStatus.rColor)
|
|
59
|
-
}, s = t.rotation < 0 ? t.rotation + 360 : t.rotation;
|
|
60
|
-
return s > 135 && s < 315 && (o.transform = "rotate(180deg)"), o;
|
|
61
|
-
}), i = (o) => {
|
|
62
|
-
switch (o) {
|
|
41
|
+
), C = o(() => r(t.lampStatus.rColor)), _ = (e) => {
|
|
42
|
+
switch (e) {
|
|
63
43
|
case "red":
|
|
64
44
|
return "red";
|
|
65
45
|
case "yellow":
|
|
@@ -69,66 +49,71 @@ const b = {
|
|
|
69
49
|
default:
|
|
70
50
|
return "white";
|
|
71
51
|
}
|
|
52
|
+
}, r = (e) => {
|
|
53
|
+
const c = {
|
|
54
|
+
color: _(e)
|
|
55
|
+
}, m = t.rotation < 0 ? t.rotation + 360 : t.rotation;
|
|
56
|
+
return m > 135 && m < 315 && (c.transform = "rotate(180deg)"), c;
|
|
72
57
|
};
|
|
73
|
-
return (
|
|
58
|
+
return (e, c) => (n(), l("div", {
|
|
74
59
|
class: "signal-countdown-panel",
|
|
75
|
-
style:
|
|
60
|
+
style: a(d.value)
|
|
76
61
|
}, [
|
|
77
|
-
|
|
78
|
-
|
|
62
|
+
e.lampStatus.uColor ? (n(), l("div", N, [
|
|
63
|
+
s("div", {
|
|
79
64
|
class: "signal-countdown-number",
|
|
80
|
-
style:
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
src:
|
|
65
|
+
style: a(S.value)
|
|
66
|
+
}, i(e.lampStatus.uNumber), 5),
|
|
67
|
+
s("div", null, [
|
|
68
|
+
s("img", {
|
|
69
|
+
src: g.value,
|
|
85
70
|
width: "20px",
|
|
86
71
|
height: "20px"
|
|
87
|
-
}, null, 8,
|
|
72
|
+
}, null, 8, I)
|
|
88
73
|
])
|
|
89
|
-
])) :
|
|
90
|
-
|
|
91
|
-
|
|
74
|
+
])) : u("", !0),
|
|
75
|
+
e.lampStatus.lColor ? (n(), l("div", $, [
|
|
76
|
+
s("div", {
|
|
92
77
|
class: "signal-countdown-number",
|
|
93
|
-
style:
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
src:
|
|
78
|
+
style: a(v.value)
|
|
79
|
+
}, i(e.lampStatus.lNumber), 5),
|
|
80
|
+
s("div", null, [
|
|
81
|
+
s("img", {
|
|
82
|
+
src: h.value,
|
|
98
83
|
width: "20px",
|
|
99
84
|
height: "20px"
|
|
100
|
-
}, null, 8,
|
|
85
|
+
}, null, 8, k)
|
|
101
86
|
])
|
|
102
|
-
])) :
|
|
103
|
-
|
|
104
|
-
|
|
87
|
+
])) : u("", !0),
|
|
88
|
+
e.lampStatus.sColor ? (n(), l("div", V, [
|
|
89
|
+
s("div", {
|
|
105
90
|
class: "signal-countdown-number",
|
|
106
|
-
style:
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
src:
|
|
91
|
+
style: a(y.value)
|
|
92
|
+
}, i(e.lampStatus.sNumber), 5),
|
|
93
|
+
s("div", null, [
|
|
94
|
+
s("img", {
|
|
95
|
+
src: w.value,
|
|
111
96
|
width: "20px",
|
|
112
97
|
height: "20px"
|
|
113
|
-
}, null, 8,
|
|
98
|
+
}, null, 8, L)
|
|
114
99
|
])
|
|
115
|
-
])) :
|
|
116
|
-
|
|
117
|
-
|
|
100
|
+
])) : u("", !0),
|
|
101
|
+
e.lampStatus.rColor !== void 0 ? (n(), l("div", x, [
|
|
102
|
+
s("div", {
|
|
118
103
|
class: "signal-countdown-number",
|
|
119
|
-
style:
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
src:
|
|
104
|
+
style: a(C.value)
|
|
105
|
+
}, i(e.lampStatus.rNumber), 5),
|
|
106
|
+
s("div", null, [
|
|
107
|
+
s("img", {
|
|
108
|
+
src: b.value,
|
|
124
109
|
width: "20px",
|
|
125
110
|
height: "20px"
|
|
126
|
-
}, null, 8,
|
|
111
|
+
}, null, 8, A)
|
|
127
112
|
])
|
|
128
|
-
])) :
|
|
113
|
+
])) : u("", !0)
|
|
129
114
|
], 4));
|
|
130
115
|
}
|
|
131
116
|
});
|
|
132
117
|
export {
|
|
133
|
-
|
|
118
|
+
B as default
|
|
134
119
|
};
|
|
@@ -371,7 +371,7 @@ class N {
|
|
|
371
371
|
});
|
|
372
372
|
}
|
|
373
373
|
deleteVehicle(e) {
|
|
374
|
-
this.disposeModel(e.model), this.scene.remove(e.model);
|
|
374
|
+
e.model.visible = !1, this.disposeModel(e.model), this.scene.remove(e.model);
|
|
375
375
|
const s = e.data.vehicleId;
|
|
376
376
|
this.vehicleObjectMap.delete(s), this.historyPositionMap.delete(s);
|
|
377
377
|
}
|
|
@@ -417,13 +417,11 @@ class N {
|
|
|
417
417
|
* */
|
|
418
418
|
disposeModel(e) {
|
|
419
419
|
e.traverse((s) => {
|
|
420
|
-
if (s instanceof a.Mesh)
|
|
421
|
-
s.geometry.dispose();
|
|
420
|
+
if (s instanceof a.Mesh)
|
|
422
421
|
try {
|
|
423
|
-
s.material.dispose();
|
|
422
|
+
s.geometry.dispose(), s.material.dispose();
|
|
424
423
|
} catch {
|
|
425
424
|
}
|
|
426
|
-
}
|
|
427
425
|
});
|
|
428
426
|
}
|
|
429
427
|
/**
|
|
@@ -326,15 +326,15 @@ class M {
|
|
|
326
326
|
var f, m;
|
|
327
327
|
this.openDriveClickCallback = e.selectedCallback, this.scaleWatch = $.watch(
|
|
328
328
|
() => this.view.scale,
|
|
329
|
-
(
|
|
330
|
-
|
|
329
|
+
(u, p) => {
|
|
330
|
+
u > this.junctionScale && p <= this.junctionScale ? this.updateAllJunctionSymbol("marker") : u <= this.junctionScale && p > this.junctionScale && this.updateAllJunctionSymbol("picture");
|
|
331
331
|
}
|
|
332
332
|
), console.time("md5用时");
|
|
333
333
|
const t = await this.makeMd5FromFile(e.file);
|
|
334
334
|
if (t.status !== 0)
|
|
335
335
|
return t;
|
|
336
336
|
if (this.projectName = t.result.md5, console.timeEnd("md5用时"), this.xodrBorder = t.result.border, this.xodrBorder.length > 0) {
|
|
337
|
-
const
|
|
337
|
+
const u = new g({
|
|
338
338
|
geometry: new L({
|
|
339
339
|
rings: [this.xodrBorder]
|
|
340
340
|
}),
|
|
@@ -348,7 +348,7 @@ class M {
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
});
|
|
351
|
-
|
|
351
|
+
this.borderLayer.add(u);
|
|
352
352
|
}
|
|
353
353
|
this.openDriveServer = e.server;
|
|
354
354
|
const s = `http://${this.openDriveServer}/api/openDrive/uploadXodr`;
|
|
@@ -364,8 +364,8 @@ class M {
|
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
);
|
|
367
|
-
} catch (
|
|
368
|
-
return { status: -1, message:
|
|
367
|
+
} catch (u) {
|
|
368
|
+
return { status: -1, message: u.message };
|
|
369
369
|
}
|
|
370
370
|
if (o.status !== 200)
|
|
371
371
|
return { status: -1, message: o.statusText };
|
|
@@ -386,12 +386,12 @@ class M {
|
|
|
386
386
|
);
|
|
387
387
|
const d = o.data.result.junctions;
|
|
388
388
|
this.showJunction(d), e.options && e.options.centerMap !== !1 && await this.view.goTo(this.allLaneGraphics), this.mouseMoveHandler || this.monitorMouseMove(), this.mouseClickHandler || this.monitorMouseClick();
|
|
389
|
-
const
|
|
389
|
+
const h = R.useAppDataStore;
|
|
390
390
|
return E(
|
|
391
|
-
() =>
|
|
391
|
+
() => h.isSketching,
|
|
392
392
|
() => {
|
|
393
|
-
var
|
|
394
|
-
|
|
393
|
+
var u, p;
|
|
394
|
+
h.isSketching ? ((u = this.mouseMoveHandler) == null || u.remove(), this.mouseMoveHandler = void 0, (p = this.mouseClickHandler) == null || p.remove(), this.mouseClickHandler = void 0) : (this.monitorMouseMove(), this.monitorMouseClick());
|
|
395
395
|
}
|
|
396
396
|
), console.timeEnd("渲染用时"), { status: 0, message: "ok" };
|
|
397
397
|
}
|
|
@@ -436,8 +436,8 @@ class M {
|
|
|
436
436
|
if (!t && n.junction !== "-1")
|
|
437
437
|
continue;
|
|
438
438
|
const { id: l, refLine: d } = n;
|
|
439
|
-
let
|
|
440
|
-
|
|
439
|
+
let h = n.name;
|
|
440
|
+
h.includes("(") && (h = h.slice(0, h.indexOf("("))), h = h.replace(/(.)/g, "$1 ");
|
|
441
441
|
const f = new g({
|
|
442
442
|
geometry: {
|
|
443
443
|
type: "polyline",
|
|
@@ -446,13 +446,13 @@ class M {
|
|
|
446
446
|
attributes: {
|
|
447
447
|
ObjectID: c++,
|
|
448
448
|
roadId: l,
|
|
449
|
-
roadName:
|
|
449
|
+
roadName: h
|
|
450
450
|
}
|
|
451
451
|
});
|
|
452
|
-
this.allRefLineGraphics.push(f), n.laneSections.sort((m,
|
|
452
|
+
this.allRefLineGraphics.push(f), n.laneSections.sort((m, u) => Number(m.id) - Number(u.id));
|
|
453
453
|
for (let m = 0; m < n.laneSections.length; m++) {
|
|
454
|
-
const
|
|
455
|
-
for (const y of
|
|
454
|
+
const u = n.laneSections[m], p = Number(u.id);
|
|
455
|
+
for (const y of u.lanePaths) {
|
|
456
456
|
const v = Number(y.id);
|
|
457
457
|
if (v === 0)
|
|
458
458
|
continue;
|
|
@@ -573,7 +573,7 @@ class M {
|
|
|
573
573
|
(p) => `${p.attributes.roadId}+${p.attributes.sectionId}` === r
|
|
574
574
|
), l = S.union(
|
|
575
575
|
n.map((p) => p.geometry)
|
|
576
|
-
), d = this.hitGraphic.getAttribute("fromNode"),
|
|
576
|
+
), d = this.hitGraphic.getAttribute("fromNode"), h = this.hitGraphic.getAttribute("toNode"), f = this.junctionNames.get(d) || d, m = this.junctionNames.get(h) || h, u = new g({
|
|
577
577
|
geometry: l,
|
|
578
578
|
symbol: {
|
|
579
579
|
type: "simple-fill",
|
|
@@ -615,7 +615,7 @@ class M {
|
|
|
615
615
|
]
|
|
616
616
|
}
|
|
617
617
|
});
|
|
618
|
-
this.highlightLayer.removeAll(), this.highlightLayer.add(
|
|
618
|
+
this.highlightLayer.removeAll(), this.highlightLayer.add(u);
|
|
619
619
|
} else if (i.layer.id === "OpenDriveJunction") {
|
|
620
620
|
const r = this.hitGraphic.getAttribute("id");
|
|
621
621
|
if (r === this.currentJunctionId)
|
|
@@ -985,7 +985,7 @@ class M {
|
|
|
985
985
|
type: "edge",
|
|
986
986
|
id: d
|
|
987
987
|
});
|
|
988
|
-
const
|
|
988
|
+
const h = `http://${this.openDriveServer}/api/sumo/getSumoEdge`, f = await b.get(h, {
|
|
989
989
|
params: {
|
|
990
990
|
id: `${n}+${a.getAttribute("sectionId")}`,
|
|
991
991
|
projectName: this.projectName
|
|
@@ -1036,9 +1036,9 @@ class M {
|
|
|
1036
1036
|
);
|
|
1037
1037
|
if (!l)
|
|
1038
1038
|
return { status: -1, message: "未找到车道" };
|
|
1039
|
-
const d = e.start || 0,
|
|
1039
|
+
const d = e.start || 0, h = e.end || 100, f = D.lineString(l.getAttribute("leftLine")), m = x(f, d, h, {
|
|
1040
1040
|
units: "meters"
|
|
1041
|
-
}),
|
|
1041
|
+
}), u = D.lineString(l.getAttribute("rightLine")), p = x(u, d, h, {
|
|
1042
1042
|
units: "meters"
|
|
1043
1043
|
}), y = m.geometry.coordinates.concat(
|
|
1044
1044
|
p.geometry.coordinates.reverse()
|