gisviewer-vue3-arcgis 1.0.166 → 1.0.167
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 +11 -2
- package/es/src/gis-map/gis-map.vue.mjs +26 -23
- package/es/src/gis-map/index.d.ts +11 -2
- package/es/src/gis-map/utils/common-utils.mjs +9 -9
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +9 -1
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +1 -1
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.mjs +6 -5
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +1 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +103 -73
- package/es/src/gis-map/utils/map-initializer.d.ts +1 -0
- package/es/src/gis-map/utils/map-initializer.mjs +121 -122
- package/es/src/types/index.d.ts +1 -0
- package/es/style.css +1 -1
- package/lib/src/gis-map/gis-map.vue.d.ts +11 -2
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +11 -2
- package/lib/src/gis-map/utils/common-utils.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +9 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
- package/lib/src/gis-map/utils/map-initializer.d.ts +1 -0
- package/lib/src/gis-map/utils/map-initializer.js +1 -1
- package/lib/src/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
4
|
-
import { Polygon as
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import * as
|
|
15
|
-
import G from "../stores/index.mjs";
|
|
1
|
+
import C from "@arcgis/core/Basemap";
|
|
2
|
+
import d from "@arcgis/core/config";
|
|
3
|
+
import * as k from "@arcgis/core/core/reactiveUtils";
|
|
4
|
+
import { Polygon as W, Polyline as z, Point as T } from "@arcgis/core/geometry";
|
|
5
|
+
import * as w from "@arcgis/core/geometry/support/webMercatorUtils";
|
|
6
|
+
import L from "@arcgis/core/layers/GeoJSONLayer";
|
|
7
|
+
import x from "@arcgis/core/layers/MapImageLayer";
|
|
8
|
+
import I from "@arcgis/core/layers/TileLayer";
|
|
9
|
+
import R from "@arcgis/core/layers/WebTileLayer";
|
|
10
|
+
import H from "@arcgis/core/Map";
|
|
11
|
+
import G from "@arcgis/core/views/MapView";
|
|
12
|
+
import O from "@arcgis/core/views/SceneView";
|
|
13
|
+
import S from "@turf/destination";
|
|
14
|
+
import * as B from "@turf/helpers";
|
|
16
15
|
import N from "./custom-layer/custom-wmts-layer.mjs";
|
|
17
|
-
function
|
|
16
|
+
function P(h, e) {
|
|
18
17
|
return h && (h.startsWith("http://") || h.startsWith("https://") ? h : e + h);
|
|
19
18
|
}
|
|
20
19
|
class Z {
|
|
@@ -27,25 +26,25 @@ class Z {
|
|
|
27
26
|
* @returns view
|
|
28
27
|
*/
|
|
29
28
|
async initialize(e) {
|
|
30
|
-
|
|
31
|
-
this.mapConfig =
|
|
32
|
-
const { container:
|
|
33
|
-
|
|
34
|
-
const n = new
|
|
35
|
-
if ((
|
|
29
|
+
var p, u, b, v;
|
|
30
|
+
this.mapConfig = e.mapConfig;
|
|
31
|
+
const { container: t, markerClickCallback: s, mapClickCallback: a } = e;
|
|
32
|
+
d.assetsPath = `${this.mapConfig.assetsRoot}/ArcgisAssets`, d.fontsUrl = `${this.mapConfig.assetsRoot}/fonts`, d.apiKey = "AAPKf5a3e1044d7a4faeb3b1ec7060f5c68equIrP2KbRyL-t_b40Kk4GTWUQ1BFCyttvyQPQnWpFmBd7kp9gkrVihjfmcKBwxjW";
|
|
33
|
+
const n = new H();
|
|
34
|
+
if (((p = this.mapConfig) == null ? void 0 : p.mapOptions.mode.toLowerCase()) === "2d" ? this.view = new G({
|
|
36
35
|
map: n,
|
|
37
|
-
container:
|
|
38
|
-
...
|
|
39
|
-
}) : this.view = new
|
|
36
|
+
container: t,
|
|
37
|
+
...this.mapConfig.mapOptions
|
|
38
|
+
}) : this.view = new O({
|
|
40
39
|
map: n,
|
|
41
|
-
container:
|
|
40
|
+
container: t,
|
|
42
41
|
environment: {
|
|
43
42
|
atmosphereEnabled: !0,
|
|
44
43
|
lighting: {
|
|
45
44
|
type: "virtual"
|
|
46
45
|
}
|
|
47
46
|
},
|
|
48
|
-
...
|
|
47
|
+
...(u = this.mapConfig) == null ? void 0 : u.mapOptions
|
|
49
48
|
}), this.view.popup.visibleElements = {
|
|
50
49
|
closeButton: !0,
|
|
51
50
|
collapseButton: !1,
|
|
@@ -54,35 +53,35 @@ class Z {
|
|
|
54
53
|
}, this.view.popup.dockOptions = {
|
|
55
54
|
buttonEnabled: !1,
|
|
56
55
|
breakpoint: !1
|
|
57
|
-
}, this.view.on("click", async (
|
|
58
|
-
var
|
|
59
|
-
if (
|
|
60
|
-
let o =
|
|
61
|
-
o.spatialReference.isWebMercator && (o =
|
|
56
|
+
}, this.view.on("click", async (i) => {
|
|
57
|
+
var y, M;
|
|
58
|
+
if (a) {
|
|
59
|
+
let o = i.mapPoint;
|
|
60
|
+
o.spatialReference.isWebMercator && (o = w.webMercatorToGeographic(
|
|
62
61
|
o
|
|
63
|
-
)),
|
|
62
|
+
)), a(
|
|
64
63
|
[o.x, o.y],
|
|
65
|
-
[
|
|
66
|
-
|
|
64
|
+
[i.screenPoint.x, i.screenPoint.y],
|
|
65
|
+
i
|
|
67
66
|
);
|
|
68
67
|
}
|
|
69
68
|
if (this.view.type === "3d") {
|
|
70
69
|
const o = this.view.camera;
|
|
71
70
|
if (this.view.spatialReference.isWebMercator) {
|
|
72
|
-
const
|
|
71
|
+
const m = w.webMercatorToGeographic(
|
|
73
72
|
o.position
|
|
74
|
-
),
|
|
73
|
+
), f = {
|
|
75
74
|
heading: o.heading,
|
|
76
75
|
tilt: o.tilt,
|
|
77
|
-
position:
|
|
76
|
+
position: m.toJSON()
|
|
78
77
|
};
|
|
79
|
-
console.log(
|
|
78
|
+
console.log(f), (y = navigator.clipboard) == null || y.writeText(JSON.stringify(f));
|
|
80
79
|
} else
|
|
81
80
|
console.log(o.toJSON());
|
|
82
81
|
console.log(this.view.zoom, this.view.scale);
|
|
83
82
|
} else {
|
|
84
83
|
let o = this.view.center;
|
|
85
|
-
this.view.spatialReference.isWebMercator && (o =
|
|
84
|
+
this.view.spatialReference.isWebMercator && (o = w.webMercatorToGeographic(
|
|
86
85
|
o
|
|
87
86
|
)), console.log({
|
|
88
87
|
center: o.toJSON(),
|
|
@@ -90,101 +89,101 @@ class Z {
|
|
|
90
89
|
scale: this.view.scale
|
|
91
90
|
});
|
|
92
91
|
}
|
|
93
|
-
const r = (
|
|
92
|
+
const r = (M = (await this.view.hitTest(i)).results) == null ? void 0 : M.filter(
|
|
94
93
|
(o) => o.type === "graphic"
|
|
95
94
|
);
|
|
96
95
|
r.length > 0 && r.forEach((o) => {
|
|
97
|
-
var
|
|
98
|
-
const
|
|
99
|
-
(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
var f;
|
|
97
|
+
const m = o.graphic;
|
|
98
|
+
(f = m.attributes) != null && f.type && s && s(
|
|
99
|
+
m.attributes.type,
|
|
100
|
+
m.attributes.id,
|
|
101
|
+
m.attributes,
|
|
102
|
+
i
|
|
104
103
|
);
|
|
105
104
|
});
|
|
106
|
-
}),
|
|
107
|
-
const
|
|
108
|
-
switch (
|
|
105
|
+
}), (b = this.mapConfig) != null && b.baseLayers ? this.mapConfig.baseLayers.forEach((i) => {
|
|
106
|
+
const c = P(i.url, this.mapConfig.assetsRoot);
|
|
107
|
+
switch (i.type.toLowerCase()) {
|
|
109
108
|
case "webTile".toLowerCase(): {
|
|
110
|
-
const r = new
|
|
111
|
-
urlTemplate:
|
|
112
|
-
...
|
|
109
|
+
const r = new R({
|
|
110
|
+
urlTemplate: c,
|
|
111
|
+
...i.options
|
|
113
112
|
});
|
|
114
113
|
n.add(r);
|
|
115
114
|
break;
|
|
116
115
|
}
|
|
117
116
|
case "tile": {
|
|
118
|
-
const r = new
|
|
119
|
-
url:
|
|
120
|
-
...
|
|
117
|
+
const r = new I({
|
|
118
|
+
url: c,
|
|
119
|
+
...i.options
|
|
121
120
|
});
|
|
122
121
|
n.add(r);
|
|
123
122
|
break;
|
|
124
123
|
}
|
|
125
124
|
case "customWMTS".toLowerCase(): {
|
|
126
125
|
const r = new N({
|
|
127
|
-
urlTemplate:
|
|
128
|
-
...
|
|
126
|
+
urlTemplate: c,
|
|
127
|
+
...i.options
|
|
129
128
|
});
|
|
130
129
|
n.add(r);
|
|
131
130
|
break;
|
|
132
131
|
}
|
|
133
132
|
case "mapImage".toLowerCase(): {
|
|
134
|
-
const r = new
|
|
135
|
-
url:
|
|
136
|
-
...
|
|
133
|
+
const r = new x({
|
|
134
|
+
url: c,
|
|
135
|
+
...i.options
|
|
137
136
|
});
|
|
138
|
-
n.add(r)
|
|
137
|
+
n.add(r);
|
|
139
138
|
break;
|
|
140
139
|
}
|
|
141
140
|
case "arcgis": {
|
|
142
|
-
const r = new
|
|
141
|
+
const r = new C(i.options);
|
|
143
142
|
n.basemap = r;
|
|
144
143
|
break;
|
|
145
144
|
}
|
|
146
145
|
}
|
|
147
|
-
})
|
|
146
|
+
}) : n.basemap = new C({
|
|
148
147
|
style: {
|
|
149
148
|
id: "arcgis/light-gray",
|
|
150
149
|
language: "zh-CN"
|
|
151
150
|
}
|
|
152
|
-
}),
|
|
153
|
-
const
|
|
154
|
-
(
|
|
151
|
+
}), (v = this.mapConfig) != null && v.hdLayers) {
|
|
152
|
+
const i = this.mapConfig.hdLayers.map(
|
|
153
|
+
(c) => (
|
|
155
154
|
// 图层文件为GeoJson格式, renderer和symbol使用autocast配置
|
|
156
|
-
new
|
|
157
|
-
url:
|
|
158
|
-
...
|
|
159
|
-
title:
|
|
155
|
+
new L({
|
|
156
|
+
url: P(c.url, this.mapConfig.assetsRoot),
|
|
157
|
+
...c.options,
|
|
158
|
+
title: c.options.id
|
|
160
159
|
})
|
|
161
160
|
)
|
|
162
161
|
);
|
|
163
|
-
n.addMany(
|
|
162
|
+
n.addMany(i);
|
|
164
163
|
}
|
|
165
|
-
this.view.ui.remove("attribution"),
|
|
166
|
-
const
|
|
167
|
-
let
|
|
164
|
+
this.view.ui.remove("attribution"), await this.view.when();
|
|
165
|
+
const g = this.mapConfig.camera;
|
|
166
|
+
let l;
|
|
168
167
|
if (this.view.type === "2d") {
|
|
169
|
-
let
|
|
170
|
-
this.view.spatialReference.isWebMercator && (
|
|
171
|
-
|
|
172
|
-
)),
|
|
168
|
+
let i = this.view.center;
|
|
169
|
+
this.view.spatialReference.isWebMercator && (i = w.webMercatorToGeographic(
|
|
170
|
+
i
|
|
171
|
+
)), l = { center: [i.x, i.y], zoom: this.view.zoom };
|
|
173
172
|
} else {
|
|
174
|
-
let
|
|
175
|
-
this.view.spatialReference.isWebMercator && (
|
|
176
|
-
|
|
177
|
-
)),
|
|
178
|
-
position:
|
|
173
|
+
let i = this.view.camera.position;
|
|
174
|
+
this.view.spatialReference.isWebMercator && (i = w.webMercatorToGeographic(
|
|
175
|
+
i
|
|
176
|
+
)), l = {
|
|
177
|
+
position: i,
|
|
179
178
|
heading: this.view.camera.heading,
|
|
180
179
|
tilt: this.view.camera.tilt
|
|
181
180
|
};
|
|
182
181
|
}
|
|
183
|
-
return
|
|
182
|
+
return g ? g.home = l : this.mapConfig.camera = { home: l }, this.view;
|
|
184
183
|
}
|
|
185
184
|
setLayerVisibility(e) {
|
|
186
|
-
const { id:
|
|
187
|
-
return a ? (a.visible =
|
|
185
|
+
const { id: t, visible: s } = e, a = this.view.map.findLayerById(t);
|
|
186
|
+
return a ? (a.visible = s, { status: 0, message: "ok" }) : { status: -1, message: "未找到图层" };
|
|
188
187
|
}
|
|
189
188
|
/**
|
|
190
189
|
* 设置地图中心点
|
|
@@ -192,19 +191,19 @@ class Z {
|
|
|
192
191
|
* @returns
|
|
193
192
|
*/
|
|
194
193
|
async setMapCenter(e) {
|
|
195
|
-
var
|
|
194
|
+
var t;
|
|
196
195
|
if (!this.view)
|
|
197
196
|
return { status: -1, message: "未初始化" };
|
|
198
197
|
if (e.center || e.target) {
|
|
199
|
-
switch ((
|
|
198
|
+
switch ((t = e.target) == null ? void 0 : t.type) {
|
|
200
199
|
case "point":
|
|
201
|
-
e.target = new
|
|
200
|
+
e.target = new T(e.target);
|
|
202
201
|
break;
|
|
203
202
|
case "polyline":
|
|
204
|
-
e.target = new
|
|
203
|
+
e.target = new z(e.target);
|
|
205
204
|
break;
|
|
206
205
|
case "polygon":
|
|
207
|
-
e.target = new
|
|
206
|
+
e.target = new W(e.target);
|
|
208
207
|
break;
|
|
209
208
|
}
|
|
210
209
|
await this.view.goTo(e, { duration: (e.duration || 0) * 1e3 });
|
|
@@ -217,8 +216,8 @@ class Z {
|
|
|
217
216
|
async lookAt(e) {
|
|
218
217
|
if (this.view.type === "2d")
|
|
219
218
|
return;
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
219
|
+
const t = e.tilt || 0, s = e.heading || 0;
|
|
220
|
+
if (t === 0)
|
|
222
221
|
await this.view.goTo(
|
|
223
222
|
{
|
|
224
223
|
position: {
|
|
@@ -226,16 +225,16 @@ class Z {
|
|
|
226
225
|
y: e.center[1],
|
|
227
226
|
z: e.height
|
|
228
227
|
},
|
|
229
|
-
heading:
|
|
228
|
+
heading: s,
|
|
230
229
|
tilt: 0
|
|
231
230
|
},
|
|
232
231
|
{ duration: (e.duration || 2) * 1e3 }
|
|
233
232
|
);
|
|
234
233
|
else {
|
|
235
|
-
const a = Math.tan(
|
|
236
|
-
|
|
234
|
+
const a = Math.tan(t * Math.PI / 180) * e.height, n = S(
|
|
235
|
+
B.point(e.center),
|
|
237
236
|
a,
|
|
238
|
-
|
|
237
|
+
s + 180,
|
|
239
238
|
{
|
|
240
239
|
units: "meters"
|
|
241
240
|
}
|
|
@@ -243,12 +242,12 @@ class Z {
|
|
|
243
242
|
await this.view.goTo(
|
|
244
243
|
{
|
|
245
244
|
position: {
|
|
246
|
-
x:
|
|
247
|
-
y:
|
|
245
|
+
x: n.geometry.coordinates[0],
|
|
246
|
+
y: n.geometry.coordinates[1],
|
|
248
247
|
z: e.height
|
|
249
248
|
},
|
|
250
|
-
heading:
|
|
251
|
-
tilt:
|
|
249
|
+
heading: s,
|
|
250
|
+
tilt: t
|
|
252
251
|
},
|
|
253
252
|
{ duration: (e.duration || 2) * 1e3 }
|
|
254
253
|
);
|
|
@@ -257,32 +256,32 @@ class Z {
|
|
|
257
256
|
async setMapCamera(e) {
|
|
258
257
|
if (!this.view)
|
|
259
258
|
return { status: -1, message: "未初始化" };
|
|
260
|
-
const { name:
|
|
259
|
+
const { name: t, duration: s = 0 } = e, { camera: a } = this.mapConfig;
|
|
261
260
|
if (!a)
|
|
262
261
|
return { status: -1, message: "未配置camera" };
|
|
263
|
-
const
|
|
264
|
-
return
|
|
262
|
+
const n = a[t];
|
|
263
|
+
return n ? (await this.view.goTo(n, { duration: s * 1e3 }), { status: 0, message: "成功" }) : { status: -1, message: "未配置camera" };
|
|
265
264
|
}
|
|
266
265
|
/**
|
|
267
266
|
* 经纬度转像素坐标,在地图移动时回调
|
|
268
267
|
* */
|
|
269
|
-
requestCoordinateTransform(e,
|
|
270
|
-
let
|
|
271
|
-
const
|
|
268
|
+
requestCoordinateTransform(e, t) {
|
|
269
|
+
let s = 0;
|
|
270
|
+
const n = 1e3 / 30, g = k.watch(
|
|
272
271
|
() => this.view.center,
|
|
273
272
|
() => {
|
|
274
|
-
const
|
|
275
|
-
|
|
273
|
+
const l = this.transformPoints(e), p = Date.now();
|
|
274
|
+
p - s > n && (t(l), s = p);
|
|
276
275
|
}
|
|
277
276
|
);
|
|
278
|
-
return this.handleIndex++, this.watchHandleMap.set(this.handleIndex,
|
|
277
|
+
return this.handleIndex++, this.watchHandleMap.set(this.handleIndex, g), { handle: this.handleIndex, points: this.transformPoints(e) };
|
|
279
278
|
}
|
|
280
279
|
transformPoints(e) {
|
|
281
|
-
return e.map((
|
|
282
|
-
const
|
|
283
|
-
x:
|
|
284
|
-
y:
|
|
285
|
-
}), a = this.view.toScreen(
|
|
280
|
+
return e.map((t) => {
|
|
281
|
+
const s = new T({
|
|
282
|
+
x: t[0],
|
|
283
|
+
y: t[1]
|
|
284
|
+
}), a = this.view.toScreen(s);
|
|
286
285
|
return [a.x, a.y];
|
|
287
286
|
});
|
|
288
287
|
}
|
|
@@ -290,18 +289,18 @@ class Z {
|
|
|
290
289
|
* 停止坐标转换回调
|
|
291
290
|
* */
|
|
292
291
|
cancelCoordinateTransform(e) {
|
|
293
|
-
const
|
|
294
|
-
|
|
292
|
+
const t = this.watchHandleMap.get(e);
|
|
293
|
+
t && (t.remove(), this.watchHandleMap.delete(e));
|
|
295
294
|
}
|
|
296
295
|
/**
|
|
297
296
|
* 设置地图zoom范围
|
|
298
297
|
* */
|
|
299
298
|
setMapZoomRange(e) {
|
|
300
|
-
const { min:
|
|
301
|
-
!
|
|
299
|
+
const { min: t, max: s } = e;
|
|
300
|
+
!t && !s || (this.zoomWatchHandle && this.zoomWatchHandle.remove(), this.zoomWatchHandle = k.watch(
|
|
302
301
|
() => this.view.zoom,
|
|
303
302
|
(a) => {
|
|
304
|
-
|
|
303
|
+
t && a <= t && (this.view.zoom = t), s && a >= s && (this.view.zoom = s);
|
|
305
304
|
}
|
|
306
305
|
));
|
|
307
306
|
}
|
package/es/src/types/index.d.ts
CHANGED
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gis-viewer{overflow:auto;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar{display:none}}.signal-countdown-panel[data-v-
|
|
1
|
+
.gis-viewer{overflow:auto;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar{display:none}}.signal-countdown-panel[data-v-d749c855]{position:absolute;display:flex;flex-direction:row;padding:0;margin:0}.signal-countdown-container[data-v-d749c855]{margin:0 1px;padding:0;background-color:#000c;border-style:solid;border-color:#40e0d0;border-width:2px;border-radius:5px;color:#fff;width:40px;height:70px;justify-content:center;align-items:center;display:flex;flex-direction:column}.signal-countdown-number[data-v-d749c855]{font:30px bold}
|
|
@@ -29,6 +29,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
29
29
|
queueLength: QueueLength;
|
|
30
30
|
openDriveRenderer: OpenDriveRenderer;
|
|
31
31
|
signalControlAreaController: SignalControlAreaController;
|
|
32
|
+
showLogDiv: import("vue").Ref<boolean>;
|
|
32
33
|
appDataStore: import("pinia").Store<"appData", {
|
|
33
34
|
mapConfig: {};
|
|
34
35
|
saveTrackLog: boolean;
|
|
@@ -36,6 +37,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
36
37
|
countdownPanels: import("../types").ISignalCountdownProps[];
|
|
37
38
|
}, {}, {}>;
|
|
38
39
|
countdownPanelInfos: import("vue").Ref<{
|
|
40
|
+
displayMode: string;
|
|
39
41
|
crossId: string;
|
|
40
42
|
roadId: string;
|
|
41
43
|
mapPoint: number[];
|
|
@@ -56,7 +58,6 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
56
58
|
rColor?: string | undefined;
|
|
57
59
|
};
|
|
58
60
|
}[]>;
|
|
59
|
-
showLogDiv: import("vue").Ref<boolean>;
|
|
60
61
|
mapViewer: import("vue").ComputedRef<MapView | SceneView>;
|
|
61
62
|
startSaveTrackLog: () => void;
|
|
62
63
|
downloadTrackLog: () => void;
|
|
@@ -123,6 +124,10 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
123
124
|
props: any;
|
|
124
125
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
125
126
|
SignalCountdownPanel: import("vue").DefineComponent<{
|
|
127
|
+
displayMode: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
required: true;
|
|
130
|
+
};
|
|
126
131
|
crossId: {
|
|
127
132
|
type: StringConstructor;
|
|
128
133
|
required: true;
|
|
@@ -175,8 +180,12 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
175
180
|
rNumberStyle: import("vue").ComputedRef<{
|
|
176
181
|
color: string;
|
|
177
182
|
}>;
|
|
178
|
-
getColorString: (color: string | undefined) => "red" | "
|
|
183
|
+
getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
|
|
179
184
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
185
|
+
displayMode: {
|
|
186
|
+
type: StringConstructor;
|
|
187
|
+
required: true;
|
|
188
|
+
};
|
|
180
189
|
crossId: {
|
|
181
190
|
type: StringConstructor;
|
|
182
191
|
required: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),De=require("pinia"),S=require("./stores/index.js");require("./style/index.css");const Ae=require("./utils/holo-flow/index.js"),be=require("./utils/holo-flow/signal-countdown-panel.vue.js"),Ie=require("./utils/map-initializer.js"),k=require("./utils/open-drive-renderer/index.js"),C=require("./utils/overlay.js"),qe=require("./utils/queue-length.js"),L=require("./utils/road-config-tool/index.js"),Me=require("./utils/signal-control-area-controller/index.js"),_e=require("./utils/traffic-flow.js"),xe={class:"gis-viewer"},Be={style:{position:"absolute",bottom:"10px",left:"10px"}},He=a.defineComponent({__name:"gis-map",props:{config:{},assetsRoot:{}},emits:["mapLoaded","markerClick","mapClick"],setup(T,{expose:D,emit:A}){const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),De=require("pinia"),S=require("./stores/index.js");require("./style/index.css");const Ae=require("./utils/holo-flow/index.js"),be=require("./utils/holo-flow/signal-countdown-panel.vue.js"),Ie=require("./utils/map-initializer.js"),k=require("./utils/open-drive-renderer/index.js"),C=require("./utils/overlay.js"),qe=require("./utils/queue-length.js"),L=require("./utils/road-config-tool/index.js"),Me=require("./utils/signal-control-area-controller/index.js"),_e=require("./utils/traffic-flow.js"),xe={class:"gis-viewer"},Be={style:{position:"absolute",bottom:"10px",left:"10px"}},He=a.defineComponent({__name:"gis-map",props:{config:{},assetsRoot:{}},emits:["mapLoaded","markerClick","mapClick"],setup(T,{expose:D,emit:A}){const g=a.ref(null);let i,u,c,s,r,n,p,t,o;const f=a.ref(!1);S.registerStore();const h=S.default.useAppDataStore,{countdownPanels:b}=De.storeToRefs(h);a.onMounted(async()=>{if(!g.value)return;document.addEventListener("keydown",d=>{d.ctrlKey&&d.key==="i"&&(f.value=!f.value)});const e=a.getCurrentInstance(),{$gisviewerAssetsRoot:m}=e.appContext.config.globalProperties,l=await(await fetch(O.config)).json();l.assetsRoot=O.assetsRoot||m,h.mapConfig=l,u=new Ie.default,i=await u.initialize({container:g.value,mapConfig:l,markerClickCallback:(d,y,v,Te)=>{w("markerClick",d,y,v,Te)},mapClickCallback:(d,y,v)=>{w("mapClick",d,y,v)}}),r=new Ae.default(i),await r.init(),w("mapLoaded")}),a.onUnmounted(()=>{o==null||o.clearSignalControlArea(),t==null||t.clearOpenDrive(),r==null||r.clearHoloTrace(),r==null||r.clearHoloSignal(),s==null||s.disconnectTrafficFlow()});const I=a.computed(()=>i),q=()=>{const e=S.default.useAppDataStore;e.saveTrackLog=!0},M=()=>{r.downloadTrackLog()},_=async e=>await u.setMapCenter(e),x=async e=>await u.setMapCamera(e),B=async e=>await u.lookAt(e),H=e=>u.setLayerVisibility(e),V=(e,m)=>u.requestCoordinateTransform(e,m),P=e=>{u.cancelCoordinateTransform(e)},N=e=>{u.setMapZoomRange(e)},E=e=>(c||(c=new L.default(i)),c.showLaneNumber(e)),j=()=>{c==null||c.clearLaneNumber()},z=async e=>(c||(c=new L.default(i)),await c.initializeSearch(e)),Q=async()=>c==null?void 0:c.calCrossIndicatorArea(),F=async()=>{},Z=async(e,m)=>{s||(s=new _e.default(i)),s.connectTrafficFlow(e,m)},K=()=>{s==null||s.disconnectTrafficFlow()},U=e=>{r.handleVehicleTraceData(e)},G=()=>{r.clearHoloTrace()},J=e=>{r.setInterpolate(e)},W=async e=>{await r.handleSignalData(e)},X=()=>{r.clearHoloSignal()},Y=e=>{s==null||s.toggleTrafficInfo(e),r.toggleTrafficInfo(e)},R=e=>{r.togglePause(e)},$=e=>{s==null||s.toggleTrafficObject(e),r.toggleTrafficObject(e)},ee=e=>{r.updatePanelContent(e)},te=async e=>(n||(n=new C.default(i)),n.addOverlays(e)),ae=e=>(n||(n=new C.default(i)),n.addMask(e)),ne=()=>{n==null||n.removeMask()},re=e=>n==null?void 0:n.removeOverlaysByType(e),se=e=>n==null?void 0:n.removeOverlaysById(e),oe=()=>n==null?void 0:n.removeAllOverlays(),ie=()=>{n==null||n.showAllOverlays()},ce=e=>{p||(p=new qe.default(i)),p.updateQueueLength(e)},le=()=>{p==null||p.removeQueueLength()},ue=async(e,m)=>(t||(t=new k.default(i)),await t.showOpenDriveFromServer(e,m)),me=async e=>(t||(t=new k.default(i)),await t.clearOpenDrive(),await t.showOpenDriveFromFile(e)),de=async()=>await(t==null?void 0:t.clearOpenDrive()),pe=async e=>t?await(t==null?void 0:t.findSumo(e)):{status:-1,message:"未加载OpenDrive地图"},ge=async e=>t?t.selectSumo(e):{status:-1,message:"未加载OpenDrive地图"},fe=async e=>t?t.unselectSumo(e):{status:-1,message:"未加载OpenDrive地图"},we=async e=>t?await t.geometrySearch(e):{status:-1,message:"未加载OpenDrive地图"},ye=async e=>t?await t.getSumoInfo(e):{status:-1,message:"未加载OpenDrive地图"},ve=async e=>t?await(t==null?void 0:t.splitLane(e)):{status:-1,message:"未加载OpenDrive地图"},Se=async()=>t?t==null?void 0:t.clearSplitLane():{status:-1,message:"未加载OpenDrive地图"},he=async e=>(o||(o=new Me.default(i)),await o.showSignalControlArea(e)),Oe=()=>{o==null||o.clearSignalControlArea()},ke=async e=>o?await o.locateSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Ce=async e=>o?await o.highlightSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Le=()=>o?o.resetHighlight():{status:-1,message:"未加载信号控制区"},O=T,w=A;return D({mapViewer:I,setLayerVisibility:H,setMapCenter:_,lookAt:B,setMapCamera:x,setMapZoomRange:N,requestCoordinateTransform:V,cancelCoordinateTransform:P,addOverlays:te,addMask:ae,removeMask:ne,showAllOverlays:ie,removeOverlaysByType:re,removeOverlaysById:se,removeAllOverlays:oe,showLaneNumber:E,clearLaneNumber:j,initializeAreaTool:z,calCrossIndicatorArea:Q,calRoadIndicatorArea:F,connectCarFlow:Z,disconnectCarFlow:K,handleHoloVehicleTraceData:U,clearHoloTrace:G,handleHoloSignalData:W,clearHoloSignal:X,setInterpolate:J,toggleTrafficInfo:Y,toggleTrafficObject:$,toggleVehicleInfo:ee,togglePause:R,updateQueueLength:ce,removeQueueLength:le,showOpenDriveFromServer:ue,showOpenDriveFromFile:me,clearOpenDrive:de,geometrySearchInOpenDrive:we,findSumoInOpenDrive:pe,selectSumoInOpenDrive:ge,unselectSumoInOpenDrive:fe,getSumoInfo:ye,splitOpenDriveLane:ve,clearSplitOpenDriveLane:Se,showSignalControlArea:he,clearSignalControlArea:Oe,locateSignalControlArea:ke,highlightSignalControlArea:Ce,resetHighlightSignalControlArea:Le}),(e,m)=>(a.openBlock(),a.createElementBlock("div",xe,[a.createElementVNode("div",{class:"gis-viewer-main",ref_key:"mapContainer",ref:g},[a.withDirectives(a.createElementVNode("div",Be,[a.createElementVNode("button",{style:{"margin-right":"10px"},onClick:q}," 开始记录 "),a.createElementVNode("button",{onClick:M},"下载日志")],512),[[a.vShow,f.value]])],512),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(b),(l,d)=>(a.openBlock(),a.createBlock(be.default,{key:d,"display-mode":l.displayMode,"road-id":l.crossId,"cross-id":l.roadId,"map-point":l.mapPoint,"stop-line":l.stopLine,position:l.position,rotation:l.rotation,"lamp-status":l.lampStatus},null,8,["display-mode","road-id","cross-id","map-point","stop-line","position","rotation","lamp-status"]))),128))]))}});exports.default=He;
|
|
@@ -18,6 +18,7 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
18
18
|
queueLength: import("./utils/queue-length").default;
|
|
19
19
|
openDriveRenderer: import("./utils/open-drive-renderer").default;
|
|
20
20
|
signalControlAreaController: import("./utils/signal-control-area-controller").default;
|
|
21
|
+
showLogDiv: import("vue").Ref<boolean>;
|
|
21
22
|
appDataStore: import("pinia").Store<"appData", {
|
|
22
23
|
mapConfig: {};
|
|
23
24
|
saveTrackLog: boolean;
|
|
@@ -25,6 +26,7 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
25
26
|
countdownPanels: import("../types").ISignalCountdownProps[];
|
|
26
27
|
}, {}, {}>;
|
|
27
28
|
countdownPanelInfos: import("vue").Ref<{
|
|
29
|
+
displayMode: string;
|
|
28
30
|
crossId: string;
|
|
29
31
|
roadId: string;
|
|
30
32
|
mapPoint: number[];
|
|
@@ -45,7 +47,6 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
45
47
|
rColor?: string | undefined;
|
|
46
48
|
};
|
|
47
49
|
}[]>;
|
|
48
|
-
showLogDiv: import("vue").Ref<boolean>;
|
|
49
50
|
mapViewer: import("vue").ComputedRef<__esri.MapView | __esri.SceneView>;
|
|
50
51
|
startSaveTrackLog: () => void;
|
|
51
52
|
downloadTrackLog: () => void;
|
|
@@ -112,6 +113,10 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
112
113
|
props: any;
|
|
113
114
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
114
115
|
SignalCountdownPanel: import("vue").DefineComponent<{
|
|
116
|
+
displayMode: {
|
|
117
|
+
type: StringConstructor;
|
|
118
|
+
required: true;
|
|
119
|
+
};
|
|
115
120
|
crossId: {
|
|
116
121
|
type: StringConstructor;
|
|
117
122
|
required: true;
|
|
@@ -164,8 +169,12 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
164
169
|
rNumberStyle: import("vue").ComputedRef<{
|
|
165
170
|
color: string;
|
|
166
171
|
}>;
|
|
167
|
-
getColorString: (color: string | undefined) => "red" | "
|
|
172
|
+
getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
|
|
168
173
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
174
|
+
displayMode: {
|
|
175
|
+
type: StringConstructor;
|
|
176
|
+
required: true;
|
|
177
|
+
};
|
|
169
178
|
crossId: {
|
|
170
179
|
type: StringConstructor;
|
|
171
180
|
required: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("@arcgis/core/geometry"),L=require("@arcgis/core/geometry/geometryEngineAsync"),w=require("@arcgis/core/geometry/support/webMercatorUtils"),p=require("@turf/bearing"),g=require("@turf/destination"),b=require("@turf/helpers"),S=require("@turf/length"),A=require("@turf/line-slice-along"),M=require("pako"),h=require("proj4");function y(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const l=y(L),P=y(w),c=y(b);class i{static destinationWithPoint(e,t,n){const r=c.point([e.x,e.y]),s=g(r,n,t,{units:"meters"});return new f.Point({x:s.geometry.coordinates[0],y:s.geometry.coordinates[1]})}static angleOfLine(e){const t=e.paths[0],n=c.point(t[0]),r=c.point(t[t.length-1]);return p(n,r)}static extendLineInTowDir(e,t){const n=e.paths[0],r=c.point(n[0]),s=c.point(n[1]),o=p(s,r),u=g(r,t,o,{units:"meters"}),d=o>0?o-180:o+180,O=g(s,t,d,{units:"meters"});return new f.Polyline({paths:[[u.geometry.coordinates,O.geometry.coordinates]]})}static async getIntersectPointOfTwoLines(e,t){const n=await l.intersectLinesToPoints(e,t);if(n.length)return n[0]}static async getIntersectPointsOfStopLineAndLane(e,t,n){let r=await i.getIntersectPointOfLineAndPolygon(e,t);if(await i.pointDistance(r)<3&&n){for(const s of n)if(r=await i.getIntersectPointOfLineAndPolygon(e,t,s),await i.pointDistance(r)>2.5){const o=new f.Polyline({paths:[r]});return(await i.getOffsetLine(o,-s)).paths[0]}}else return r;return[]}static async pointDistance(e){if(e.length<2)return 0;const t=new f.Polyline({paths:[e]});return await l.geodesicLength(t,"meters")}static async getIntersectPointOfLineAndPolygon(e,t,n=0){n!==0&&(e=await i.getOffsetLine(e,n));const r=await l.intersect(e,t);if(r instanceof f.Polyline){const s=r.paths[0],o=s[0],u=s[s.length-1];return[o,u]}return[]}static async getOffsetLine(e,t){const n=P.geographicToWebMercator(e),r=await l.offset(n,t,"meters");return P.webMercatorToGeographic(r,!1)}static unzip(e){try{const t=[],n=e.split("");for(let s=0;s<n.length;s++){const o=n[s];t.push(o.charCodeAt(0))}const r=new Uint8Array(t);return M.inflate(r,{to:"string"})}catch{console.log(`非压缩内容: ${e}`)}}static getStdVecEntries(e,t=!1){const n=new Array(e.size());for(let r=0;r<e.size();r++)n[r]=e.get(r);return t&&e.delete(),n}static getStdMapEntries(e){const t=[];for(const n of i.getStdMapKeys(e))t.push([n,e.get(n)]);return t}static getStdMapKeys(e,t=!1){const n=[],r=e.keys();for(let s=0;s<r.size();s++)n.push(r.get(s));return r.delete(),t&&e.delete(),n}static setGeoData(e,t,n){i.geoReference=e,i.xOffset=t,i.yOffset=n}static transformLineProjection(e){try{return e.map(t=>h(i.geoReference).inverse([t[0]-i.xOffset,t[1]-i.yOffset]))}catch{return console.error("OpenDrive坐标转换为WGS84坐标失败",i.geoReference),e}}static transformPointProjection(e){try{return h(i.geoReference).inverse([e[0]-i.xOffset,e[1]-i.yOffset])}catch{return console.error("OpenDrive坐标转换为WGS84坐标失败",i.geoReference),e}}static pointsEqual(e,t){return Math.abs(e[0]-t[0])<Number.EPSILON&&Math.abs(e[1]-t[1])<Number.EPSILON}static getExtensionLine(e,t,n){const r=c.point(e),s=c.point(t),o=p(r,s);return g(s,n,o,{units:"meters"}).geometry.coordinates}static isCoordinateValid(e){return typeof e.latitude=="string"&&(e.latitude=Number(e.latitude)),typeof e.longitude=="string"&&(e.longitude=Number(e.longitude)),e.latitude!==null&&e.longitude!==null&&!isNaN(e.latitude)&&!isNaN(e.longitude)&&e.latitude!==0&&e.longitude!==0}static getCenterPointInLine(e){const t=c.lineString(e),n=S(t,{units:"meters"})/2
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("@arcgis/core/geometry"),L=require("@arcgis/core/geometry/geometryEngineAsync"),w=require("@arcgis/core/geometry/support/webMercatorUtils"),p=require("@turf/bearing"),g=require("@turf/destination"),b=require("@turf/helpers"),S=require("@turf/length"),A=require("@turf/line-slice-along"),M=require("pako"),h=require("proj4");function y(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const l=y(L),P=y(w),c=y(b);class i{static destinationWithPoint(e,t,n){const r=c.point([e.x,e.y]),s=g(r,n,t,{units:"meters"});return new f.Point({x:s.geometry.coordinates[0],y:s.geometry.coordinates[1]})}static angleOfLine(e){const t=e.paths[0],n=c.point(t[0]),r=c.point(t[t.length-1]);return p(n,r)}static extendLineInTowDir(e,t){const n=e.paths[0],r=c.point(n[0]),s=c.point(n[1]),o=p(s,r),u=g(r,t,o,{units:"meters"}),d=o>0?o-180:o+180,O=g(s,t,d,{units:"meters"});return new f.Polyline({paths:[[u.geometry.coordinates,O.geometry.coordinates]]})}static async getIntersectPointOfTwoLines(e,t){const n=await l.intersectLinesToPoints(e,t);if(n.length)return n[0]}static async getIntersectPointsOfStopLineAndLane(e,t,n){let r=await i.getIntersectPointOfLineAndPolygon(e,t);if(await i.pointDistance(r)<3&&n){for(const s of n)if(r=await i.getIntersectPointOfLineAndPolygon(e,t,s),await i.pointDistance(r)>2.5){const o=new f.Polyline({paths:[r]});return(await i.getOffsetLine(o,-s)).paths[0]}}else return r;return[]}static async pointDistance(e){if(e.length<2)return 0;const t=new f.Polyline({paths:[e]});return await l.geodesicLength(t,"meters")}static async getIntersectPointOfLineAndPolygon(e,t,n=0){n!==0&&(e=await i.getOffsetLine(e,n));const r=await l.intersect(e,t);if(r instanceof f.Polyline){const s=r.paths[0],o=s[0],u=s[s.length-1];return[o,u]}return[]}static async getOffsetLine(e,t){const n=P.geographicToWebMercator(e),r=await l.offset(n,t,"meters");return P.webMercatorToGeographic(r,!1)}static unzip(e){try{const t=[],n=e.split("");for(let s=0;s<n.length;s++){const o=n[s];t.push(o.charCodeAt(0))}const r=new Uint8Array(t);return M.inflate(r,{to:"string"})}catch{console.log(`非压缩内容: ${e}`)}}static getStdVecEntries(e,t=!1){const n=new Array(e.size());for(let r=0;r<e.size();r++)n[r]=e.get(r);return t&&e.delete(),n}static getStdMapEntries(e){const t=[];for(const n of i.getStdMapKeys(e))t.push([n,e.get(n)]);return t}static getStdMapKeys(e,t=!1){const n=[],r=e.keys();for(let s=0;s<r.size();s++)n.push(r.get(s));return r.delete(),t&&e.delete(),n}static setGeoData(e,t,n){i.geoReference=e,i.xOffset=t,i.yOffset=n}static transformLineProjection(e){try{return e.map(t=>h(i.geoReference).inverse([t[0]-i.xOffset,t[1]-i.yOffset]))}catch{return console.error("OpenDrive坐标转换为WGS84坐标失败",i.geoReference),e}}static transformPointProjection(e){try{return h(i.geoReference).inverse([e[0]-i.xOffset,e[1]-i.yOffset])}catch{return console.error("OpenDrive坐标转换为WGS84坐标失败",i.geoReference),e}}static pointsEqual(e,t){return Math.abs(e[0]-t[0])<Number.EPSILON&&Math.abs(e[1]-t[1])<Number.EPSILON}static getExtensionLine(e,t,n){const r=c.point(e),s=c.point(t),o=p(r,s);return g(s,n,o,{units:"meters"}).geometry.coordinates}static isCoordinateValid(e){return typeof e.latitude=="string"&&(e.latitude=Number(e.latitude)),typeof e.longitude=="string"&&(e.longitude=Number(e.longitude)),e.latitude!==null&&e.longitude!==null&&!isNaN(e.latitude)&&!isNaN(e.longitude)&&e.latitude!==0&&e.longitude!==0}static getCenterPointInLine(e){const t=c.lineString(e),n=S(t,{units:"meters"})/2,r=A(t,0,n,{units:"meters"});return r.geometry.coordinates[r.geometry.coordinates.length-1]}}exports.default=i;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
declare const _sfc_main: import("vue").DefineComponent<{
|
|
2
|
+
displayMode: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
2
6
|
crossId: {
|
|
3
7
|
type: StringConstructor;
|
|
4
8
|
required: true;
|
|
@@ -51,8 +55,12 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
51
55
|
rNumberStyle: import("vue").ComputedRef<{
|
|
52
56
|
color: string;
|
|
53
57
|
}>;
|
|
54
|
-
getColorString: (color: string | undefined) => "red" | "
|
|
58
|
+
getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
|
|
55
59
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
60
|
+
displayMode: {
|
|
61
|
+
type: StringConstructor;
|
|
62
|
+
required: true;
|
|
63
|
+
};
|
|
56
64
|
crossId: {
|
|
57
65
|
type: StringConstructor;
|
|
58
66
|
required: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./signal-countdown-panel.vue2.js");require("./signal-countdown-panel.vue3.js");const t=require("../../../../_virtual/_plugin-vue_export-helper.js"),u=t.default(e.default,[["__scopeId","data-v-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./signal-countdown-panel.vue2.js");require("./signal-countdown-panel.vue3.js");const t=require("../../../../_virtual/_plugin-vue_export-helper.js"),u=t.default(e.default,[["__scopeId","data-v-d749c855"]]);exports.default=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g={key:0,class:"signal-countdown-container"},S=["src"],v={key:1,class:"signal-countdown-container"},y=["src"],N={key:2,class:"signal-countdown-container"},h=["src"],w={key:3,class:"signal-countdown-container"},V=["src"],C=e.defineComponent({__name:"signal-countdown-panel",props:{crossId:{},roadId:{},mapPoint:{},stopLine:{},position:{},rotation:{},lampStatus:{}},setup(n){const t=n,s=e.computed(()=>({top:`${t.position.top}px`,left:`${t.position.left}px`,"transform-origin":"bottom center",transform:`translateX(-50%) translateY(-100%) rotate(${t.rotation}deg)`})),a=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/u-${t.lampStatus.uColor}.png`),r=e.computed(()=>({color:l(t.lampStatus.uColor)})),c=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/l-${t.lampStatus.lColor}.png`),i=e.computed(()=>({color:l(t.lampStatus.lColor)})),m=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/s-${t.lampStatus.sColor}.png`),u=e.computed(()=>({color:l(t.lampStatus.sColor)})),d=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/r-${t.lampStatus.rColor}.png`),p=e.computed(()=>({color:l(t.lampStatus.rColor)})),l=o=>{switch(o){case"red":return"red";case"yellow":return"
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g={key:0,class:"signal-countdown-container"},S=["src"],v={key:1,class:"signal-countdown-container"},y=["src"],N={key:2,class:"signal-countdown-container"},h=["src"],w={key:3,class:"signal-countdown-container"},V=["src"],C=e.defineComponent({__name:"signal-countdown-panel",props:{displayMode:{},crossId:{},roadId:{},mapPoint:{},stopLine:{},position:{},rotation:{},lampStatus:{}},setup(n){const t=n,s=e.computed(()=>({top:`${t.position.top}px`,left:`${t.position.left}px`,"transform-origin":"bottom center",transform:`translateX(-50%) translateY(-100%) rotate(${t.rotation}deg)`})),a=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/u-${t.lampStatus.uColor}.png`),r=e.computed(()=>({color:l(t.lampStatus.uColor)})),c=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/l-${t.lampStatus.lColor}.png`),i=e.computed(()=>({color:l(t.lampStatus.lColor)})),m=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/s-${t.lampStatus.sColor}.png`),u=e.computed(()=>({color:l(t.lampStatus.sColor)})),d=e.computed(()=>`/GisViewerAssets/Images/SignalLamp/r-${t.lampStatus.rColor}.png`),p=e.computed(()=>({color:l(t.lampStatus.rColor)})),l=o=>{switch(o){case"red":return"red";case"yellow":return"rgb(255, 192, 2)";case"green":return"lime";default:return"white"}};return(o,E)=>(e.openBlock(),e.createElementBlock("div",{class:"signal-countdown-panel",style:e.normalizeStyle(s.value)},[o.lampStatus.uColor?(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(r.value)},e.toDisplayString(o.lampStatus.uNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:a.value,width:"20px",height:"20px"},null,8,S)])])):e.createCommentVNode("",!0),o.lampStatus.lColor?(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(i.value)},e.toDisplayString(o.lampStatus.lNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:c.value,width:"20px",height:"20px"},null,8,y)])])):e.createCommentVNode("",!0),o.lampStatus.sColor?(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(u.value)},e.toDisplayString(o.lampStatus.sNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:m.value,width:"20px",height:"20px"},null,8,h)])])):e.createCommentVNode("",!0),o.lampStatus.rColor!==void 0?(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",{class:"signal-countdown-number",style:e.normalizeStyle(p.value)},e.toDisplayString(o.lampStatus.rNumber),5),e.createElementVNode("div",null,[e.createElementVNode("img",{src:d.value,width:"20px",height:"20px"},null,8,V)])])):e.createCommentVNode("",!0)],4))}});exports.default=C;
|
|
@@ -2,6 +2,7 @@ import SignalHoloFlow from './signal-holo-flow';
|
|
|
2
2
|
export default class LSRSignalHoloFlow extends SignalHoloFlow {
|
|
3
3
|
private stopLineLayer;
|
|
4
4
|
private store;
|
|
5
|
+
private watchHandle;
|
|
5
6
|
constructor(view: __esri.MapView | __esri.SceneView);
|
|
6
7
|
private stopLineMap;
|
|
7
8
|
initializeLayer(): Promise<void>;
|