gisviewer-vue3-arcgis 1.0.165 → 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/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/src/gis-map/gis-map.vue.d.ts +120 -0
- package/es/src/gis-map/gis-map.vue.mjs +142 -128
- package/es/src/gis-map/index.d.ts +120 -0
- package/es/src/gis-map/stores/appData.d.ts +2 -0
- package/es/src/gis-map/stores/appData.mjs +4 -2
- package/es/src/gis-map/utils/common-utils.mjs +5 -5
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +93 -0
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +7 -0
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.mjs +121 -0
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue3.mjs +4 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +14 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +123 -33
- package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.mjs +102 -99
- package/es/src/gis-map/utils/map-initializer.d.ts +1 -0
- package/es/src/gis-map/utils/map-initializer.mjs +135 -127
- package/es/src/gis-map/utils/open-drive-renderer/index.mjs +10 -10
- package/es/src/gis-map/utils/traffic-flow.mjs +5 -4
- package/es/src/types/index.d.ts +22 -0
- package/es/style.css +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +1 -0
- package/lib/src/gis-map/gis-map.vue.d.ts +120 -0
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +120 -0
- package/lib/src/gis-map/stores/appData.d.ts +2 -0
- package/lib/src/gis-map/stores/appData.js +1 -1
- 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 +93 -0
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue3.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +14 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.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/gis-map/utils/open-drive-renderer/index.js +1 -1
- package/lib/src/gis-map/utils/traffic-flow.js +1 -1
- package/lib/src/types/index.d.ts +22 -0
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
4
|
-
import { Polygon as
|
|
5
|
-
import * as
|
|
6
|
-
import
|
|
7
|
-
import x from "@arcgis/core/layers/
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
function
|
|
17
|
-
return
|
|
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";
|
|
15
|
+
import N from "./custom-layer/custom-wmts-layer.mjs";
|
|
16
|
+
function P(h, e) {
|
|
17
|
+
return h && (h.startsWith("http://") || h.startsWith("https://") ? h : e + h);
|
|
18
18
|
}
|
|
19
|
-
class
|
|
19
|
+
class Z {
|
|
20
20
|
constructor() {
|
|
21
21
|
this.mapConfig = {}, this.watchHandleMap = /* @__PURE__ */ new Map(), this.handleIndex = 0, this.zoomWatchHandle = null;
|
|
22
22
|
}
|
|
@@ -26,25 +26,25 @@ class F {
|
|
|
26
26
|
* @returns view
|
|
27
27
|
*/
|
|
28
28
|
async initialize(e) {
|
|
29
|
-
|
|
30
|
-
this.mapConfig =
|
|
31
|
-
const { container:
|
|
32
|
-
|
|
33
|
-
const n = new
|
|
34
|
-
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({
|
|
35
35
|
map: n,
|
|
36
|
-
container:
|
|
37
|
-
...
|
|
38
|
-
}) : this.view = new
|
|
36
|
+
container: t,
|
|
37
|
+
...this.mapConfig.mapOptions
|
|
38
|
+
}) : this.view = new O({
|
|
39
39
|
map: n,
|
|
40
|
-
container:
|
|
40
|
+
container: t,
|
|
41
41
|
environment: {
|
|
42
42
|
atmosphereEnabled: !0,
|
|
43
43
|
lighting: {
|
|
44
44
|
type: "virtual"
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
|
-
...
|
|
47
|
+
...(u = this.mapConfig) == null ? void 0 : u.mapOptions
|
|
48
48
|
}), this.view.popup.visibleElements = {
|
|
49
49
|
closeButton: !0,
|
|
50
50
|
collapseButton: !1,
|
|
@@ -53,35 +53,35 @@ class F {
|
|
|
53
53
|
}, this.view.popup.dockOptions = {
|
|
54
54
|
buttonEnabled: !1,
|
|
55
55
|
breakpoint: !1
|
|
56
|
-
}, this.view.on("click", async (
|
|
57
|
-
var
|
|
58
|
-
if (
|
|
59
|
-
let o =
|
|
60
|
-
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(
|
|
61
61
|
o
|
|
62
|
-
)),
|
|
62
|
+
)), a(
|
|
63
63
|
[o.x, o.y],
|
|
64
|
-
[
|
|
65
|
-
|
|
64
|
+
[i.screenPoint.x, i.screenPoint.y],
|
|
65
|
+
i
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
68
|
if (this.view.type === "3d") {
|
|
69
69
|
const o = this.view.camera;
|
|
70
70
|
if (this.view.spatialReference.isWebMercator) {
|
|
71
|
-
const
|
|
71
|
+
const m = w.webMercatorToGeographic(
|
|
72
72
|
o.position
|
|
73
|
-
),
|
|
73
|
+
), f = {
|
|
74
74
|
heading: o.heading,
|
|
75
75
|
tilt: o.tilt,
|
|
76
|
-
position:
|
|
76
|
+
position: m.toJSON()
|
|
77
77
|
};
|
|
78
|
-
console.log(
|
|
78
|
+
console.log(f), (y = navigator.clipboard) == null || y.writeText(JSON.stringify(f));
|
|
79
79
|
} else
|
|
80
80
|
console.log(o.toJSON());
|
|
81
81
|
console.log(this.view.zoom, this.view.scale);
|
|
82
82
|
} else {
|
|
83
83
|
let o = this.view.center;
|
|
84
|
-
this.view.spatialReference.isWebMercator && (o =
|
|
84
|
+
this.view.spatialReference.isWebMercator && (o = w.webMercatorToGeographic(
|
|
85
85
|
o
|
|
86
86
|
)), console.log({
|
|
87
87
|
center: o.toJSON(),
|
|
@@ -89,93 +89,101 @@ class F {
|
|
|
89
89
|
scale: this.view.scale
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
const
|
|
92
|
+
const r = (M = (await this.view.hitTest(i)).results) == null ? void 0 : M.filter(
|
|
93
93
|
(o) => o.type === "graphic"
|
|
94
94
|
);
|
|
95
|
-
|
|
96
|
-
var
|
|
97
|
-
const
|
|
98
|
-
(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
r.length > 0 && r.forEach((o) => {
|
|
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
|
|
103
103
|
);
|
|
104
104
|
});
|
|
105
|
-
}),
|
|
106
|
-
const
|
|
107
|
-
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()) {
|
|
108
108
|
case "webTile".toLowerCase(): {
|
|
109
|
-
const
|
|
110
|
-
urlTemplate:
|
|
111
|
-
...
|
|
109
|
+
const r = new R({
|
|
110
|
+
urlTemplate: c,
|
|
111
|
+
...i.options
|
|
112
112
|
});
|
|
113
|
-
n.add(
|
|
113
|
+
n.add(r);
|
|
114
114
|
break;
|
|
115
115
|
}
|
|
116
116
|
case "tile": {
|
|
117
|
-
const
|
|
118
|
-
url:
|
|
119
|
-
...
|
|
117
|
+
const r = new I({
|
|
118
|
+
url: c,
|
|
119
|
+
...i.options
|
|
120
120
|
});
|
|
121
|
-
n.add(
|
|
121
|
+
n.add(r);
|
|
122
122
|
break;
|
|
123
123
|
}
|
|
124
124
|
case "customWMTS".toLowerCase(): {
|
|
125
|
-
const
|
|
126
|
-
urlTemplate:
|
|
127
|
-
...
|
|
125
|
+
const r = new N({
|
|
126
|
+
urlTemplate: c,
|
|
127
|
+
...i.options
|
|
128
128
|
});
|
|
129
|
-
n.add(
|
|
129
|
+
n.add(r);
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
case "mapImage".toLowerCase(): {
|
|
133
|
+
const r = new x({
|
|
134
|
+
url: c,
|
|
135
|
+
...i.options
|
|
136
|
+
});
|
|
137
|
+
n.add(r);
|
|
130
138
|
break;
|
|
131
139
|
}
|
|
132
140
|
case "arcgis": {
|
|
133
|
-
const
|
|
134
|
-
n.basemap =
|
|
141
|
+
const r = new C(i.options);
|
|
142
|
+
n.basemap = r;
|
|
135
143
|
break;
|
|
136
144
|
}
|
|
137
145
|
}
|
|
138
|
-
}) : n.basemap = new
|
|
146
|
+
}) : n.basemap = new C({
|
|
139
147
|
style: {
|
|
140
148
|
id: "arcgis/light-gray",
|
|
141
149
|
language: "zh-CN"
|
|
142
150
|
}
|
|
143
|
-
}),
|
|
144
|
-
const
|
|
145
|
-
(
|
|
151
|
+
}), (v = this.mapConfig) != null && v.hdLayers) {
|
|
152
|
+
const i = this.mapConfig.hdLayers.map(
|
|
153
|
+
(c) => (
|
|
146
154
|
// 图层文件为GeoJson格式, renderer和symbol使用autocast配置
|
|
147
|
-
new
|
|
148
|
-
url:
|
|
149
|
-
...
|
|
150
|
-
title:
|
|
155
|
+
new L({
|
|
156
|
+
url: P(c.url, this.mapConfig.assetsRoot),
|
|
157
|
+
...c.options,
|
|
158
|
+
title: c.options.id
|
|
151
159
|
})
|
|
152
160
|
)
|
|
153
161
|
);
|
|
154
|
-
n.addMany(
|
|
162
|
+
n.addMany(i);
|
|
155
163
|
}
|
|
156
|
-
this.view.ui.remove("attribution"),
|
|
157
|
-
const
|
|
158
|
-
let
|
|
164
|
+
this.view.ui.remove("attribution"), await this.view.when();
|
|
165
|
+
const g = this.mapConfig.camera;
|
|
166
|
+
let l;
|
|
159
167
|
if (this.view.type === "2d") {
|
|
160
|
-
let
|
|
161
|
-
this.view.spatialReference.isWebMercator && (
|
|
162
|
-
|
|
163
|
-
)),
|
|
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 };
|
|
164
172
|
} else {
|
|
165
|
-
let
|
|
166
|
-
this.view.spatialReference.isWebMercator && (
|
|
167
|
-
|
|
168
|
-
)),
|
|
169
|
-
position:
|
|
173
|
+
let i = this.view.camera.position;
|
|
174
|
+
this.view.spatialReference.isWebMercator && (i = w.webMercatorToGeographic(
|
|
175
|
+
i
|
|
176
|
+
)), l = {
|
|
177
|
+
position: i,
|
|
170
178
|
heading: this.view.camera.heading,
|
|
171
179
|
tilt: this.view.camera.tilt
|
|
172
180
|
};
|
|
173
181
|
}
|
|
174
|
-
return
|
|
182
|
+
return g ? g.home = l : this.mapConfig.camera = { home: l }, this.view;
|
|
175
183
|
}
|
|
176
184
|
setLayerVisibility(e) {
|
|
177
|
-
const { id:
|
|
178
|
-
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: "未找到图层" };
|
|
179
187
|
}
|
|
180
188
|
/**
|
|
181
189
|
* 设置地图中心点
|
|
@@ -183,19 +191,19 @@ class F {
|
|
|
183
191
|
* @returns
|
|
184
192
|
*/
|
|
185
193
|
async setMapCenter(e) {
|
|
186
|
-
var
|
|
194
|
+
var t;
|
|
187
195
|
if (!this.view)
|
|
188
196
|
return { status: -1, message: "未初始化" };
|
|
189
197
|
if (e.center || e.target) {
|
|
190
|
-
switch ((
|
|
198
|
+
switch ((t = e.target) == null ? void 0 : t.type) {
|
|
191
199
|
case "point":
|
|
192
|
-
e.target = new
|
|
200
|
+
e.target = new T(e.target);
|
|
193
201
|
break;
|
|
194
202
|
case "polyline":
|
|
195
|
-
e.target = new
|
|
203
|
+
e.target = new z(e.target);
|
|
196
204
|
break;
|
|
197
205
|
case "polygon":
|
|
198
|
-
e.target = new
|
|
206
|
+
e.target = new W(e.target);
|
|
199
207
|
break;
|
|
200
208
|
}
|
|
201
209
|
await this.view.goTo(e, { duration: (e.duration || 0) * 1e3 });
|
|
@@ -208,8 +216,8 @@ class F {
|
|
|
208
216
|
async lookAt(e) {
|
|
209
217
|
if (this.view.type === "2d")
|
|
210
218
|
return;
|
|
211
|
-
const
|
|
212
|
-
if (
|
|
219
|
+
const t = e.tilt || 0, s = e.heading || 0;
|
|
220
|
+
if (t === 0)
|
|
213
221
|
await this.view.goTo(
|
|
214
222
|
{
|
|
215
223
|
position: {
|
|
@@ -217,16 +225,16 @@ class F {
|
|
|
217
225
|
y: e.center[1],
|
|
218
226
|
z: e.height
|
|
219
227
|
},
|
|
220
|
-
heading:
|
|
228
|
+
heading: s,
|
|
221
229
|
tilt: 0
|
|
222
230
|
},
|
|
223
231
|
{ duration: (e.duration || 2) * 1e3 }
|
|
224
232
|
);
|
|
225
233
|
else {
|
|
226
|
-
const a = Math.tan(
|
|
227
|
-
|
|
234
|
+
const a = Math.tan(t * Math.PI / 180) * e.height, n = S(
|
|
235
|
+
B.point(e.center),
|
|
228
236
|
a,
|
|
229
|
-
|
|
237
|
+
s + 180,
|
|
230
238
|
{
|
|
231
239
|
units: "meters"
|
|
232
240
|
}
|
|
@@ -234,12 +242,12 @@ class F {
|
|
|
234
242
|
await this.view.goTo(
|
|
235
243
|
{
|
|
236
244
|
position: {
|
|
237
|
-
x:
|
|
238
|
-
y:
|
|
245
|
+
x: n.geometry.coordinates[0],
|
|
246
|
+
y: n.geometry.coordinates[1],
|
|
239
247
|
z: e.height
|
|
240
248
|
},
|
|
241
|
-
heading:
|
|
242
|
-
tilt:
|
|
249
|
+
heading: s,
|
|
250
|
+
tilt: t
|
|
243
251
|
},
|
|
244
252
|
{ duration: (e.duration || 2) * 1e3 }
|
|
245
253
|
);
|
|
@@ -248,32 +256,32 @@ class F {
|
|
|
248
256
|
async setMapCamera(e) {
|
|
249
257
|
if (!this.view)
|
|
250
258
|
return { status: -1, message: "未初始化" };
|
|
251
|
-
const { name:
|
|
259
|
+
const { name: t, duration: s = 0 } = e, { camera: a } = this.mapConfig;
|
|
252
260
|
if (!a)
|
|
253
261
|
return { status: -1, message: "未配置camera" };
|
|
254
|
-
const
|
|
255
|
-
return
|
|
262
|
+
const n = a[t];
|
|
263
|
+
return n ? (await this.view.goTo(n, { duration: s * 1e3 }), { status: 0, message: "成功" }) : { status: -1, message: "未配置camera" };
|
|
256
264
|
}
|
|
257
265
|
/**
|
|
258
266
|
* 经纬度转像素坐标,在地图移动时回调
|
|
259
267
|
* */
|
|
260
|
-
requestCoordinateTransform(e,
|
|
261
|
-
let
|
|
262
|
-
const
|
|
268
|
+
requestCoordinateTransform(e, t) {
|
|
269
|
+
let s = 0;
|
|
270
|
+
const n = 1e3 / 30, g = k.watch(
|
|
263
271
|
() => this.view.center,
|
|
264
272
|
() => {
|
|
265
|
-
const
|
|
266
|
-
|
|
273
|
+
const l = this.transformPoints(e), p = Date.now();
|
|
274
|
+
p - s > n && (t(l), s = p);
|
|
267
275
|
}
|
|
268
276
|
);
|
|
269
|
-
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) };
|
|
270
278
|
}
|
|
271
279
|
transformPoints(e) {
|
|
272
|
-
return e.map((
|
|
273
|
-
const
|
|
274
|
-
x:
|
|
275
|
-
y:
|
|
276
|
-
}), 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);
|
|
277
285
|
return [a.x, a.y];
|
|
278
286
|
});
|
|
279
287
|
}
|
|
@@ -281,22 +289,22 @@ class F {
|
|
|
281
289
|
* 停止坐标转换回调
|
|
282
290
|
* */
|
|
283
291
|
cancelCoordinateTransform(e) {
|
|
284
|
-
const
|
|
285
|
-
|
|
292
|
+
const t = this.watchHandleMap.get(e);
|
|
293
|
+
t && (t.remove(), this.watchHandleMap.delete(e));
|
|
286
294
|
}
|
|
287
295
|
/**
|
|
288
296
|
* 设置地图zoom范围
|
|
289
297
|
* */
|
|
290
298
|
setMapZoomRange(e) {
|
|
291
|
-
const { min:
|
|
292
|
-
!
|
|
299
|
+
const { min: t, max: s } = e;
|
|
300
|
+
!t && !s || (this.zoomWatchHandle && this.zoomWatchHandle.remove(), this.zoomWatchHandle = k.watch(
|
|
293
301
|
() => this.view.zoom,
|
|
294
302
|
(a) => {
|
|
295
|
-
|
|
303
|
+
t && a <= t && (this.view.zoom = t), s && a >= s && (this.view.zoom = s);
|
|
296
304
|
}
|
|
297
305
|
));
|
|
298
306
|
}
|
|
299
307
|
}
|
|
300
308
|
export {
|
|
301
|
-
|
|
309
|
+
Z as default
|
|
302
310
|
};
|
|
@@ -456,20 +456,20 @@ class O {
|
|
|
456
456
|
const v = Number(f.id);
|
|
457
457
|
if (v === 0)
|
|
458
458
|
continue;
|
|
459
|
-
const I = f.type, M = [...f.outerPath],
|
|
459
|
+
const I = f.type, M = [...f.outerPath], A = f.innerPath.concat(
|
|
460
460
|
M.reverse()
|
|
461
461
|
);
|
|
462
|
-
if (
|
|
462
|
+
if (A.length <= 3) {
|
|
463
463
|
console.warn(`lane ${v} has less than 3 points`);
|
|
464
464
|
continue;
|
|
465
465
|
}
|
|
466
|
-
|
|
467
|
-
const
|
|
468
|
-
rings: [
|
|
466
|
+
A.push(f.innerPath[0]);
|
|
467
|
+
const N = new L({
|
|
468
|
+
rings: [A]
|
|
469
469
|
});
|
|
470
|
-
if (
|
|
470
|
+
if (N) {
|
|
471
471
|
const j = new g({
|
|
472
|
-
geometry:
|
|
472
|
+
geometry: N,
|
|
473
473
|
attributes: {
|
|
474
474
|
ObjectID: c++,
|
|
475
475
|
id: `${l}+${p}+${v}`,
|
|
@@ -869,7 +869,7 @@ class O {
|
|
|
869
869
|
geometry: r,
|
|
870
870
|
symbol: {
|
|
871
871
|
type: "simple-fill",
|
|
872
|
-
color: [0,
|
|
872
|
+
color: [0, 255, 255, 0.6],
|
|
873
873
|
style: "solid",
|
|
874
874
|
outline: {
|
|
875
875
|
width: 0
|
|
@@ -1083,10 +1083,10 @@ class O {
|
|
|
1083
1083
|
updateAllJunctionSymbol(e) {
|
|
1084
1084
|
const t = this.junctionLayer.graphics.clone();
|
|
1085
1085
|
this.junctionLayer.removeAll(), t.forEach((s) => {
|
|
1086
|
-
s.symbol = this.getCrossGraphicSymbol(
|
|
1086
|
+
s.getAttribute("selected") || (s.symbol = this.getCrossGraphicSymbol(
|
|
1087
1087
|
s.attributes,
|
|
1088
1088
|
e
|
|
1089
|
-
);
|
|
1089
|
+
));
|
|
1090
1090
|
}), this.junctionLayer.addMany(t.toArray());
|
|
1091
1091
|
}
|
|
1092
1092
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import u from "@arcgis/core/Graphic";
|
|
2
2
|
import { Point as p } from "@arcgis/core/geometry";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import d from "@arcgis/core/layers/GraphicsLayer";
|
|
4
|
+
import y from "../stores/index.mjs";
|
|
5
5
|
import m from "./common-utils.mjs";
|
|
6
6
|
class S {
|
|
7
7
|
constructor(i) {
|
|
8
8
|
this.maxMissCount = 2, this.objectMissCount = /* @__PURE__ */ new Map(), this.showVehiclePlate = !0, this.showGroundVehicle = !0, this.showElevatedVehicle = !0, this.showLog = !1, this.focusVehNo = "", this.view = i;
|
|
9
|
-
const t =
|
|
10
|
-
this.mapConfig = JSON.parse(JSON.stringify(t.mapConfig)), this.objectsLayer = new
|
|
9
|
+
const t = y.useAppDataStore;
|
|
10
|
+
this.mapConfig = JSON.parse(JSON.stringify(t.mapConfig)), this.objectsLayer = new d(), this.view.map.add(this.objectsLayer);
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* 开始显示交通流数据
|
|
@@ -230,6 +230,7 @@ class S {
|
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
232
|
return {
|
|
233
|
+
vehicleId: l,
|
|
233
234
|
ptcId: l,
|
|
234
235
|
timestamp: t,
|
|
235
236
|
localTimestamp: t,
|
package/es/src/types/index.d.ts
CHANGED
|
@@ -247,3 +247,25 @@ export interface IJunctionTableData {
|
|
|
247
247
|
crossId?: string;
|
|
248
248
|
factoryCode?: string;
|
|
249
249
|
}
|
|
250
|
+
export interface ISignalCountdownProps {
|
|
251
|
+
displayMode: string;
|
|
252
|
+
crossId: string;
|
|
253
|
+
roadId: string;
|
|
254
|
+
mapPoint: number[];
|
|
255
|
+
stopLine: number[][];
|
|
256
|
+
position: {
|
|
257
|
+
left: number;
|
|
258
|
+
top: number;
|
|
259
|
+
};
|
|
260
|
+
rotation: number;
|
|
261
|
+
lampStatus: {
|
|
262
|
+
uNumber?: number;
|
|
263
|
+
uColor?: string;
|
|
264
|
+
lNumber?: number;
|
|
265
|
+
lColor?: string;
|
|
266
|
+
sNumber?: number;
|
|
267
|
+
sColor?: string;
|
|
268
|
+
rNumber?: number;
|
|
269
|
+
rColor?: string;
|
|
270
|
+
};
|
|
271
|
+
}
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gis-viewer{overflow:auto;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar{display:none}}
|
|
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}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=(e,o)=>{const t=e.__vccOpts||e;for(const[r,s]of o)t[r]=s;return t};exports.default=u;
|
|
@@ -30,6 +30,34 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
30
30
|
openDriveRenderer: OpenDriveRenderer;
|
|
31
31
|
signalControlAreaController: SignalControlAreaController;
|
|
32
32
|
showLogDiv: import("vue").Ref<boolean>;
|
|
33
|
+
appDataStore: import("pinia").Store<"appData", {
|
|
34
|
+
mapConfig: {};
|
|
35
|
+
saveTrackLog: boolean;
|
|
36
|
+
isSketching: boolean;
|
|
37
|
+
countdownPanels: import("../types").ISignalCountdownProps[];
|
|
38
|
+
}, {}, {}>;
|
|
39
|
+
countdownPanelInfos: import("vue").Ref<{
|
|
40
|
+
displayMode: string;
|
|
41
|
+
crossId: string;
|
|
42
|
+
roadId: string;
|
|
43
|
+
mapPoint: number[];
|
|
44
|
+
stopLine: number[][];
|
|
45
|
+
position: {
|
|
46
|
+
left: number;
|
|
47
|
+
top: number;
|
|
48
|
+
};
|
|
49
|
+
rotation: number;
|
|
50
|
+
lampStatus: {
|
|
51
|
+
uNumber?: number | undefined;
|
|
52
|
+
uColor?: string | undefined;
|
|
53
|
+
lNumber?: number | undefined;
|
|
54
|
+
lColor?: string | undefined;
|
|
55
|
+
sNumber?: number | undefined;
|
|
56
|
+
sColor?: string | undefined;
|
|
57
|
+
rNumber?: number | undefined;
|
|
58
|
+
rColor?: string | undefined;
|
|
59
|
+
};
|
|
60
|
+
}[]>;
|
|
33
61
|
mapViewer: import("vue").ComputedRef<MapView | SceneView>;
|
|
34
62
|
startSaveTrackLog: () => void;
|
|
35
63
|
downloadTrackLog: () => void;
|
|
@@ -95,6 +123,98 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
95
123
|
resetHighlightSignalControlArea: () => import("../types").IResult;
|
|
96
124
|
props: any;
|
|
97
125
|
emit: (event: "mapLoaded" | "markerClick" | "mapClick", ...args: any[]) => void;
|
|
126
|
+
SignalCountdownPanel: import("vue").DefineComponent<{
|
|
127
|
+
displayMode: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
required: true;
|
|
130
|
+
};
|
|
131
|
+
crossId: {
|
|
132
|
+
type: StringConstructor;
|
|
133
|
+
required: true;
|
|
134
|
+
};
|
|
135
|
+
roadId: {
|
|
136
|
+
type: StringConstructor;
|
|
137
|
+
required: true;
|
|
138
|
+
};
|
|
139
|
+
mapPoint: {
|
|
140
|
+
type: ArrayConstructor;
|
|
141
|
+
required: true;
|
|
142
|
+
};
|
|
143
|
+
stopLine: {
|
|
144
|
+
type: ArrayConstructor;
|
|
145
|
+
required: true;
|
|
146
|
+
};
|
|
147
|
+
position: {
|
|
148
|
+
type: ObjectConstructor;
|
|
149
|
+
required: true;
|
|
150
|
+
};
|
|
151
|
+
rotation: {
|
|
152
|
+
type: NumberConstructor;
|
|
153
|
+
required: true;
|
|
154
|
+
};
|
|
155
|
+
lampStatus: {
|
|
156
|
+
type: ObjectConstructor;
|
|
157
|
+
required: true;
|
|
158
|
+
};
|
|
159
|
+
}, {
|
|
160
|
+
props: any;
|
|
161
|
+
panelStyle: import("vue").ComputedRef<{
|
|
162
|
+
top: string;
|
|
163
|
+
left: string;
|
|
164
|
+
'transform-origin': string;
|
|
165
|
+
transform: string;
|
|
166
|
+
}>;
|
|
167
|
+
uImage: import("vue").ComputedRef<string>;
|
|
168
|
+
uNumberStyle: import("vue").ComputedRef<{
|
|
169
|
+
color: string;
|
|
170
|
+
}>;
|
|
171
|
+
lImage: import("vue").ComputedRef<string>;
|
|
172
|
+
lNumberStyle: import("vue").ComputedRef<{
|
|
173
|
+
color: string;
|
|
174
|
+
}>;
|
|
175
|
+
sImage: import("vue").ComputedRef<string>;
|
|
176
|
+
sNumberStyle: import("vue").ComputedRef<{
|
|
177
|
+
color: string;
|
|
178
|
+
}>;
|
|
179
|
+
rImage: import("vue").ComputedRef<string>;
|
|
180
|
+
rNumberStyle: import("vue").ComputedRef<{
|
|
181
|
+
color: string;
|
|
182
|
+
}>;
|
|
183
|
+
getColorString: (color: string | undefined) => "red" | "rgb(255, 192, 2)" | "lime" | "white";
|
|
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
|
+
};
|
|
189
|
+
crossId: {
|
|
190
|
+
type: StringConstructor;
|
|
191
|
+
required: true;
|
|
192
|
+
};
|
|
193
|
+
roadId: {
|
|
194
|
+
type: StringConstructor;
|
|
195
|
+
required: true;
|
|
196
|
+
};
|
|
197
|
+
mapPoint: {
|
|
198
|
+
type: ArrayConstructor;
|
|
199
|
+
required: true;
|
|
200
|
+
};
|
|
201
|
+
stopLine: {
|
|
202
|
+
type: ArrayConstructor;
|
|
203
|
+
required: true;
|
|
204
|
+
};
|
|
205
|
+
position: {
|
|
206
|
+
type: ObjectConstructor;
|
|
207
|
+
required: true;
|
|
208
|
+
};
|
|
209
|
+
rotation: {
|
|
210
|
+
type: NumberConstructor;
|
|
211
|
+
required: true;
|
|
212
|
+
};
|
|
213
|
+
lampStatus: {
|
|
214
|
+
type: ObjectConstructor;
|
|
215
|
+
required: true;
|
|
216
|
+
};
|
|
217
|
+
}>>, {}, {}>;
|
|
98
218
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("mapLoaded" | "markerClick" | "mapClick")[], "mapLoaded" | "markerClick" | "mapClick", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
99
219
|
config: {
|
|
100
220
|
type: StringConstructor;
|