gisviewer-vue3-arcgis 1.0.196 → 1.0.197
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 +2 -1
- package/es/src/gis-map/gis-map.vue.mjs +142 -141
- package/es/src/gis-map/index.d.ts +1 -0
- package/es/src/gis-map/utils/green-wave-band-controller/index.d.ts +19 -5
- package/es/src/gis-map/utils/green-wave-band-controller/index.mjs +106 -52
- package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +2 -5
- package/es/src/types/index.d.ts +6 -4
- package/lib/src/gis-map/gis-map.vue.d.ts +2 -1
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +1 -0
- package/lib/src/gis-map/utils/green-wave-band-controller/index.d.ts +19 -5
- package/lib/src/gis-map/utils/green-wave-band-controller/index.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
- package/lib/src/types/index.d.ts +6 -4
- 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 { IEditSignalControlAreaParams, IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowOpenDriveFromFileParams, IShowSignalControlAreaParams, ISignalCountdownProps, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
|
|
3
|
+
import { IEditSignalControlAreaParams, IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowGreenWaveBandParams, IShowOpenDriveFromFileParams, IShowSignalControlAreaParams, ISignalCountdownProps, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
|
|
4
4
|
import GreenWaveBandController from './utils/green-wave-band-controller';
|
|
5
5
|
import HoloFlow from './utils/holo-flow';
|
|
6
6
|
import MapInitializer from './utils/map-initializer';
|
|
@@ -146,6 +146,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
146
146
|
status: number;
|
|
147
147
|
message: string;
|
|
148
148
|
} | undefined;
|
|
149
|
+
showGreenWaveBand: (params: IShowGreenWaveBandParams) => void;
|
|
149
150
|
props: any;
|
|
150
151
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
151
152
|
SignalCountdownPanel: import("vue").DefineComponent<{
|
|
@@ -1,208 +1,209 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import D, { registerStore as
|
|
1
|
+
import { defineComponent as je, ref as b, reactive as Ze, onMounted as $e, getCurrentInstance as qe, onUnmounted as Ke, computed as Ue, openBlock as h, createElementBlock as k, createElementVNode as d, withDirectives as Je, vShow as Re, Fragment as Xe, renderList as Ye, createBlock as Fe } from "vue";
|
|
2
|
+
import D, { registerStore as et } from "./stores/index.mjs";
|
|
3
3
|
import "./style/index.css";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import L from "./utils/green-wave-band-controller/index.mjs";
|
|
5
|
+
import tt from "./utils/holo-flow/index.mjs";
|
|
6
|
+
import nt from "./utils/holo-flow/signal-countdown-panel.vue.mjs";
|
|
7
7
|
import at from "./utils/map-initializer.mjs";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import T from "./utils/open-drive-renderer/index.mjs";
|
|
9
|
+
import B from "./utils/overlay.mjs";
|
|
10
|
+
import rt from "./utils/queue-length.mjs";
|
|
11
11
|
import I from "./utils/road-config-tool/index.mjs";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
const
|
|
12
|
+
import M from "./utils/signal-control-area-controller/index.mjs";
|
|
13
|
+
import st from "./utils/traffic-flow.mjs";
|
|
14
|
+
const ot = { class: "gis-viewer" }, it = { style: { position: "absolute", bottom: "80px", left: "10px", "z-index": "9999" } }, ht = /* @__PURE__ */ je({
|
|
15
15
|
__name: "gis-map",
|
|
16
16
|
props: {
|
|
17
17
|
config: {},
|
|
18
18
|
assetsRoot: {}
|
|
19
19
|
},
|
|
20
20
|
emits: ["mapLoaded", "markerClick", "mapClick"],
|
|
21
|
-
setup(
|
|
21
|
+
setup(_, { expose: x, emit: H }) {
|
|
22
22
|
const S = b(null);
|
|
23
|
-
let
|
|
23
|
+
let s, l, c, o, a, r, p, t, n, u;
|
|
24
24
|
const f = b(!1);
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
25
|
+
et();
|
|
26
|
+
const V = D.useAppDataStore, O = Ze([]);
|
|
27
|
+
$e(async () => {
|
|
28
28
|
if (!S.value)
|
|
29
29
|
return;
|
|
30
|
-
document.addEventListener("keydown", (
|
|
31
|
-
|
|
30
|
+
document.addEventListener("keydown", (g) => {
|
|
31
|
+
g.ctrlKey && g.key === "i" && (f.value = !f.value);
|
|
32
32
|
});
|
|
33
|
-
const e =
|
|
34
|
-
i.assetsRoot = A.assetsRoot ||
|
|
33
|
+
const e = qe(), { $gisviewerAssetsRoot: m } = e.appContext.config.globalProperties, i = await (await fetch(A.config)).json();
|
|
34
|
+
i.assetsRoot = A.assetsRoot || m, V.mapConfig = i, l = new at(), s = await l.initialize({
|
|
35
35
|
container: S.value,
|
|
36
36
|
mapConfig: i,
|
|
37
|
-
markerClickCallback: (
|
|
38
|
-
|
|
37
|
+
markerClickCallback: (g, w, y, Qe) => {
|
|
38
|
+
C("markerClick", g, w, y, Qe);
|
|
39
39
|
},
|
|
40
|
-
mapClickCallback: (
|
|
41
|
-
|
|
40
|
+
mapClickCallback: (g, w, y) => {
|
|
41
|
+
C("mapClick", g, w, y);
|
|
42
42
|
}
|
|
43
|
-
}),
|
|
44
|
-
}),
|
|
45
|
-
|
|
43
|
+
}), a = new tt(s, O), await a.init(), C("mapLoaded");
|
|
44
|
+
}), Ke(() => {
|
|
45
|
+
n == null || n.clearSignalControlArea(), t == null || t.clearOpenDrive(), a.clearHoloTrace(), a.clearHoloSignal(), o == null || o.disconnectTrafficFlow();
|
|
46
46
|
});
|
|
47
|
-
const
|
|
47
|
+
const P = Ue(() => s), W = () => {
|
|
48
48
|
const e = D.useAppDataStore;
|
|
49
49
|
e.saveTrackLog = !0;
|
|
50
|
+
}, G = () => {
|
|
51
|
+
a.downloadTrackLog();
|
|
50
52
|
}, N = () => {
|
|
51
|
-
|
|
53
|
+
v("vehicleId");
|
|
52
54
|
}, z = () => {
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
C("plateNumber");
|
|
56
|
-
}, E = async (e) => await l.setMapCenter(e), G = async (e) => await l.setMapCamera(e), Q = async (e) => await l.lookAt(e), j = (e) => l.setLayerVisibility(e), Z = (e, u) => l.requestCoordinateTransform(e, u), $ = (e) => {
|
|
55
|
+
v("plateNumber");
|
|
56
|
+
}, E = async (e) => await l.setMapCenter(e), Q = async (e) => await l.setMapCamera(e), j = async (e) => await l.lookAt(e), Z = (e) => l.setLayerVisibility(e), $ = (e, m) => l.requestCoordinateTransform(e, m), q = (e) => {
|
|
57
57
|
l.cancelCoordinateTransform(e);
|
|
58
|
-
},
|
|
58
|
+
}, K = (e) => {
|
|
59
59
|
l.setMapZoomRange(e);
|
|
60
|
-
},
|
|
60
|
+
}, U = (e) => (c || (c = new I(s)), c.showLaneNumber(e)), J = () => {
|
|
61
61
|
c == null || c.clearLaneNumber();
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
62
|
+
}, R = async (e) => (c || (c = new I(s)), await c.initializeSearch(e)), X = async () => c == null ? void 0 : c.calCrossIndicatorArea(), Y = async () => {
|
|
63
|
+
}, F = async (e, m) => {
|
|
64
|
+
o || (o = new st(s)), o.connectTrafficFlow(e, m);
|
|
65
|
+
}, ee = () => {
|
|
66
|
+
o == null || o.disconnectTrafficFlow();
|
|
67
|
+
}, te = async (e) => {
|
|
68
|
+
a.handleVehicleTraceData(e);
|
|
69
|
+
}, ne = () => {
|
|
70
|
+
a.clearHoloTrace();
|
|
71
71
|
}, ae = (e) => {
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
await
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
}, se = (e) => {
|
|
78
|
-
s == null || s.toggleTrafficInfo(e), n == null || n.toggleTrafficInfo(e);
|
|
72
|
+
a.setInterpolate(e);
|
|
73
|
+
}, re = async (e) => {
|
|
74
|
+
await a.handleSignalData(e);
|
|
75
|
+
}, se = () => {
|
|
76
|
+
a.clearHoloSignal();
|
|
79
77
|
}, oe = (e) => {
|
|
80
|
-
|
|
78
|
+
o == null || o.toggleTrafficInfo(e), a == null || a.toggleTrafficInfo(e);
|
|
81
79
|
}, ie = (e) => {
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
},
|
|
80
|
+
a == null || a.togglePause(e);
|
|
81
|
+
}, ce = (e) => {
|
|
82
|
+
o == null || o.toggleTrafficObject(e), a == null || a.toggleTrafficObject(e);
|
|
83
|
+
}, v = (e) => {
|
|
84
|
+
a == null || a.updatePanelContent(e);
|
|
85
|
+
}, le = async (e) => (r || (r = new B(s)), r.addOverlays(e)), ue = (e) => (r || (r = new B(s)), r.addMask(e)), me = () => {
|
|
86
86
|
r == null || r.removeMask();
|
|
87
|
-
},
|
|
87
|
+
}, ge = (e) => r == null ? void 0 : r.removeOverlaysByType(e), pe = (e) => r == null ? void 0 : r.removeOverlaysById(e), de = () => r == null ? void 0 : r.removeAllOverlays(), Se = () => {
|
|
88
88
|
r == null || r.showAllOverlays();
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
}, Ce = async (e,
|
|
89
|
+
}, fe = (e) => {
|
|
90
|
+
p || (p = new rt(s)), p.updateQueueLength(e);
|
|
91
|
+
}, ve = () => {
|
|
92
|
+
p == null || p.removeQueueLength();
|
|
93
|
+
}, Ce = async (e, m) => (t || (t = new T(s)), await t.showOpenDriveFromServer(e, m)), we = async (e) => (t || (t = new T(s)), await t.clearOpenDrive(), await t.showOpenDriveFromFile(e)), ye = async () => await (t == null ? void 0 : t.clearOpenDrive()), he = async (e) => t ? await (t == null ? void 0 : t.findSumo(e)) : {
|
|
94
94
|
status: -1,
|
|
95
95
|
message: "未加载OpenDrive地图"
|
|
96
|
-
},
|
|
96
|
+
}, Oe = async (e) => t ? t.selectSumo(e) : {
|
|
97
97
|
status: -1,
|
|
98
98
|
message: "未加载OpenDrive地图"
|
|
99
|
-
},
|
|
99
|
+
}, Ae = async (e) => t ? t.unselectSumo(e) : {
|
|
100
100
|
status: -1,
|
|
101
101
|
message: "未加载OpenDrive地图"
|
|
102
|
-
},
|
|
102
|
+
}, be = async (e) => t ? await t.geometrySearch(e) : {
|
|
103
103
|
status: -1,
|
|
104
104
|
message: "未加载OpenDrive地图"
|
|
105
|
-
},
|
|
105
|
+
}, ke = async (e) => t ? await t.getSumoInfo(e) : {
|
|
106
106
|
status: -1,
|
|
107
107
|
message: "未加载OpenDrive地图"
|
|
108
|
-
},
|
|
108
|
+
}, De = async (e) => t ? await (t == null ? void 0 : t.splitLane(e)) : {
|
|
109
109
|
status: -1,
|
|
110
110
|
message: "未加载OpenDrive地图"
|
|
111
|
-
},
|
|
111
|
+
}, Le = async () => t ? t == null ? void 0 : t.clearSplitLane() : {
|
|
112
112
|
status: -1,
|
|
113
113
|
message: "未加载OpenDrive地图"
|
|
114
|
-
},
|
|
115
|
-
|
|
116
|
-
}, Ie = async (e) =>
|
|
114
|
+
}, Te = (e) => (n || (n = new M(s)), n.showSignalControlArea(e)), Be = () => {
|
|
115
|
+
n == null || n.clearSignalControlArea();
|
|
116
|
+
}, Ie = async (e) => n ? await n.locateSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, Me = async (e) => n ? await n.highlightSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, _e = () => n ? n.resetHighlight() : { status: -1, message: "未加载信号控制区" }, xe = (e) => (n || (n = new M(s)), n.showSubSignalControlArea(e)), He = (e) => n ? n.editSubSignalControlArea(e) : { status: -1, message: "未加载信号控制区" }, Ve = () => n ? n.stopEditSubSignalControlArea() : { status: -1, message: "未加载信号控制区" }, Pe = (e) => n ? n.selectSubSignalControlAreaCross(e) : { status: -1, message: "未加载信号控制区" }, We = (e) => n ? n.unselectSubSignalControlAreaCross(e) : { status: -1, message: "未加载信号控制区" }, Ge = (e) => n ? n.changeSubSignalControlAreaBorderVisibility(
|
|
117
117
|
e
|
|
118
|
-
) : { status: -1, message: "未加载信号控制区" },
|
|
119
|
-
if (!
|
|
118
|
+
) : { status: -1, message: "未加载信号控制区" }, Ne = (e) => (u || (u = new L(s)), u.addGreenWaveBand(e)), ze = () => {
|
|
119
|
+
if (!u)
|
|
120
120
|
return { status: -1, message: "未加载绿波带" };
|
|
121
|
-
|
|
122
|
-
}, A =
|
|
123
|
-
return
|
|
124
|
-
mapViewer:
|
|
125
|
-
setLayerVisibility:
|
|
121
|
+
u.stopAddGreenWaveBand();
|
|
122
|
+
}, Ee = (e) => (u || (u = new L(s)), u.showGreenWaveBand(e)), A = _, C = H;
|
|
123
|
+
return x({
|
|
124
|
+
mapViewer: P,
|
|
125
|
+
setLayerVisibility: Z,
|
|
126
126
|
setMapCenter: E,
|
|
127
|
-
lookAt:
|
|
128
|
-
setMapCamera:
|
|
129
|
-
setMapZoomRange:
|
|
130
|
-
requestCoordinateTransform:
|
|
131
|
-
cancelCoordinateTransform:
|
|
132
|
-
addOverlays:
|
|
133
|
-
addMask:
|
|
134
|
-
removeMask:
|
|
135
|
-
showAllOverlays:
|
|
136
|
-
removeOverlaysByType:
|
|
137
|
-
removeOverlaysById:
|
|
138
|
-
removeAllOverlays:
|
|
139
|
-
showLaneNumber:
|
|
140
|
-
clearLaneNumber:
|
|
141
|
-
initializeAreaTool:
|
|
142
|
-
calCrossIndicatorArea:
|
|
143
|
-
calRoadIndicatorArea:
|
|
144
|
-
connectCarFlow:
|
|
145
|
-
disconnectCarFlow:
|
|
146
|
-
handleHoloVehicleTraceData:
|
|
147
|
-
clearHoloTrace:
|
|
148
|
-
handleHoloSignalData:
|
|
149
|
-
clearHoloSignal:
|
|
127
|
+
lookAt: j,
|
|
128
|
+
setMapCamera: Q,
|
|
129
|
+
setMapZoomRange: K,
|
|
130
|
+
requestCoordinateTransform: $,
|
|
131
|
+
cancelCoordinateTransform: q,
|
|
132
|
+
addOverlays: le,
|
|
133
|
+
addMask: ue,
|
|
134
|
+
removeMask: me,
|
|
135
|
+
showAllOverlays: Se,
|
|
136
|
+
removeOverlaysByType: ge,
|
|
137
|
+
removeOverlaysById: pe,
|
|
138
|
+
removeAllOverlays: de,
|
|
139
|
+
showLaneNumber: U,
|
|
140
|
+
clearLaneNumber: J,
|
|
141
|
+
initializeAreaTool: R,
|
|
142
|
+
calCrossIndicatorArea: X,
|
|
143
|
+
calRoadIndicatorArea: Y,
|
|
144
|
+
connectCarFlow: F,
|
|
145
|
+
disconnectCarFlow: ee,
|
|
146
|
+
handleHoloVehicleTraceData: te,
|
|
147
|
+
clearHoloTrace: ne,
|
|
148
|
+
handleHoloSignalData: re,
|
|
149
|
+
clearHoloSignal: se,
|
|
150
150
|
setInterpolate: ae,
|
|
151
|
-
toggleTrafficInfo:
|
|
152
|
-
toggleTrafficObject:
|
|
153
|
-
toggleVehicleInfo:
|
|
154
|
-
togglePause:
|
|
155
|
-
updateQueueLength:
|
|
156
|
-
removeQueueLength:
|
|
151
|
+
toggleTrafficInfo: oe,
|
|
152
|
+
toggleTrafficObject: ce,
|
|
153
|
+
toggleVehicleInfo: v,
|
|
154
|
+
togglePause: ie,
|
|
155
|
+
updateQueueLength: fe,
|
|
156
|
+
removeQueueLength: ve,
|
|
157
157
|
showOpenDriveFromServer: Ce,
|
|
158
|
-
showOpenDriveFromFile:
|
|
158
|
+
showOpenDriveFromFile: we,
|
|
159
159
|
clearOpenDrive: ye,
|
|
160
|
-
geometrySearchInOpenDrive:
|
|
161
|
-
findSumoInOpenDrive:
|
|
162
|
-
selectSumoInOpenDrive:
|
|
163
|
-
unselectSumoInOpenDrive:
|
|
164
|
-
getSumoInfo:
|
|
165
|
-
splitOpenDriveLane:
|
|
166
|
-
clearSplitOpenDriveLane:
|
|
167
|
-
showSignalControlArea:
|
|
168
|
-
clearSignalControlArea:
|
|
160
|
+
geometrySearchInOpenDrive: be,
|
|
161
|
+
findSumoInOpenDrive: he,
|
|
162
|
+
selectSumoInOpenDrive: Oe,
|
|
163
|
+
unselectSumoInOpenDrive: Ae,
|
|
164
|
+
getSumoInfo: ke,
|
|
165
|
+
splitOpenDriveLane: De,
|
|
166
|
+
clearSplitOpenDriveLane: Le,
|
|
167
|
+
showSignalControlArea: Te,
|
|
168
|
+
clearSignalControlArea: Be,
|
|
169
169
|
locateSignalControlArea: Ie,
|
|
170
|
-
highlightSignalControlArea:
|
|
171
|
-
resetHighlightSignalControlArea:
|
|
172
|
-
showSubSignalControlArea:
|
|
173
|
-
editSubSignalControlArea:
|
|
174
|
-
stopEditSubSignalControlArea:
|
|
175
|
-
selectSubSignalControlAreaCross:
|
|
176
|
-
unselectSubSignalControlAreaCross:
|
|
177
|
-
changeSubSignalControlAreaBorderVisibility:
|
|
178
|
-
addGreenWaveBand:
|
|
179
|
-
stopAddGreenWaveBand:
|
|
180
|
-
|
|
181
|
-
|
|
170
|
+
highlightSignalControlArea: Me,
|
|
171
|
+
resetHighlightSignalControlArea: _e,
|
|
172
|
+
showSubSignalControlArea: xe,
|
|
173
|
+
editSubSignalControlArea: He,
|
|
174
|
+
stopEditSubSignalControlArea: Ve,
|
|
175
|
+
selectSubSignalControlAreaCross: Pe,
|
|
176
|
+
unselectSubSignalControlAreaCross: We,
|
|
177
|
+
changeSubSignalControlAreaBorderVisibility: Ge,
|
|
178
|
+
addGreenWaveBand: Ne,
|
|
179
|
+
stopAddGreenWaveBand: ze,
|
|
180
|
+
showGreenWaveBand: Ee
|
|
181
|
+
}), (e, m) => (h(), k("div", ot, [
|
|
182
|
+
d("div", {
|
|
182
183
|
class: "gis-viewer-main",
|
|
183
184
|
ref_key: "mapContainer",
|
|
184
185
|
ref: S
|
|
185
186
|
}, [
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
Je(d("div", it, [
|
|
188
|
+
d("button", {
|
|
188
189
|
style: { "margin-right": "10px" },
|
|
189
|
-
onClick:
|
|
190
|
+
onClick: W
|
|
190
191
|
}, " 开始记录 "),
|
|
191
|
-
|
|
192
|
+
d("button", {
|
|
192
193
|
style: { "margin-right": "10px" },
|
|
193
|
-
onClick:
|
|
194
|
+
onClick: G
|
|
194
195
|
}, " 下载日志 "),
|
|
195
|
-
|
|
196
|
+
d("button", {
|
|
196
197
|
style: { "margin-right": "10px" },
|
|
197
|
-
onClick:
|
|
198
|
+
onClick: N
|
|
198
199
|
}, " 显示车辆id "),
|
|
199
|
-
|
|
200
|
+
d("button", { onClick: z }, "显示车辆号牌")
|
|
200
201
|
], 512), [
|
|
201
|
-
[
|
|
202
|
+
[Re, f.value]
|
|
202
203
|
])
|
|
203
204
|
], 512),
|
|
204
|
-
(h(!0), k(
|
|
205
|
-
key:
|
|
205
|
+
(h(!0), k(Xe, null, Ye(O, (i, g) => (h(), Fe(nt, {
|
|
206
|
+
key: g,
|
|
206
207
|
"display-mode": i.displayMode,
|
|
207
208
|
"road-id": i.crossId,
|
|
208
209
|
"cross-id": i.roadId,
|
|
@@ -217,5 +218,5 @@ const st = { class: "gis-viewer" }, ot = { style: { position: "absolute", bottom
|
|
|
217
218
|
}
|
|
218
219
|
});
|
|
219
220
|
export {
|
|
220
|
-
|
|
221
|
+
ht as default
|
|
221
222
|
};
|
|
@@ -134,6 +134,7 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
134
134
|
status: number;
|
|
135
135
|
message: string;
|
|
136
136
|
} | undefined;
|
|
137
|
+
showGreenWaveBand: (params: import("../types").IShowGreenWaveBandParams) => void;
|
|
137
138
|
props: any;
|
|
138
139
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
139
140
|
SignalCountdownPanel: import("vue").DefineComponent<{
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { IEditSignalControlAreaParams } from '../../../types';
|
|
1
|
+
import { IEditSignalControlAreaParams, IShowGreenWaveBandParams } from '../../../types';
|
|
2
2
|
export default class GreenWaveBandController {
|
|
3
3
|
private view;
|
|
4
|
+
/** 新增时显示路口的图层 */
|
|
4
5
|
private allNodesLayer;
|
|
6
|
+
/** 新增时显示路段的图层 */
|
|
5
7
|
private roadsectLayer;
|
|
8
|
+
/** 显示现有绿波带的图层 */
|
|
9
|
+
private bandLayer;
|
|
6
10
|
private viewClickWatcher?;
|
|
7
11
|
private openDriveServer;
|
|
8
12
|
private selectedNodeIds;
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
private
|
|
13
|
+
private scaleWatcher?;
|
|
14
|
+
private readonly nodeScale;
|
|
15
|
+
private addNodeCallback;
|
|
16
|
+
private removeNodeCallback;
|
|
17
|
+
private removeAllNodeCallback;
|
|
12
18
|
constructor(view: __esri.MapView | __esri.SceneView);
|
|
13
19
|
/**
|
|
14
20
|
* 新增绿波带
|
|
@@ -16,6 +22,7 @@ export default class GreenWaveBandController {
|
|
|
16
22
|
*/
|
|
17
23
|
addGreenWaveBand(params: IEditSignalControlAreaParams): void;
|
|
18
24
|
stopAddGreenWaveBand(): void;
|
|
25
|
+
showGreenWaveBand(params: IShowGreenWaveBandParams): void;
|
|
19
26
|
/**
|
|
20
27
|
* 显示所有路口,进入待选状态
|
|
21
28
|
* @param nodeAttributes
|
|
@@ -33,5 +40,12 @@ export default class GreenWaveBandController {
|
|
|
33
40
|
*/
|
|
34
41
|
private showDownstreamNodes;
|
|
35
42
|
private getLineSymbol;
|
|
36
|
-
private
|
|
43
|
+
private getShowNodeSymbol;
|
|
44
|
+
/**
|
|
45
|
+
* 编辑状态时的路口符号
|
|
46
|
+
* 全部用cim符号,是否选中用不同的图标
|
|
47
|
+
* @param selected 是否选中
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
private getEditableNodeSymbol;
|
|
37
51
|
}
|
|
@@ -1,46 +1,81 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as y from "@arcgis/core/core/reactiveUtils.js";
|
|
2
|
+
import { Polyline as m } from "@arcgis/core/geometry";
|
|
3
|
+
import c from "@arcgis/core/Graphic";
|
|
2
4
|
import n from "@arcgis/core/layers/GraphicsLayer";
|
|
3
|
-
import
|
|
4
|
-
class
|
|
5
|
+
import b from "axios";
|
|
6
|
+
class N {
|
|
5
7
|
constructor(e) {
|
|
6
|
-
this.selectedNodeIds = [], this.view = e, this.roadsectLayer = new n({
|
|
8
|
+
this.selectedNodeIds = [], this.nodeScale = 5e3, this.view = e, this.roadsectLayer = new n({
|
|
7
9
|
id: "roadsectLayer"
|
|
8
10
|
}), this.view.map.add(this.roadsectLayer), this.allNodesLayer = new n({
|
|
9
11
|
id: "allNodesLayer"
|
|
10
|
-
}), this.view.map.add(this.allNodesLayer)
|
|
12
|
+
}), this.view.map.add(this.allNodesLayer), this.bandLayer = new n({
|
|
13
|
+
id: "bandLayer"
|
|
14
|
+
}), this.view.map.add(this.bandLayer);
|
|
11
15
|
}
|
|
12
16
|
/**
|
|
13
17
|
* 新增绿波带
|
|
14
18
|
* @param params
|
|
15
19
|
*/
|
|
16
20
|
addGreenWaveBand(e) {
|
|
17
|
-
this.
|
|
18
|
-
this.handleViewClick(
|
|
21
|
+
this.addNodeCallback = e.addCrossCallback, this.removeNodeCallback = e.removeCrossCallback, e.removeAllCrossCallback && (this.removeAllNodeCallback = e.removeAllCrossCallback), this.selectedNodeIds = [], this.openDriveServer = e.odrServer, this.showAllNodes(e.crossesInArea), this.viewClickWatcher || (this.viewClickWatcher = this.view.on("click", (o) => {
|
|
22
|
+
this.handleViewClick(o);
|
|
19
23
|
}));
|
|
20
24
|
}
|
|
21
25
|
stopAddGreenWaveBand() {
|
|
22
26
|
var e;
|
|
23
|
-
(e = this.viewClickWatcher) == null || e.remove(), this.viewClickWatcher = void 0, this.allNodesLayer.removeAll(), this.selectedNodeIds = [], this.roadsectLayer.removeAll();
|
|
27
|
+
(e = this.viewClickWatcher) == null || e.remove(), this.viewClickWatcher = void 0, this.allNodesLayer.removeAll(), this.selectedNodeIds = [], this.roadsectLayer.removeAll(), this.bandLayer.removeAll();
|
|
28
|
+
}
|
|
29
|
+
showGreenWaveBand(e) {
|
|
30
|
+
this.scaleWatcher || (this.scaleWatcher = y.watch(
|
|
31
|
+
() => this.view.scale,
|
|
32
|
+
(s, i) => {
|
|
33
|
+
s > this.nodeScale && i <= this.nodeScale ? this.bandLayer.graphics.forEach((l) => {
|
|
34
|
+
l.geometry.type === "point" && (l.symbol = this.getShowNodeSymbol("marker"));
|
|
35
|
+
}) : s <= this.nodeScale && i > this.nodeScale && this.bandLayer.graphics.forEach((l) => {
|
|
36
|
+
l.geometry.type === "point" && (l.symbol = this.getShowNodeSymbol("picture"));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
));
|
|
40
|
+
const o = new m({
|
|
41
|
+
paths: [e.coordinates]
|
|
42
|
+
}), a = new c({
|
|
43
|
+
geometry: o,
|
|
44
|
+
symbol: this.getLineSymbol(!0),
|
|
45
|
+
attributes: { bandId: e.bandId }
|
|
46
|
+
});
|
|
47
|
+
this.roadsectLayer.add(a), this.view.goTo(a), e.nodeList.forEach((s) => {
|
|
48
|
+
const i = new c({
|
|
49
|
+
geometry: {
|
|
50
|
+
type: "point",
|
|
51
|
+
x: s.longitude,
|
|
52
|
+
y: s.latitude
|
|
53
|
+
},
|
|
54
|
+
symbol: this.getShowNodeSymbol("picture"),
|
|
55
|
+
attributes: s
|
|
56
|
+
});
|
|
57
|
+
this.bandLayer.add(i);
|
|
58
|
+
});
|
|
24
59
|
}
|
|
25
60
|
/**
|
|
26
61
|
* 显示所有路口,进入待选状态
|
|
27
62
|
* @param nodeAttributes
|
|
28
63
|
*/
|
|
29
64
|
showAllNodes(e) {
|
|
30
|
-
const
|
|
65
|
+
const o = [];
|
|
31
66
|
e.forEach((a) => {
|
|
32
|
-
|
|
33
|
-
new
|
|
67
|
+
o.push(
|
|
68
|
+
new c({
|
|
34
69
|
geometry: {
|
|
35
70
|
type: "point",
|
|
36
71
|
x: a.longitude,
|
|
37
72
|
y: a.latitude
|
|
38
73
|
},
|
|
39
|
-
symbol: this.
|
|
74
|
+
symbol: this.getEditableNodeSymbol(!1),
|
|
40
75
|
attributes: { ...a, selected: !1 }
|
|
41
76
|
})
|
|
42
77
|
);
|
|
43
|
-
}), this.allNodesLayer.addMany(
|
|
78
|
+
}), this.allNodesLayer.addMany(o);
|
|
44
79
|
}
|
|
45
80
|
/**
|
|
46
81
|
* 点击待选/已选路口
|
|
@@ -48,50 +83,51 @@ class C {
|
|
|
48
83
|
* @returns
|
|
49
84
|
*/
|
|
50
85
|
async handleViewClick(e) {
|
|
51
|
-
var
|
|
52
|
-
const a = (
|
|
86
|
+
var l;
|
|
87
|
+
const a = (l = (await this.view.hitTest(e, {
|
|
53
88
|
include: [this.allNodesLayer]
|
|
54
|
-
})).results) == null ? void 0 :
|
|
55
|
-
(
|
|
89
|
+
})).results) == null ? void 0 : l.filter(
|
|
90
|
+
(d) => d.type === "graphic"
|
|
56
91
|
);
|
|
57
92
|
if (a.length === 0)
|
|
58
93
|
return;
|
|
59
|
-
const
|
|
60
|
-
if (this.selectedNodeIds.includes(
|
|
61
|
-
const
|
|
62
|
-
if (
|
|
63
|
-
this.
|
|
64
|
-
t.setAttribute("selected", !1), t.symbol = this.
|
|
94
|
+
const s = a[0].graphic, i = s.getAttribute("id");
|
|
95
|
+
if (this.selectedNodeIds.includes(i)) {
|
|
96
|
+
const d = this.selectedNodeIds.indexOf(i) + 1;
|
|
97
|
+
if (d === 1)
|
|
98
|
+
this.removeAllNodeCallback && this.removeAllNodeCallback(), this.selectedNodeIds = [], this.allNodesLayer.graphics.forEach((t) => {
|
|
99
|
+
t.setAttribute("selected", !1), t.symbol = this.getEditableNodeSymbol(!1), t.visible = !0;
|
|
65
100
|
}), this.roadsectLayer.removeAll();
|
|
66
101
|
else {
|
|
67
|
-
for (let t =
|
|
68
|
-
this.
|
|
102
|
+
for (let t = d; t < this.selectedNodeIds.length; t++) {
|
|
103
|
+
this.removeNodeCallback && this.removeNodeCallback({
|
|
69
104
|
id: this.selectedNodeIds[t]
|
|
70
105
|
});
|
|
71
|
-
for (let
|
|
72
|
-
const
|
|
73
|
-
(
|
|
106
|
+
for (let r = 0; r < this.roadsectLayer.graphics.length; r++) {
|
|
107
|
+
const h = this.roadsectLayer.graphics.getItemAt(r);
|
|
108
|
+
(h.getAttribute("id") === this.selectedNodeIds[t] || !h.getAttribute("selected")) && (this.roadsectLayer.remove(h), r--);
|
|
74
109
|
}
|
|
75
110
|
}
|
|
76
|
-
this.selectedNodeIds = this.selectedNodeIds.slice(0,
|
|
77
|
-
const
|
|
111
|
+
this.selectedNodeIds = this.selectedNodeIds.slice(0, d), this.allNodesLayer.graphics.forEach((t) => {
|
|
112
|
+
const r = this.selectedNodeIds.includes(
|
|
78
113
|
t.getAttribute("id")
|
|
79
114
|
);
|
|
80
|
-
t.setAttribute("selected",
|
|
81
|
-
}), await this.showDownstreamNodes(
|
|
115
|
+
t.setAttribute("selected", r), t.symbol = this.getEditableNodeSymbol(r), t.visible = r;
|
|
116
|
+
}), await this.showDownstreamNodes(i);
|
|
82
117
|
}
|
|
83
118
|
} else {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
name: o.getAttribute("name")
|
|
87
|
-
}), o.symbol = this.getNodeSymbol(!0), this.selectedNodeIds.push(r), this.allNodesLayer.graphics.forEach((s) => {
|
|
88
|
-
s.visible = s.getAttribute("selected");
|
|
119
|
+
s.setAttribute("selected", !0), s.symbol = this.getEditableNodeSymbol(!0), this.selectedNodeIds.push(i), this.allNodesLayer.graphics.forEach((t) => {
|
|
120
|
+
t.visible = t.getAttribute("selected");
|
|
89
121
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
122
|
+
let d = [];
|
|
123
|
+
for (let t = 0; t < this.roadsectLayer.graphics.length; t++) {
|
|
124
|
+
const r = this.roadsectLayer.graphics.getItemAt(t);
|
|
125
|
+
r.getAttribute("id") === i ? (r.symbol = this.getLineSymbol(!0), r.setAttribute("selected", !0), d = r.geometry.paths[0]) : r.getAttribute("selected") || (this.roadsectLayer.remove(r), t--);
|
|
93
126
|
}
|
|
94
|
-
|
|
127
|
+
this.addNodeCallback && this.addNodeCallback({
|
|
128
|
+
...s.attributes,
|
|
129
|
+
roadsect: d
|
|
130
|
+
}), await this.showDownstreamNodes(i);
|
|
95
131
|
}
|
|
96
132
|
}
|
|
97
133
|
/**
|
|
@@ -100,26 +136,26 @@ class C {
|
|
|
100
136
|
*/
|
|
101
137
|
async showDownstreamNodes(e) {
|
|
102
138
|
this.view.container.style.cursor = "progress";
|
|
103
|
-
const
|
|
139
|
+
const o = await b.get(
|
|
104
140
|
`http://${this.openDriveServer}/api/computable/getDownstreamNodes`,
|
|
105
141
|
{ params: { nodeId: e } }
|
|
106
142
|
);
|
|
107
|
-
if (
|
|
143
|
+
if (o.status !== 200 || o.data.status !== 0) {
|
|
108
144
|
this.view.container.style.cursor = "default";
|
|
109
145
|
return;
|
|
110
146
|
}
|
|
111
|
-
|
|
112
|
-
this.allNodesLayer.graphics.forEach((
|
|
113
|
-
if (
|
|
114
|
-
const
|
|
147
|
+
o.data.result.forEach((s) => {
|
|
148
|
+
this.allNodesLayer.graphics.forEach((i) => {
|
|
149
|
+
if (i.getAttribute("nodeId") === s.id && i.getAttribute("selected") === !1 && (i.visible = !0, s.coordinates)) {
|
|
150
|
+
const l = new c({
|
|
115
151
|
geometry: {
|
|
116
152
|
type: "polyline",
|
|
117
|
-
paths: [
|
|
153
|
+
paths: [s.coordinates]
|
|
118
154
|
},
|
|
119
155
|
symbol: this.getLineSymbol(!1),
|
|
120
|
-
attributes: { ...
|
|
156
|
+
attributes: { ...s, selected: !1 }
|
|
121
157
|
});
|
|
122
|
-
this.roadsectLayer.add(
|
|
158
|
+
this.roadsectLayer.add(l);
|
|
123
159
|
}
|
|
124
160
|
});
|
|
125
161
|
}), this.view.container.style.cursor = "default";
|
|
@@ -194,7 +230,25 @@ class C {
|
|
|
194
230
|
width: 2
|
|
195
231
|
};
|
|
196
232
|
}
|
|
197
|
-
|
|
233
|
+
getShowNodeSymbol(e) {
|
|
234
|
+
return e === "marker" ? {
|
|
235
|
+
type: "simple-marker",
|
|
236
|
+
style: "circle",
|
|
237
|
+
color: [61, 139, 249],
|
|
238
|
+
size: 8,
|
|
239
|
+
outline: {
|
|
240
|
+
color: "white",
|
|
241
|
+
width: 1
|
|
242
|
+
}
|
|
243
|
+
} : this.getEditableNodeSymbol(!0);
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* 编辑状态时的路口符号
|
|
247
|
+
* 全部用cim符号,是否选中用不同的图标
|
|
248
|
+
* @param selected 是否选中
|
|
249
|
+
* @returns
|
|
250
|
+
*/
|
|
251
|
+
getEditableNodeSymbol(e) {
|
|
198
252
|
return {
|
|
199
253
|
type: "cim",
|
|
200
254
|
data: {
|
|
@@ -284,5 +338,5 @@ class C {
|
|
|
284
338
|
}
|
|
285
339
|
}
|
|
286
340
|
export {
|
|
287
|
-
|
|
341
|
+
N as default
|
|
288
342
|
};
|
|
@@ -98,7 +98,7 @@ class N {
|
|
|
98
98
|
).toArray().map((s) => s.clone()), i = this.crossLayer.graphics.filter(
|
|
99
99
|
(s) => s.getAttribute("id") === e.id || s.getAttribute("districtId") === e.id || s.getAttribute("subDistrictId") === e.id
|
|
100
100
|
).toArray().map((s) => s.clone());
|
|
101
|
-
if (
|
|
101
|
+
if (r.length > 0 && this.highlightLayer.addMany(r), i.length > 0 && this.highlightLayer.addMany(i), this.highlightLayer.graphics.length === 0)
|
|
102
102
|
return { status: 1, message: "未找到" };
|
|
103
103
|
if (t.length > 0)
|
|
104
104
|
await this.view.goTo(t);
|
|
@@ -151,10 +151,7 @@ class N {
|
|
|
151
151
|
const i = r[0].graphic;
|
|
152
152
|
i.getAttribute("selected") ? i.getAttribute("signalId") && (this.removeCrossCallback && this.removeCrossCallback({ id: i.getAttribute("id") }), i.setAttribute("selected", !1), i.symbol = this.getCrossSymbolInSubDistrict(
|
|
153
153
|
i.attributes
|
|
154
|
-
)) : (i.getAttribute("signalId") && (this.addCrossCallback && this.addCrossCallback(
|
|
155
|
-
id: i.getAttribute("id"),
|
|
156
|
-
name: i.getAttribute("name")
|
|
157
|
-
}), i.setAttribute("selected", !0), i.symbol = this.getCrossSymbolInSubDistrict(
|
|
154
|
+
)) : (i.getAttribute("signalId") && (this.addCrossCallback && this.addCrossCallback(i.attributes), i.setAttribute("selected", !0), i.symbol = this.getCrossSymbolInSubDistrict(
|
|
158
155
|
i.attributes
|
|
159
156
|
)), await this.showNearbyCrosses(i.getAttribute("id")));
|
|
160
157
|
}
|
package/es/src/types/index.d.ts
CHANGED
|
@@ -284,13 +284,15 @@ export interface INode {
|
|
|
284
284
|
}
|
|
285
285
|
export interface IEditSignalControlAreaParams {
|
|
286
286
|
crossesInArea: INode[];
|
|
287
|
-
addCrossCallback: (params:
|
|
288
|
-
id: string;
|
|
289
|
-
name: string;
|
|
290
|
-
}) => void;
|
|
287
|
+
addCrossCallback: (params: INode) => void;
|
|
291
288
|
removeCrossCallback: (params: {
|
|
292
289
|
id: string;
|
|
293
290
|
}) => void;
|
|
294
291
|
removeAllCrossCallback?: () => void;
|
|
295
292
|
odrServer: string;
|
|
296
293
|
}
|
|
294
|
+
export interface IShowGreenWaveBandParams {
|
|
295
|
+
bandId: string;
|
|
296
|
+
coordinates: number[][];
|
|
297
|
+
nodeList: INode[];
|
|
298
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import MapView from '@arcgis/core/views/MapView';
|
|
2
2
|
import SceneView from '@arcgis/core/views/SceneView';
|
|
3
|
-
import { IEditSignalControlAreaParams, IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowOpenDriveFromFileParams, IShowSignalControlAreaParams, ISignalCountdownProps, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
|
|
3
|
+
import { IEditSignalControlAreaParams, IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowGreenWaveBandParams, IShowOpenDriveFromFileParams, IShowSignalControlAreaParams, ISignalCountdownProps, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
|
|
4
4
|
import GreenWaveBandController from './utils/green-wave-band-controller';
|
|
5
5
|
import HoloFlow from './utils/holo-flow';
|
|
6
6
|
import MapInitializer from './utils/map-initializer';
|
|
@@ -146,6 +146,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
146
146
|
status: number;
|
|
147
147
|
message: string;
|
|
148
148
|
} | undefined;
|
|
149
|
+
showGreenWaveBand: (params: IShowGreenWaveBandParams) => void;
|
|
149
150
|
props: any;
|
|
150
151
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
151
152
|
SignalCountdownPanel: import("vue").DefineComponent<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),C=require("./stores/index.js");require("./style/index.css");const O=require("./utils/green-wave-band-controller/index.js"),We=require("./utils/holo-flow/index.js"),ze=require("./utils/holo-flow/signal-countdown-panel.vue.js"),Ge=require("./utils/map-initializer.js"),A=require("./utils/open-drive-renderer/index.js"),L=require("./utils/overlay.js"),je=require("./utils/queue-length.js"),D=require("./utils/road-config-tool/index.js"),T=require("./utils/signal-control-area-controller/index.js"),Qe=require("./utils/traffic-flow.js"),Ze={class:"gis-viewer"},Ke={style:{position:"absolute",bottom:"80px",left:"10px","z-index":"9999"}},Ue=a.defineComponent({__name:"gis-map",props:{config:{},assetsRoot:{}},emits:["mapLoaded","markerClick","mapClick"],setup(_,{expose:B,emit:x}){const f=a.ref(null);let o,u,l,i,r,s,p,t,n,d;const S=a.ref(!1);C.registerStore();const I=C.default.useAppDataStore,b=a.reactive([]);a.onMounted(async()=>{if(!f.value)return;document.addEventListener("keydown",m=>{m.ctrlKey&&m.key==="i"&&(S.value=!S.value)});const e=a.getCurrentInstance(),{$gisviewerAssetsRoot:g}=e.appContext.config.globalProperties,c=await(await fetch(k.config)).json();c.assetsRoot=k.assetsRoot||g,I.mapConfig=c,u=new Ge.default,o=await u.initialize({container:f.value,mapConfig:c,markerClickCallback:(m,y,h,Pe)=>{w("markerClick",m,y,h,Pe)},mapClickCallback:(m,y,h)=>{w("mapClick",m,y,h)}}),r=new We.default(o,b),await r.init(),w("mapLoaded")}),a.onUnmounted(()=>{n==null||n.clearSignalControlArea(),t==null||t.clearOpenDrive(),r.clearHoloTrace(),r.clearHoloSignal(),i==null||i.disconnectTrafficFlow()});const q=a.computed(()=>o),V=()=>{const e=C.default.useAppDataStore;e.saveTrackLog=!0},M=()=>{r.downloadTrackLog()},N=()=>{v("vehicleId")},E=()=>{v("plateNumber")},H=async e=>await u.setMapCenter(e),P=async e=>await u.setMapCamera(e),W=async e=>await u.lookAt(e),z=e=>u.setLayerVisibility(e),G=(e,g)=>u.requestCoordinateTransform(e,g),j=e=>{u.cancelCoordinateTransform(e)},Q=e=>{u.setMapZoomRange(e)},Z=e=>(l||(l=new D.default(o)),l.showLaneNumber(e)),K=()=>{l==null||l.clearLaneNumber()},U=async e=>(l||(l=new D.default(o)),await l.initializeSearch(e)),J=async()=>l==null?void 0:l.calCrossIndicatorArea(),X=async()=>{},Y=async(e,g)=>{i||(i=new Qe.default(o)),i.connectTrafficFlow(e,g)},F=()=>{i==null||i.disconnectTrafficFlow()},R=async e=>{r.handleVehicleTraceData(e)},$=()=>{r.clearHoloTrace()},ee=e=>{r.setInterpolate(e)},te=async e=>{await r.handleSignalData(e)},ne=()=>{r.clearHoloSignal()},ae=e=>{i==null||i.toggleTrafficInfo(e),r==null||r.toggleTrafficInfo(e)},re=e=>{r==null||r.togglePause(e)},se=e=>{i==null||i.toggleTrafficObject(e),r==null||r.toggleTrafficObject(e)},v=e=>{r==null||r.updatePanelContent(e)},oe=async e=>(s||(s=new L.default(o)),s.addOverlays(e)),ie=e=>(s||(s=new L.default(o)),s.addMask(e)),ce=()=>{s==null||s.removeMask()},le=e=>s==null?void 0:s.removeOverlaysByType(e),ue=e=>s==null?void 0:s.removeOverlaysById(e),de=()=>s==null?void 0:s.removeAllOverlays(),ge=()=>{s==null||s.showAllOverlays()},me=e=>{p||(p=new je.default(o)),p.updateQueueLength(e)},pe=()=>{p==null||p.removeQueueLength()},fe=async(e,g)=>(t||(t=new A.default(o)),await t.showOpenDriveFromServer(e,g)),Se=async e=>(t||(t=new A.default(o)),await t.clearOpenDrive(),await t.showOpenDriveFromFile(e)),ve=async()=>await(t==null?void 0:t.clearOpenDrive()),we=async e=>t?await(t==null?void 0:t.findSumo(e)):{status:-1,message:"未加载OpenDrive地图"},ye=async e=>t?t.selectSumo(e):{status:-1,message:"未加载OpenDrive地图"},he=async e=>t?t.unselectSumo(e):{status:-1,message:"未加载OpenDrive地图"},Ce=async e=>t?await t.geometrySearch(e):{status:-1,message:"未加载OpenDrive地图"},be=async e=>t?await t.getSumoInfo(e):{status:-1,message:"未加载OpenDrive地图"},ke=async e=>t?await(t==null?void 0:t.splitLane(e)):{status:-1,message:"未加载OpenDrive地图"},Oe=async()=>t?t==null?void 0:t.clearSplitLane():{status:-1,message:"未加载OpenDrive地图"},Ae=e=>(n||(n=new T.default(o)),n.showSignalControlArea(e)),Le=()=>{n==null||n.clearSignalControlArea()},De=async e=>n?await n.locateSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Te=async e=>n?await n.highlightSignalControlArea(e):{status:-1,message:"未加载信号控制区"},_e=()=>n?n.resetHighlight():{status:-1,message:"未加载信号控制区"},Be=e=>(n||(n=new T.default(o)),n.showSubSignalControlArea(e)),xe=e=>n?n.editSubSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Ie=()=>n?n.stopEditSubSignalControlArea():{status:-1,message:"未加载信号控制区"},qe=e=>n?n.selectSubSignalControlAreaCross(e):{status:-1,message:"未加载信号控制区"},Ve=e=>n?n.unselectSubSignalControlAreaCross(e):{status:-1,message:"未加载信号控制区"},Me=e=>n?n.changeSubSignalControlAreaBorderVisibility(e):{status:-1,message:"未加载信号控制区"},Ne=e=>(d||(d=new O.default(o)),d.addGreenWaveBand(e)),Ee=()=>{if(!d)return{status:-1,message:"未加载绿波带"};d.stopAddGreenWaveBand()},He=e=>(d||(d=new O.default(o)),d.showGreenWaveBand(e)),k=_,w=x;return B({mapViewer:q,setLayerVisibility:z,setMapCenter:H,lookAt:W,setMapCamera:P,setMapZoomRange:Q,requestCoordinateTransform:G,cancelCoordinateTransform:j,addOverlays:oe,addMask:ie,removeMask:ce,showAllOverlays:ge,removeOverlaysByType:le,removeOverlaysById:ue,removeAllOverlays:de,showLaneNumber:Z,clearLaneNumber:K,initializeAreaTool:U,calCrossIndicatorArea:J,calRoadIndicatorArea:X,connectCarFlow:Y,disconnectCarFlow:F,handleHoloVehicleTraceData:R,clearHoloTrace:$,handleHoloSignalData:te,clearHoloSignal:ne,setInterpolate:ee,toggleTrafficInfo:ae,toggleTrafficObject:se,toggleVehicleInfo:v,togglePause:re,updateQueueLength:me,removeQueueLength:pe,showOpenDriveFromServer:fe,showOpenDriveFromFile:Se,clearOpenDrive:ve,geometrySearchInOpenDrive:Ce,findSumoInOpenDrive:we,selectSumoInOpenDrive:ye,unselectSumoInOpenDrive:he,getSumoInfo:be,splitOpenDriveLane:ke,clearSplitOpenDriveLane:Oe,showSignalControlArea:Ae,clearSignalControlArea:Le,locateSignalControlArea:De,highlightSignalControlArea:Te,resetHighlightSignalControlArea:_e,showSubSignalControlArea:Be,editSubSignalControlArea:xe,stopEditSubSignalControlArea:Ie,selectSubSignalControlAreaCross:qe,unselectSubSignalControlAreaCross:Ve,changeSubSignalControlAreaBorderVisibility:Me,addGreenWaveBand:Ne,stopAddGreenWaveBand:Ee,showGreenWaveBand:He}),(e,g)=>(a.openBlock(),a.createElementBlock("div",Ze,[a.createElementVNode("div",{class:"gis-viewer-main",ref_key:"mapContainer",ref:f},[a.withDirectives(a.createElementVNode("div",Ke,[a.createElementVNode("button",{style:{"margin-right":"10px"},onClick:V}," 开始记录 "),a.createElementVNode("button",{style:{"margin-right":"10px"},onClick:M}," 下载日志 "),a.createElementVNode("button",{style:{"margin-right":"10px"},onClick:N}," 显示车辆id "),a.createElementVNode("button",{onClick:E},"显示车辆号牌")],512),[[a.vShow,S.value]])],512),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b,(c,m)=>(a.openBlock(),a.createBlock(ze.default,{key:m,"display-mode":c.displayMode,"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","road-id","cross-id","map-point","stop-line","position","rotation","scale","lamp-status"]))),128))]))}});exports.default=Ue;
|
|
@@ -134,6 +134,7 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
134
134
|
status: number;
|
|
135
135
|
message: string;
|
|
136
136
|
} | undefined;
|
|
137
|
+
showGreenWaveBand: (params: import("../types").IShowGreenWaveBandParams) => void;
|
|
137
138
|
props: any;
|
|
138
139
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
139
140
|
SignalCountdownPanel: import("vue").DefineComponent<{
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { IEditSignalControlAreaParams } from '../../../types';
|
|
1
|
+
import { IEditSignalControlAreaParams, IShowGreenWaveBandParams } from '../../../types';
|
|
2
2
|
export default class GreenWaveBandController {
|
|
3
3
|
private view;
|
|
4
|
+
/** 新增时显示路口的图层 */
|
|
4
5
|
private allNodesLayer;
|
|
6
|
+
/** 新增时显示路段的图层 */
|
|
5
7
|
private roadsectLayer;
|
|
8
|
+
/** 显示现有绿波带的图层 */
|
|
9
|
+
private bandLayer;
|
|
6
10
|
private viewClickWatcher?;
|
|
7
11
|
private openDriveServer;
|
|
8
12
|
private selectedNodeIds;
|
|
9
|
-
private
|
|
10
|
-
private
|
|
11
|
-
private
|
|
13
|
+
private scaleWatcher?;
|
|
14
|
+
private readonly nodeScale;
|
|
15
|
+
private addNodeCallback;
|
|
16
|
+
private removeNodeCallback;
|
|
17
|
+
private removeAllNodeCallback;
|
|
12
18
|
constructor(view: __esri.MapView | __esri.SceneView);
|
|
13
19
|
/**
|
|
14
20
|
* 新增绿波带
|
|
@@ -16,6 +22,7 @@ export default class GreenWaveBandController {
|
|
|
16
22
|
*/
|
|
17
23
|
addGreenWaveBand(params: IEditSignalControlAreaParams): void;
|
|
18
24
|
stopAddGreenWaveBand(): void;
|
|
25
|
+
showGreenWaveBand(params: IShowGreenWaveBandParams): void;
|
|
19
26
|
/**
|
|
20
27
|
* 显示所有路口,进入待选状态
|
|
21
28
|
* @param nodeAttributes
|
|
@@ -33,5 +40,12 @@ export default class GreenWaveBandController {
|
|
|
33
40
|
*/
|
|
34
41
|
private showDownstreamNodes;
|
|
35
42
|
private getLineSymbol;
|
|
36
|
-
private
|
|
43
|
+
private getShowNodeSymbol;
|
|
44
|
+
/**
|
|
45
|
+
* 编辑状态时的路口符号
|
|
46
|
+
* 全部用cim符号,是否选中用不同的图标
|
|
47
|
+
* @param selected 是否选中
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
private getEditableNodeSymbol;
|
|
37
51
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("@arcgis/core/Graphic"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("@arcgis/core/core/reactiveUtils.js"),b=require("@arcgis/core/geometry"),n=require("@arcgis/core/Graphic"),y=require("@arcgis/core/layers/GraphicsLayer"),u=require("axios");function p(c){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const s in c)if(s!=="default"){const a=Object.getOwnPropertyDescriptor(c,s);Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>c[s]})}}return e.default=c,Object.freeze(e)}const g=p(m);class f{constructor(e){this.selectedNodeIds=[],this.nodeScale=5e3,this.view=e,this.roadsectLayer=new y({id:"roadsectLayer"}),this.view.map.add(this.roadsectLayer),this.allNodesLayer=new y({id:"allNodesLayer"}),this.view.map.add(this.allNodesLayer),this.bandLayer=new y({id:"bandLayer"}),this.view.map.add(this.bandLayer)}addGreenWaveBand(e){this.addNodeCallback=e.addCrossCallback,this.removeNodeCallback=e.removeCrossCallback,e.removeAllCrossCallback&&(this.removeAllNodeCallback=e.removeAllCrossCallback),this.selectedNodeIds=[],this.openDriveServer=e.odrServer,this.showAllNodes(e.crossesInArea),this.viewClickWatcher||(this.viewClickWatcher=this.view.on("click",s=>{this.handleViewClick(s)}))}stopAddGreenWaveBand(){var e;(e=this.viewClickWatcher)==null||e.remove(),this.viewClickWatcher=void 0,this.allNodesLayer.removeAll(),this.selectedNodeIds=[],this.roadsectLayer.removeAll(),this.bandLayer.removeAll()}showGreenWaveBand(e){this.scaleWatcher||(this.scaleWatcher=g.watch(()=>this.view.scale,(i,r)=>{i>this.nodeScale&&r<=this.nodeScale?this.bandLayer.graphics.forEach(l=>{l.geometry.type==="point"&&(l.symbol=this.getShowNodeSymbol("marker"))}):i<=this.nodeScale&&r>this.nodeScale&&this.bandLayer.graphics.forEach(l=>{l.geometry.type==="point"&&(l.symbol=this.getShowNodeSymbol("picture"))})}));const s=new b.Polyline({paths:[e.coordinates]}),a=new n({geometry:s,symbol:this.getLineSymbol(!0),attributes:{bandId:e.bandId}});this.roadsectLayer.add(a),this.view.goTo(a),e.nodeList.forEach(i=>{const r=new n({geometry:{type:"point",x:i.longitude,y:i.latitude},symbol:this.getShowNodeSymbol("picture"),attributes:i});this.bandLayer.add(r)})}showAllNodes(e){const s=[];e.forEach(a=>{s.push(new n({geometry:{type:"point",x:a.longitude,y:a.latitude},symbol:this.getEditableNodeSymbol(!1),attributes:{...a,selected:!1}}))}),this.allNodesLayer.addMany(s)}async handleViewClick(e){var l;const a=(l=(await this.view.hitTest(e,{include:[this.allNodesLayer]})).results)==null?void 0:l.filter(d=>d.type==="graphic");if(a.length===0)return;const i=a[0].graphic,r=i.getAttribute("id");if(this.selectedNodeIds.includes(r)){const d=this.selectedNodeIds.indexOf(r)+1;if(d===1)this.removeAllNodeCallback&&this.removeAllNodeCallback(),this.selectedNodeIds=[],this.allNodesLayer.graphics.forEach(t=>{t.setAttribute("selected",!1),t.symbol=this.getEditableNodeSymbol(!1),t.visible=!0}),this.roadsectLayer.removeAll();else{for(let t=d;t<this.selectedNodeIds.length;t++){this.removeNodeCallback&&this.removeNodeCallback({id:this.selectedNodeIds[t]});for(let o=0;o<this.roadsectLayer.graphics.length;o++){const h=this.roadsectLayer.graphics.getItemAt(o);(h.getAttribute("id")===this.selectedNodeIds[t]||!h.getAttribute("selected"))&&(this.roadsectLayer.remove(h),o--)}}this.selectedNodeIds=this.selectedNodeIds.slice(0,d),this.allNodesLayer.graphics.forEach(t=>{const o=this.selectedNodeIds.includes(t.getAttribute("id"));t.setAttribute("selected",o),t.symbol=this.getEditableNodeSymbol(o),t.visible=o}),await this.showDownstreamNodes(r)}}else{i.setAttribute("selected",!0),i.symbol=this.getEditableNodeSymbol(!0),this.selectedNodeIds.push(r),this.allNodesLayer.graphics.forEach(t=>{t.visible=t.getAttribute("selected")});let d=[];for(let t=0;t<this.roadsectLayer.graphics.length;t++){const o=this.roadsectLayer.graphics.getItemAt(t);o.getAttribute("id")===r?(o.symbol=this.getLineSymbol(!0),o.setAttribute("selected",!0),d=o.geometry.paths[0]):o.getAttribute("selected")||(this.roadsectLayer.remove(o),t--)}this.addNodeCallback&&this.addNodeCallback({...i.attributes,roadsect:d}),await this.showDownstreamNodes(r)}}async showDownstreamNodes(e){this.view.container.style.cursor="progress";const s=await u.get(`http://${this.openDriveServer}/api/computable/getDownstreamNodes`,{params:{nodeId:e}});if(s.status!==200||s.data.status!==0){this.view.container.style.cursor="default";return}s.data.result.forEach(i=>{this.allNodesLayer.graphics.forEach(r=>{if(r.getAttribute("nodeId")===i.id&&r.getAttribute("selected")===!1&&(r.visible=!0,i.coordinates)){const l=new n({geometry:{type:"polyline",paths:[i.coordinates]},symbol:this.getLineSymbol(!1),attributes:{...i,selected:!1}});this.roadsectLayer.add(l)}})}),this.view.container.style.cursor="default"}getLineSymbol(e){return e?{type:"cim",data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,size:4,markerPlacement:{type:"CIMMarkerPlacementAlongLineSameSize",endings:"WithMarkers",placementTemplate:[40],angleToLine:!0},frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[4,-4],[12,0],[4,4]],[[-4,4],[-12,0],[-4,-4]]]},symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,width:1.5,color:[255,255,255,255]}]}}]},{type:"CIMSolidStroke",enable:!0,width:4,color:[55,125,34,255]}]}}}:{type:"simple-line",color:"gray",width:2}}getShowNodeSymbol(e){return e==="marker"?{type:"simple-marker",style:"circle",color:[61,139,249],size:8,outline:{color:"white",width:1}}:this.getEditableNodeSymbol(!0)}getEditableNodeSymbol(e){return{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:'Replace($feature.name, "与", "/") + " " + $feature.signalId',returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:30,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:12,horizontalAlignment:"Center",offsetX:0,offsetY:20,haloSize:2,haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},verticalAlignment:"Center"},textString:""}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:25,rotateClockwise:!0,textureFilter:"Picture",url:`/GisViewerAssets/Images/cross/${e?"gis_xhj_blue":"gis_xhj_gray"}.png`}]}}}}}exports.default=f;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("@arcgis/core/core/reactiveUtils.js"),c=require("@arcgis/core/Graphic"),y=require("@arcgis/core/layers/GraphicsLayer"),f=require("@turf/buffer"),d=require("@turf/convex"),C=require("@turf/helpers"),v=require("axios"),S=require("concaveman"),I=require("../../stores/index.js"),A=require("./district-controller.js");function m(l){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const t in l)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>l[t]})}}return e.default=l,Object.freeze(e)}const L=m(p),a=m(C);class w{constructor(e){var i;this.crossScale=5e3,this.crossIdsInDistrict=[],this.view=e;const r=I.default.useAppDataStore.mapConfig;this.openDriveServer=(i=r.openDriveServer)==null?void 0:i.url,this.districtControllerLayer=new y({id:"districtControllerLayer"}),this.subDistrictControllerLayer=new y({id:"subDistrictControllerLayer",visible:!1}),this.crossLayer=new y({id:"crossLayer",visible:!1}),this.highlightLayer=new y({id:"highlightLayer"}),this.view.map.addMany([this.districtControllerLayer,this.subDistrictControllerLayer,this.crossLayer,this.highlightLayer])}showSignalControlArea(e){this.districtControllerLayer.removeAll(),this.subDistrictControllerLayer.removeAll(),this.crossLayer.removeAll(),this.highlightLayer.removeAll(),this.subDistrictControllerLayer.visible=!1,this.crossLayer.visible=!1,this.districtControllerLayer.visible=!0;for(const t of e.areaList){const r=new A.default(t,e.style||"");this.drawArea(r,!0)}return this.scaleWatcher=L.watch(()=>this.view.scale,(t,r)=>{t>this.crossScale&&r<=this.crossScale?(this.crossLayer.graphics.forEach(i=>{i.symbol=this.getCrossGraphicSymbol(i.attributes,"marker")}),this.highlightLayer.graphics.forEach(i=>{i.getAttribute("type")==="cross"&&(i.symbol=this.getCrossGraphicSymbol(i.attributes,"marker"))})):t<=this.crossScale&&r>this.crossScale&&(this.crossLayer.graphics.forEach(i=>{i.symbol=this.getCrossGraphicSymbol(i.attributes,"picture")}),this.highlightLayer.graphics.forEach(i=>{i.getAttribute("type")==="cross"&&(i.symbol=this.getCrossGraphicSymbol(i.attributes,"picture"))}))}),{status:0,message:"ok"}}clearSignalControlArea(){var e,t;return this.districtControllerLayer.removeAll(),this.subDistrictControllerLayer.removeAll(),this.crossLayer.removeAll(),this.highlightLayer.removeAll(),(e=this.scaleWatcher)==null||e.remove(),this.scaleWatcher=void 0,(t=this.viewClickWatcher)==null||t.remove(),this.viewClickWatcher=void 0,this.view.closePopup(),{status:0,message:"ok"}}async locateSignalControlArea(e){const t=this.findAreaGraphic(e.id);return t?(t.attributes.type==="cross"?await this.view.goTo({target:t.geometry,scale:1500}):await this.view.goTo(t.geometry),{status:0,message:"ok"}):{status:1,message:"未找到"}}async highlightSignalControlArea(e){if(!e.id||e.id==="")return{status:1,message:"请输入id"};this.highlightLayer.removeAll(),this.districtControllerLayer.visible=!1;const t=this.districtControllerLayer.graphics.filter(s=>s.getAttribute("id")===e.id).toArray().map(s=>{const o=s.clone();return o.symbol.style="none",o}),r=this.subDistrictControllerLayer.graphics.filter(s=>s.getAttribute("id")===e.id||s.getAttribute("parentId")===e.id).toArray().map(s=>s.clone()),i=this.crossLayer.graphics.filter(s=>s.getAttribute("id")===e.id||s.getAttribute("districtId")===e.id||s.getAttribute("subDistrictId")===e.id).toArray().map(s=>s.clone());if(t.length>0&&this.highlightLayer.addMany(t),r.length>0&&this.highlightLayer.addMany(r),i.length>0&&this.highlightLayer.addMany(i),this.highlightLayer.graphics.length===0)return{status:1,message:"未找到"};if(t.length>0)await this.view.goTo(t);else if(r.length>0){const s=r[0].geometry.centroid;await this.view.goTo({target:s,scale:this.crossScale-500})}else i.length>1?await this.view.goTo(i):await this.view.goTo({target:i[0].geometry,scale:1500});return{status:0,message:"ok"}}resetHighlight(){return this.highlightLayer.removeAll(),this.view.closePopup(),this.districtControllerLayer.visible=!0,{status:0,message:"ok"}}showSubSignalControlArea(e){this.crossLayer.removeAll(),this.crossLayer.visible=!0;const r=e.children.map(i=>{const s={...i,selected:!0};return new c({geometry:{type:"point",x:i.longitude,y:i.latitude},symbol:this.getCrossSymbolInSubDistrict(s),attributes:s})});return this.crossLayer.addMany(r),this.view.goTo(r),{status:0,message:"ok"}}async handleViewClick(e){var s;const r=(s=(await this.view.hitTest(e,{include:[this.crossLayer]})).results)==null?void 0:s.filter(o=>o.type==="graphic");if(r.length===0)return;const i=r[0].graphic;i.getAttribute("selected")?i.getAttribute("signalId")&&(this.removeCrossCallback&&this.removeCrossCallback({id:i.getAttribute("id")}),i.setAttribute("selected",!1),i.symbol=this.getCrossSymbolInSubDistrict(i.attributes)):(i.getAttribute("signalId")&&(this.addCrossCallback&&this.addCrossCallback({id:i.getAttribute("id"),name:i.getAttribute("name")}),i.setAttribute("selected",!0),i.symbol=this.getCrossSymbolInSubDistrict(i.attributes)),await this.showNearbyCrosses(i.getAttribute("id")))}async showNearbyCrosses(e){const t=await v.get(`http://${this.openDriveServer}/api/computable/getRelatedNodesForNode`,{params:{nodeIds:e}});if(t.status===200)if(t.data.status===0){const r=t.data.result,i=[];for(const s of r){const o=s.nodeId;if(o.startsWith("-"))continue;if(s.signalId&&!this.crossIdsInDistrict.includes(o)){console.log("不是此区控内的路口",o);continue}if(this.crossLayer.graphics.some(h=>h.getAttribute("id")===o))continue;const g=new c({geometry:{type:"point",x:s.lon,y:s.lat},symbol:this.getCrossSymbolInSubDistrict(s),attributes:{id:o,name:s.name,signalId:s.signalId,selected:!1}});i.push(g)}return this.crossLayer.addMany(i),{status:0,message:"ok"}}else return{status:-1,message:t.data.message};else return{status:-1,message:"请求失败"}}async editSubSignalControlArea(e){if(e.odrServer){this.openDriveServer=e.odrServer,this.crossIdsInDistrict=e.crossesInArea.map(s=>s.id);const t=a.featureCollection(e.crossesInArea.map(s=>a.point([s.longitude,s.latitude]))),r=d(t);r&&(this.districtControllerLayer.removeAll(),this.districtControllerLayer.add(new c({geometry:{type:"polygon",rings:r.geometry.coordinates},symbol:{type:"simple-fill",style:"none",outline:{color:[61,139,249],width:3,style:"long-dash"}}}))),this.addCrossCallback=e.addCrossCallback,this.removeCrossCallback=e.removeCrossCallback,this.viewClickWatcher||(this.viewClickWatcher=this.view.on("click",async s=>{await this.handleViewClick(s)}));const i=this.crossLayer.graphics.toArray().map(s=>s.getAttribute("id")).join(",");return await this.showNearbyCrosses(i)}else return{status:1,message:"未配置OpenDriveServer"}}stopEditSubSignalControlArea(){var t;(t=this.viewClickWatcher)==null||t.remove(),this.viewClickWatcher=void 0;const e=this.crossLayer.graphics.filter(r=>r.getAttribute("signalId")===""||!r.getAttribute("signalId")||!r.getAttribute("selected"));this.crossLayer.removeMany(e.toArray())}selectSubSignalControlAreaCross(e){return this.crossLayer.graphics.forEach(t=>{if(t.getAttribute("id")===e&&!t.getAttribute("selected"))return t.setAttribute("selected",!0),t.symbol=this.getCrossSymbolInSubDistrict(t.attributes),{status:0,message:"ok"}}),{status:0,message:"未找到"}}unselectSubSignalControlAreaCross(e){return this.crossLayer.graphics.forEach(t=>{if(t.getAttribute("id")===e&&t.getAttribute("selected"))return t.setAttribute("selected",!1),t.symbol=this.getCrossSymbolInSubDistrict(t.attributes),{status:0,message:"ok"}}),{status:0,message:"未找到"}}changeSubSignalControlAreaBorderVisibility(e){this.highlightLayer.graphics.forEach(t=>{t.getAttribute("type")==="signalControlArea"&&(t.visible=e)})}findAreaGraphic(e){let t=this.districtControllerLayer.graphics.find(r=>r.attributes.id===e);return t||(t=this.subDistrictControllerLayer.graphics.find(r=>r.attributes.id===e)),t||(t=this.crossLayer.graphics.find(r=>r.attributes.id===e)),t}drawArea(e,t){const r=e.getAllCrossCoordinates();if(r.length>=2){let s=null;if(r.length===2)s=a.lineString(r);else{if(t){const u=a.featureCollection(r.map(b=>a.point(b)));s=d(u)}else{const u=S(r,.5);u.length>=4&&(s=a.polygon([u]))}s||(s=a.lineString(r))}const o=f(s.geometry,t?200:30,{units:"meters"});let n;t?n=[{fieldName:"id",label:"区控编号"},{fieldName:"crossCount",label:"路口数量"},{fieldName:"subDistrictCount",label:"子区数量"}]:n=[{fieldName:"parentName",label:"所属区控"},{fieldName:"crossCount",label:"路口数量"}];const g={type:"signalControlArea",id:e.id,name:e.name,parentId:e.parentId,parentName:e.parentName,crossCount:e.crossCount,subDistrictCount:e.subDistrictCount},h=new c({geometry:{type:"polygon",rings:o.geometry.coordinates},symbol:{type:"simple-fill",style:"none",color:[...e.areaColor,.3],outline:{color:e.areaColor,width:3,style:t?"long-dash":"solid"}},attributes:g,popupTemplate:{title:`${t?"区控":"子区"} ${e.name}`,content:[{type:"fields",fieldInfos:n}]}});t?this.districtControllerLayer.add(h):this.subDistrictControllerLayer.add(h)}for(const s of e.subDistricts)this.drawArea(s,!1);const i=[];e.crosses.forEach(s=>{const o={type:"cross",id:s.id,name:s.name,color:e.areaColor,signalId:s.signalId,nodeId:s.nodeId,districtId:t?e.id:e.parentId,districtName:t?e.name:e.parentName,subDistrictId:t?"":e.id,subDistrictName:t?"":e.name,isKey:s.isKey},n=new c({geometry:{type:"point",x:s.longitude,y:s.latitude},symbol:this.getCrossGraphicSymbol(o,"marker"),attributes:o,popupTemplate:{title:s.name,content:[{type:"fields",fieldInfos:[{fieldName:"districtName",label:"区控名称"},{fieldName:"subDistrictName",label:"子区名称"},{fieldName:"signalId",label:"信号机编号"},{fieldName:"nodeId",label:"路口编号"}]}]}});i.push(n)}),this.crossLayer.addMany(i)}getCrossSymbolInSubDistrict(e){return e.signalId&&e.signalId!==""?{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:'Replace($feature.name, "与", "/") + " " + $feature.signalId',returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:32,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:12,horizontalAlignment:"Center",offsetX:0,offsetY:20,haloSize:1,haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},verticalAlignment:"Center"},textString:""}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:30,rotateClockwise:!0,textureFilter:"Picture",url:`/GisViewerAssets/Images/cross/${e.selected?"gis_xhj_blue":"gis_xhj_gray"}.png`}]}}}:{type:"picture-marker",url:"/GisViewerAssets/Images/cross/gis_lkcz.png",width:"20px",height:"20px"}}getCrossGraphicSymbol(e,t){const{isKey:r,color:i}=e;if(t==="marker")return r?{type:"picture-marker",url:"/GisViewerAssets/Images/cross/gis_gjxklk_orange.png",width:"30px",height:"30px"}:{type:"simple-marker",style:"circle",color:i,size:8,outline:{color:"white",width:1}};if(t==="picture")return{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:'Replace($feature.name, "与", "/") + " " + $feature.signalId',returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:32,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:12,horizontalAlignment:"Center",offsetX:0,offsetY:r?30:15,haloSize:1,haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},verticalAlignment:"Center"},textString:""}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:r?40:20,rotateClockwise:!0,textureFilter:"Picture",url:`/GisViewerAssets/Images/cross/${r?"gis_gjxklk_orange":"gis_xhj_blue"}.png`}]}}}}}exports.default=w;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const p=require("@arcgis/core/core/reactiveUtils.js"),c=require("@arcgis/core/Graphic"),y=require("@arcgis/core/layers/GraphicsLayer"),f=require("@turf/buffer"),m=require("@turf/convex"),C=require("@turf/helpers"),v=require("axios"),S=require("concaveman"),I=require("../../stores/index.js"),A=require("./district-controller.js");function d(l){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const t in l)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(l,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>l[t]})}}return e.default=l,Object.freeze(e)}const L=d(p),a=d(C);class w{constructor(e){var r;this.crossScale=5e3,this.crossIdsInDistrict=[],this.view=e;const i=I.default.useAppDataStore.mapConfig;this.openDriveServer=(r=i.openDriveServer)==null?void 0:r.url,this.districtControllerLayer=new y({id:"districtControllerLayer"}),this.subDistrictControllerLayer=new y({id:"subDistrictControllerLayer",visible:!1}),this.crossLayer=new y({id:"crossLayer",visible:!1}),this.highlightLayer=new y({id:"highlightLayer"}),this.view.map.addMany([this.districtControllerLayer,this.subDistrictControllerLayer,this.crossLayer,this.highlightLayer])}showSignalControlArea(e){this.districtControllerLayer.removeAll(),this.subDistrictControllerLayer.removeAll(),this.crossLayer.removeAll(),this.highlightLayer.removeAll(),this.subDistrictControllerLayer.visible=!1,this.crossLayer.visible=!1,this.districtControllerLayer.visible=!0;for(const t of e.areaList){const i=new A.default(t,e.style||"");this.drawArea(i,!0)}return this.scaleWatcher=L.watch(()=>this.view.scale,(t,i)=>{t>this.crossScale&&i<=this.crossScale?(this.crossLayer.graphics.forEach(r=>{r.symbol=this.getCrossGraphicSymbol(r.attributes,"marker")}),this.highlightLayer.graphics.forEach(r=>{r.getAttribute("type")==="cross"&&(r.symbol=this.getCrossGraphicSymbol(r.attributes,"marker"))})):t<=this.crossScale&&i>this.crossScale&&(this.crossLayer.graphics.forEach(r=>{r.symbol=this.getCrossGraphicSymbol(r.attributes,"picture")}),this.highlightLayer.graphics.forEach(r=>{r.getAttribute("type")==="cross"&&(r.symbol=this.getCrossGraphicSymbol(r.attributes,"picture"))}))}),{status:0,message:"ok"}}clearSignalControlArea(){var e,t;return this.districtControllerLayer.removeAll(),this.subDistrictControllerLayer.removeAll(),this.crossLayer.removeAll(),this.highlightLayer.removeAll(),(e=this.scaleWatcher)==null||e.remove(),this.scaleWatcher=void 0,(t=this.viewClickWatcher)==null||t.remove(),this.viewClickWatcher=void 0,this.view.closePopup(),{status:0,message:"ok"}}async locateSignalControlArea(e){const t=this.findAreaGraphic(e.id);return t?(t.attributes.type==="cross"?await this.view.goTo({target:t.geometry,scale:1500}):await this.view.goTo(t.geometry),{status:0,message:"ok"}):{status:1,message:"未找到"}}async highlightSignalControlArea(e){if(!e.id||e.id==="")return{status:1,message:"请输入id"};this.highlightLayer.removeAll(),this.districtControllerLayer.visible=!1;const t=this.districtControllerLayer.graphics.filter(s=>s.getAttribute("id")===e.id).toArray().map(s=>{const o=s.clone();return o.symbol.style="none",o}),i=this.subDistrictControllerLayer.graphics.filter(s=>s.getAttribute("id")===e.id||s.getAttribute("parentId")===e.id).toArray().map(s=>s.clone()),r=this.crossLayer.graphics.filter(s=>s.getAttribute("id")===e.id||s.getAttribute("districtId")===e.id||s.getAttribute("subDistrictId")===e.id).toArray().map(s=>s.clone());if(i.length>0&&this.highlightLayer.addMany(i),r.length>0&&this.highlightLayer.addMany(r),this.highlightLayer.graphics.length===0)return{status:1,message:"未找到"};if(t.length>0)await this.view.goTo(t);else if(i.length>0){const s=i[0].geometry.centroid;await this.view.goTo({target:s,scale:this.crossScale-500})}else r.length>1?await this.view.goTo(r):await this.view.goTo({target:r[0].geometry,scale:1500});return{status:0,message:"ok"}}resetHighlight(){return this.highlightLayer.removeAll(),this.view.closePopup(),this.districtControllerLayer.visible=!0,{status:0,message:"ok"}}showSubSignalControlArea(e){this.crossLayer.removeAll(),this.crossLayer.visible=!0;const i=e.children.map(r=>{const s={...r,selected:!0};return new c({geometry:{type:"point",x:r.longitude,y:r.latitude},symbol:this.getCrossSymbolInSubDistrict(s),attributes:s})});return this.crossLayer.addMany(i),this.view.goTo(i),{status:0,message:"ok"}}async handleViewClick(e){var s;const i=(s=(await this.view.hitTest(e,{include:[this.crossLayer]})).results)==null?void 0:s.filter(o=>o.type==="graphic");if(i.length===0)return;const r=i[0].graphic;r.getAttribute("selected")?r.getAttribute("signalId")&&(this.removeCrossCallback&&this.removeCrossCallback({id:r.getAttribute("id")}),r.setAttribute("selected",!1),r.symbol=this.getCrossSymbolInSubDistrict(r.attributes)):(r.getAttribute("signalId")&&(this.addCrossCallback&&this.addCrossCallback(r.attributes),r.setAttribute("selected",!0),r.symbol=this.getCrossSymbolInSubDistrict(r.attributes)),await this.showNearbyCrosses(r.getAttribute("id")))}async showNearbyCrosses(e){const t=await v.get(`http://${this.openDriveServer}/api/computable/getRelatedNodesForNode`,{params:{nodeIds:e}});if(t.status===200)if(t.data.status===0){const i=t.data.result,r=[];for(const s of i){const o=s.nodeId;if(o.startsWith("-"))continue;if(s.signalId&&!this.crossIdsInDistrict.includes(o)){console.log("不是此区控内的路口",o);continue}if(this.crossLayer.graphics.some(h=>h.getAttribute("id")===o))continue;const g=new c({geometry:{type:"point",x:s.lon,y:s.lat},symbol:this.getCrossSymbolInSubDistrict(s),attributes:{id:o,name:s.name,signalId:s.signalId,selected:!1}});r.push(g)}return this.crossLayer.addMany(r),{status:0,message:"ok"}}else return{status:-1,message:t.data.message};else return{status:-1,message:"请求失败"}}async editSubSignalControlArea(e){if(e.odrServer){this.openDriveServer=e.odrServer,this.crossIdsInDistrict=e.crossesInArea.map(s=>s.id);const t=a.featureCollection(e.crossesInArea.map(s=>a.point([s.longitude,s.latitude]))),i=m(t);i&&(this.districtControllerLayer.removeAll(),this.districtControllerLayer.add(new c({geometry:{type:"polygon",rings:i.geometry.coordinates},symbol:{type:"simple-fill",style:"none",outline:{color:[61,139,249],width:3,style:"long-dash"}}}))),this.addCrossCallback=e.addCrossCallback,this.removeCrossCallback=e.removeCrossCallback,this.viewClickWatcher||(this.viewClickWatcher=this.view.on("click",async s=>{await this.handleViewClick(s)}));const r=this.crossLayer.graphics.toArray().map(s=>s.getAttribute("id")).join(",");return await this.showNearbyCrosses(r)}else return{status:1,message:"未配置OpenDriveServer"}}stopEditSubSignalControlArea(){var t;(t=this.viewClickWatcher)==null||t.remove(),this.viewClickWatcher=void 0;const e=this.crossLayer.graphics.filter(i=>i.getAttribute("signalId")===""||!i.getAttribute("signalId")||!i.getAttribute("selected"));this.crossLayer.removeMany(e.toArray())}selectSubSignalControlAreaCross(e){return this.crossLayer.graphics.forEach(t=>{if(t.getAttribute("id")===e&&!t.getAttribute("selected"))return t.setAttribute("selected",!0),t.symbol=this.getCrossSymbolInSubDistrict(t.attributes),{status:0,message:"ok"}}),{status:0,message:"未找到"}}unselectSubSignalControlAreaCross(e){return this.crossLayer.graphics.forEach(t=>{if(t.getAttribute("id")===e&&t.getAttribute("selected"))return t.setAttribute("selected",!1),t.symbol=this.getCrossSymbolInSubDistrict(t.attributes),{status:0,message:"ok"}}),{status:0,message:"未找到"}}changeSubSignalControlAreaBorderVisibility(e){this.highlightLayer.graphics.forEach(t=>{t.getAttribute("type")==="signalControlArea"&&(t.visible=e)})}findAreaGraphic(e){let t=this.districtControllerLayer.graphics.find(i=>i.attributes.id===e);return t||(t=this.subDistrictControllerLayer.graphics.find(i=>i.attributes.id===e)),t||(t=this.crossLayer.graphics.find(i=>i.attributes.id===e)),t}drawArea(e,t){const i=e.getAllCrossCoordinates();if(i.length>=2){let s=null;if(i.length===2)s=a.lineString(i);else{if(t){const u=a.featureCollection(i.map(b=>a.point(b)));s=m(u)}else{const u=S(i,.5);u.length>=4&&(s=a.polygon([u]))}s||(s=a.lineString(i))}const o=f(s.geometry,t?200:30,{units:"meters"});let n;t?n=[{fieldName:"id",label:"区控编号"},{fieldName:"crossCount",label:"路口数量"},{fieldName:"subDistrictCount",label:"子区数量"}]:n=[{fieldName:"parentName",label:"所属区控"},{fieldName:"crossCount",label:"路口数量"}];const g={type:"signalControlArea",id:e.id,name:e.name,parentId:e.parentId,parentName:e.parentName,crossCount:e.crossCount,subDistrictCount:e.subDistrictCount},h=new c({geometry:{type:"polygon",rings:o.geometry.coordinates},symbol:{type:"simple-fill",style:"none",color:[...e.areaColor,.3],outline:{color:e.areaColor,width:3,style:t?"long-dash":"solid"}},attributes:g,popupTemplate:{title:`${t?"区控":"子区"} ${e.name}`,content:[{type:"fields",fieldInfos:n}]}});t?this.districtControllerLayer.add(h):this.subDistrictControllerLayer.add(h)}for(const s of e.subDistricts)this.drawArea(s,!1);const r=[];e.crosses.forEach(s=>{const o={type:"cross",id:s.id,name:s.name,color:e.areaColor,signalId:s.signalId,nodeId:s.nodeId,districtId:t?e.id:e.parentId,districtName:t?e.name:e.parentName,subDistrictId:t?"":e.id,subDistrictName:t?"":e.name,isKey:s.isKey},n=new c({geometry:{type:"point",x:s.longitude,y:s.latitude},symbol:this.getCrossGraphicSymbol(o,"marker"),attributes:o,popupTemplate:{title:s.name,content:[{type:"fields",fieldInfos:[{fieldName:"districtName",label:"区控名称"},{fieldName:"subDistrictName",label:"子区名称"},{fieldName:"signalId",label:"信号机编号"},{fieldName:"nodeId",label:"路口编号"}]}]}});r.push(n)}),this.crossLayer.addMany(r)}getCrossSymbolInSubDistrict(e){return e.signalId&&e.signalId!==""?{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:'Replace($feature.name, "与", "/") + " " + $feature.signalId',returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:32,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:12,horizontalAlignment:"Center",offsetX:0,offsetY:20,haloSize:1,haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},verticalAlignment:"Center"},textString:""}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:30,rotateClockwise:!0,textureFilter:"Picture",url:`/GisViewerAssets/Images/cross/${e.selected?"gis_xhj_blue":"gis_xhj_gray"}.png`}]}}}:{type:"picture-marker",url:"/GisViewerAssets/Images/cross/gis_lkcz.png",width:"20px",height:"20px"}}getCrossGraphicSymbol(e,t){const{isKey:i,color:r}=e;if(t==="marker")return i?{type:"picture-marker",url:"/GisViewerAssets/Images/cross/gis_gjxklk_orange.png",width:"30px",height:"30px"}:{type:"simple-marker",style:"circle",color:r,size:8,outline:{color:"white",width:1}};if(t==="picture")return{type:"cim",data:{type:"CIMSymbolReference",primitiveOverrides:[{type:"CIMPrimitiveOverride",primitiveName:"textGraphic",propertyName:"TextString",valueExpressionInfo:{type:"CIMExpressionInfo",title:"Custom",expression:'Replace($feature.name, "与", "/") + " " + $feature.signalId',returnType:"Default"}}],symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",size:32,colorLocked:!0,anchorPointUnits:"Relative",frame:{xmin:-16,ymin:-16,xmax:16,ymax:16},markerGraphics:[{type:"CIMMarkerGraphic",primitiveName:"textGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",height:12,horizontalAlignment:"Center",offsetX:0,offsetY:i?30:15,haloSize:1,haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[0,0,0,255]}]},verticalAlignment:"Center"},textString:""}],scaleSymbolsProportionally:!0,respectFrame:!0},{type:"CIMPictureMarker",enable:!0,anchorPoint:{x:0,y:0},anchorPointUnits:"Relative",size:i?40:20,rotateClockwise:!0,textureFilter:"Picture",url:`/GisViewerAssets/Images/cross/${i?"gis_gjxklk_orange":"gis_xhj_blue"}.png`}]}}}}}exports.default=w;
|
package/lib/src/types/index.d.ts
CHANGED
|
@@ -284,13 +284,15 @@ export interface INode {
|
|
|
284
284
|
}
|
|
285
285
|
export interface IEditSignalControlAreaParams {
|
|
286
286
|
crossesInArea: INode[];
|
|
287
|
-
addCrossCallback: (params:
|
|
288
|
-
id: string;
|
|
289
|
-
name: string;
|
|
290
|
-
}) => void;
|
|
287
|
+
addCrossCallback: (params: INode) => void;
|
|
291
288
|
removeCrossCallback: (params: {
|
|
292
289
|
id: string;
|
|
293
290
|
}) => void;
|
|
294
291
|
removeAllCrossCallback?: () => void;
|
|
295
292
|
odrServer: string;
|
|
296
293
|
}
|
|
294
|
+
export interface IShowGreenWaveBandParams {
|
|
295
|
+
bandId: string;
|
|
296
|
+
coordinates: number[][];
|
|
297
|
+
nodeList: INode[];
|
|
298
|
+
}
|