gisviewer-vue3-arcgis 1.0.174 → 1.0.176
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 +12 -15
- package/es/src/gis-map/gis-map.vue.mjs +131 -119
- package/es/src/gis-map/index.d.ts +12 -15
- package/es/src/gis-map/style/index.css +2 -2
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +4 -12
- package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +67 -55
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +8 -8
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +1 -1
- package/es/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +1 -0
- package/es/src/gis-map/utils/holo-flow/trace-holo-flow.mjs +33 -28
- package/es/src/gis-map/utils/open-drive-renderer/index.mjs +20 -23
- package/es/src/gis-map/utils/signal-control-area-controller/index.d.ts +21 -3
- package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +165 -88
- package/lib/src/gis-map/gis-map.vue.d.ts +12 -15
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +12 -15
- package/lib/src/gis-map/style/index.css +2 -2
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +4 -12
- package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.d.ts +1 -0
- package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +2 -2
- package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.d.ts +21 -3
- package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as d from "@arcgis/core/core/reactiveUtils";
|
|
2
2
|
import { Point as f } from "@arcgis/core/geometry";
|
|
3
|
-
import * as
|
|
3
|
+
import * as w from "@arcgis/core/geometry/support/webMercatorUtils.js";
|
|
4
4
|
import P from "@arcgis/core/layers/GraphicsLayer";
|
|
5
5
|
import m from "./signal-holo-flow.mjs";
|
|
6
6
|
class M extends m {
|
|
@@ -36,7 +36,7 @@ class M extends m {
|
|
|
36
36
|
return n < 1e3 ? s = 1 : n < 2e3 ? s = 0.8 : n < 4e3 ? s = 0.4 : s = 0, s;
|
|
37
37
|
}
|
|
38
38
|
async handleSignalData(n) {
|
|
39
|
-
this.watchHandle || (this.watchHandle =
|
|
39
|
+
this.watchHandle || (this.watchHandle = d.watch(
|
|
40
40
|
() => this.view.extent,
|
|
41
41
|
() => {
|
|
42
42
|
const t = this.getPanelScale();
|
|
@@ -47,7 +47,7 @@ class M extends m {
|
|
|
47
47
|
x: e[0],
|
|
48
48
|
y: e[1]
|
|
49
49
|
});
|
|
50
|
-
this.view.spatialReference.isWebMercator && (a =
|
|
50
|
+
this.view.spatialReference.isWebMercator && (a = w.geographicToWebMercator(
|
|
51
51
|
a
|
|
52
52
|
));
|
|
53
53
|
const i = this.view.toScreen(a);
|
|
@@ -94,11 +94,11 @@ class M extends m {
|
|
|
94
94
|
x: e.panelPoint[0],
|
|
95
95
|
y: e.panelPoint[1]
|
|
96
96
|
});
|
|
97
|
-
this.view.spatialReference.isWebMercator && (i =
|
|
97
|
+
this.view.spatialReference.isWebMercator && (i = w.geographicToWebMercator(
|
|
98
98
|
i
|
|
99
99
|
));
|
|
100
100
|
const r = this.view.toScreen(i), h = this.getPanelRotation(e.coord);
|
|
101
|
-
this.countdownPanelProps.push({
|
|
101
|
+
console.log(o, h), this.countdownPanelProps.push({
|
|
102
102
|
displayMode: "complex",
|
|
103
103
|
crossId: s,
|
|
104
104
|
roadId: o,
|
|
@@ -132,7 +132,7 @@ class M extends m {
|
|
|
132
132
|
x: s[0],
|
|
133
133
|
y: s[1]
|
|
134
134
|
});
|
|
135
|
-
this.view.spatialReference.isWebMercator && (c =
|
|
135
|
+
this.view.spatialReference.isWebMercator && (c = w.geographicToWebMercator(
|
|
136
136
|
c
|
|
137
137
|
));
|
|
138
138
|
const p = this.view.toScreen(c), l = n[n.length - 1];
|
|
@@ -140,7 +140,7 @@ class M extends m {
|
|
|
140
140
|
x: l[0],
|
|
141
141
|
y: l[1]
|
|
142
142
|
});
|
|
143
|
-
this.view.spatialReference.isWebMercator && (t =
|
|
143
|
+
this.view.spatialReference.isWebMercator && (t = w.geographicToWebMercator(
|
|
144
144
|
t
|
|
145
145
|
));
|
|
146
146
|
const o = this.view.toScreen(t), e = o.x - p.x, a = o.y - p.y;
|
|
@@ -186,7 +186,7 @@ class v {
|
|
|
186
186
|
drawCountdownText(e, t) {
|
|
187
187
|
const a = e.getContext("2d");
|
|
188
188
|
a.clearRect(0, 0, e.width, e.height), a.font = "24px Digital", a.textBaseline = "middle", a.textAlign = "center", a.fillStyle = t.stageRemainingTime <= t.stageAllRedTime ? "red" : t.stageRemainingTime <= t.stageAllRedTime + t.stageYellowTime ? "yellow" : "lime", a.fillText(
|
|
189
|
-
|
|
189
|
+
t.stageRemainingTime.toFixed(0),
|
|
190
190
|
e.width / 2,
|
|
191
191
|
e.height / 2
|
|
192
192
|
);
|
|
@@ -1,46 +1,51 @@
|
|
|
1
1
|
import * as f from "@arcgis/core/views/3d/externalRenderers";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import T from "./trace-renderer-external.mjs";
|
|
3
|
+
import R from "./trace-renderer-layer.mjs";
|
|
4
4
|
class L {
|
|
5
5
|
constructor(e) {
|
|
6
|
-
e.type === "3d" ? (this.traceRenderer = new
|
|
6
|
+
this.nullDataCount = 0, e.type === "3d" ? (this.traceRenderer = new T(e), f.add(
|
|
7
7
|
e,
|
|
8
8
|
this.traceRenderer
|
|
9
|
-
)) : this.traceRenderer = new
|
|
9
|
+
)) : this.traceRenderer = new R(e);
|
|
10
10
|
}
|
|
11
11
|
async init() {
|
|
12
12
|
await this.traceRenderer.init();
|
|
13
13
|
}
|
|
14
14
|
downloadLog() {
|
|
15
|
-
const e = this.traceRenderer.getLog().map((
|
|
16
|
-
`).replace(/null/g, ""),
|
|
17
|
-
r.setAttribute("href",
|
|
15
|
+
const e = this.traceRenderer.getLog().map((s) => s.join(",")).join(`
|
|
16
|
+
`).replace(/null/g, ""), c = new Blob([e], { type: "text/csv;charset=utf-8;" }), o = URL.createObjectURL(c), r = document.createElement("a");
|
|
17
|
+
r.setAttribute("href", o), r.setAttribute("download", "trace-log.csv"), r.style.visibility = "hidden", document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* 处理全息流轨迹数据
|
|
21
21
|
* */
|
|
22
22
|
async handleVehicleTraceData(e) {
|
|
23
|
-
const { newVehList:
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const { newVehList: c, updateVehList: o, deleteVehList: r, jgsj: s } = e;
|
|
24
|
+
if (!c && !o && !r) {
|
|
25
|
+
this.nullDataCount++, this.nullDataCount > 1 && (this.clearTrace(), this.nullDataCount = 0);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const i = e.crossId || "", l = [], a = [];
|
|
29
|
+
if (c && c.length > 0) {
|
|
30
|
+
for (const n of c) {
|
|
31
|
+
n.localTimestamp || (n.localTimestamp = s || Date.now());
|
|
32
|
+
const t = this.buildVehicleTrackData(n, i);
|
|
28
33
|
t && l.push(t);
|
|
29
34
|
}
|
|
30
35
|
await this.traceRenderer.addVehicles(l);
|
|
31
36
|
}
|
|
32
|
-
if (
|
|
33
|
-
for (const
|
|
34
|
-
const t = this.buildVehicleTrackData(
|
|
37
|
+
if (o && o.length > 0) {
|
|
38
|
+
for (const n of o) {
|
|
39
|
+
const t = this.buildVehicleTrackData(n, i);
|
|
35
40
|
t && a.push(t);
|
|
36
41
|
}
|
|
37
42
|
await this.traceRenderer.updateVehicles(a);
|
|
38
43
|
}
|
|
39
44
|
if (r && r.length > 0) {
|
|
40
|
-
const
|
|
41
|
-
(t) =>
|
|
45
|
+
const n = r.map(
|
|
46
|
+
(t) => i + "-" + (t.ptcId || t.vehno || t.vehNo)
|
|
42
47
|
);
|
|
43
|
-
this.traceRenderer.deleteVehicles(
|
|
48
|
+
this.traceRenderer.deleteVehicles(n);
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
@@ -74,19 +79,19 @@ class L {
|
|
|
74
79
|
setInterpolate(e) {
|
|
75
80
|
this.traceRenderer.setInterpolate(e);
|
|
76
81
|
}
|
|
77
|
-
buildVehicleTrackData(e,
|
|
78
|
-
const
|
|
79
|
-
if (!(
|
|
82
|
+
buildVehicleTrackData(e, c) {
|
|
83
|
+
const o = e.longitude, r = e.latitude, s = e.ptcId, i = Number(e.ptcType), l = e.heading, a = Number(e.vehicleType), n = Number(e.vehicleColor), t = e.plateNo || e.plateno, h = Number(e.plateColor), d = e.timestamp, p = e.localTimestamp, u = e.roadLayer ? String(e.roadLayer) : "1", g = e.step, m = e.speed;
|
|
84
|
+
if (!(i < 0 || i > 8))
|
|
80
85
|
return {
|
|
81
|
-
ptcId:
|
|
82
|
-
crossId:
|
|
83
|
-
vehicleId:
|
|
84
|
-
x:
|
|
86
|
+
ptcId: s,
|
|
87
|
+
crossId: c,
|
|
88
|
+
vehicleId: c + "-" + s,
|
|
89
|
+
x: o,
|
|
85
90
|
y: r,
|
|
86
|
-
ptcType:
|
|
91
|
+
ptcType: i,
|
|
87
92
|
vehicleType: a,
|
|
88
|
-
heading:
|
|
89
|
-
vehicleColor:
|
|
93
|
+
heading: i === 2 ? -l : l,
|
|
94
|
+
vehicleColor: n,
|
|
90
95
|
showName: t && t !== "" && t !== "0" && t !== "000000" ? t : "",
|
|
91
96
|
plateNo: t,
|
|
92
97
|
plateColor: h,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import g from "@arcgis/core/Graphic";
|
|
2
|
-
import * as
|
|
2
|
+
import * as k from "@arcgis/core/core/promiseUtils";
|
|
3
3
|
import * as $ from "@arcgis/core/core/reactiveUtils.js";
|
|
4
4
|
import { Polygon as L, Point as F } from "@arcgis/core/geometry";
|
|
5
5
|
import * as S from "@arcgis/core/geometry/geometryEngine";
|
|
6
|
-
import
|
|
6
|
+
import C from "@arcgis/core/layers/FeatureLayer";
|
|
7
7
|
import w from "@arcgis/core/layers/GraphicsLayer";
|
|
8
8
|
import * as D from "@turf/helpers";
|
|
9
9
|
import { lineSliceAlong as x } from "@turf/line-slice-along";
|
|
@@ -14,9 +14,9 @@ import G from "pako";
|
|
|
14
14
|
import { watch as E } from "vue";
|
|
15
15
|
import R from "../../stores/index.mjs";
|
|
16
16
|
import T from "../common-utils.mjs";
|
|
17
|
-
class
|
|
17
|
+
class M {
|
|
18
18
|
constructor(e) {
|
|
19
|
-
this.junctionNames = /* @__PURE__ */ new Map(), this.junctionScale = 5e3, this.xodrBorder = [], this.projectName = "", this.openDriveServer = "", this.currentSectionCode = "", this.selectedSectionIds = [], this.currentJunctionId = "", this.view = e, this.laneLayer = new
|
|
19
|
+
this.junctionNames = /* @__PURE__ */ new Map(), this.junctionScale = 5e3, this.xodrBorder = [], this.projectName = "", this.openDriveServer = "", this.currentSectionCode = "", this.selectedSectionIds = [], this.currentJunctionId = "", this.view = e, this.laneLayer = new C({
|
|
20
20
|
id: "OpenDriveLane",
|
|
21
21
|
fields: [
|
|
22
22
|
{
|
|
@@ -239,7 +239,7 @@ class O {
|
|
|
239
239
|
}
|
|
240
240
|
]
|
|
241
241
|
}
|
|
242
|
-
}), this.roadNameLayer = new
|
|
242
|
+
}), this.roadNameLayer = new C({
|
|
243
243
|
id: "OpenDriveRoadName",
|
|
244
244
|
fields: [
|
|
245
245
|
{
|
|
@@ -302,7 +302,7 @@ class O {
|
|
|
302
302
|
]);
|
|
303
303
|
}
|
|
304
304
|
static getInstance(e) {
|
|
305
|
-
return this.instance || (this.instance = new
|
|
305
|
+
return this.instance || (this.instance = new M(e)), this.instance;
|
|
306
306
|
}
|
|
307
307
|
async makeMd5FromFile(e) {
|
|
308
308
|
var t;
|
|
@@ -456,8 +456,8 @@ class O {
|
|
|
456
456
|
const v = Number(y.id);
|
|
457
457
|
if (v === 0)
|
|
458
458
|
continue;
|
|
459
|
-
const I = y.type,
|
|
460
|
-
|
|
459
|
+
const I = y.type, O = [...y.outerPath], A = y.innerPath.concat(
|
|
460
|
+
O.reverse()
|
|
461
461
|
);
|
|
462
462
|
if (A.length <= 3) {
|
|
463
463
|
console.warn(`lane ${v} has less than 3 points`);
|
|
@@ -548,7 +548,7 @@ class O {
|
|
|
548
548
|
* 监听鼠标移动事件,高亮显示鼠标所在路段和路口
|
|
549
549
|
*/
|
|
550
550
|
monitorMouseMove() {
|
|
551
|
-
const e =
|
|
551
|
+
const e = k.debounce(async (t) => {
|
|
552
552
|
var c;
|
|
553
553
|
const o = (c = (await this.view.hitTest(t, {
|
|
554
554
|
include: [this.laneLayer, this.junctionLayer]
|
|
@@ -632,7 +632,7 @@ class O {
|
|
|
632
632
|
* 监听鼠标点击事件,获取高亮要素的拓扑信息
|
|
633
633
|
*/
|
|
634
634
|
monitorMouseClick() {
|
|
635
|
-
const e =
|
|
635
|
+
const e = k.debounce(async (t) => {
|
|
636
636
|
var a;
|
|
637
637
|
const o = (a = (await this.view.hitTest(t, {
|
|
638
638
|
include: [this.highlightLayer, this.junctionLayer, this.sectionLayer]
|
|
@@ -1100,10 +1100,9 @@ class O {
|
|
|
1100
1100
|
if (t === "marker")
|
|
1101
1101
|
return {
|
|
1102
1102
|
type: "picture-marker",
|
|
1103
|
-
url: `/GisViewerAssets/Images/
|
|
1104
|
-
width: "
|
|
1105
|
-
height: "
|
|
1106
|
-
yOffset: "12px"
|
|
1103
|
+
url: `/GisViewerAssets/Images/cross/${s ? "gis_xhj_blue" : "gis_lkcz_xz"}.png`,
|
|
1104
|
+
width: "32px",
|
|
1105
|
+
height: "32px"
|
|
1107
1106
|
};
|
|
1108
1107
|
if (t === "picture")
|
|
1109
1108
|
return s ? {
|
|
@@ -1144,7 +1143,7 @@ class O {
|
|
|
1144
1143
|
height: 12,
|
|
1145
1144
|
horizontalAlignment: "Center",
|
|
1146
1145
|
offsetX: 0,
|
|
1147
|
-
offsetY: s ?
|
|
1146
|
+
offsetY: s ? 25 : 15,
|
|
1148
1147
|
haloSize: 2,
|
|
1149
1148
|
haloSymbol: {
|
|
1150
1149
|
type: "CIMPolygonSymbol",
|
|
@@ -1183,24 +1182,22 @@ class O {
|
|
|
1183
1182
|
y: 0
|
|
1184
1183
|
},
|
|
1185
1184
|
anchorPointUnits: "Relative",
|
|
1186
|
-
size:
|
|
1185
|
+
size: 32,
|
|
1187
1186
|
rotateClockwise: !0,
|
|
1188
1187
|
textureFilter: "Picture",
|
|
1189
|
-
url: "/GisViewerAssets/Images/
|
|
1190
|
-
offsetY: s ? 22 : 15
|
|
1188
|
+
url: "/GisViewerAssets/Images/cross/gis_xhj_blue.png"
|
|
1191
1189
|
}
|
|
1192
1190
|
]
|
|
1193
1191
|
}
|
|
1194
1192
|
}
|
|
1195
1193
|
} : {
|
|
1196
1194
|
type: "picture-marker",
|
|
1197
|
-
url: "/GisViewerAssets/Images/
|
|
1198
|
-
width: "
|
|
1199
|
-
height: "
|
|
1200
|
-
yOffset: "22px"
|
|
1195
|
+
url: "/GisViewerAssets/Images/cross/gis_lkcz_xz.png",
|
|
1196
|
+
width: "32px",
|
|
1197
|
+
height: "32px"
|
|
1201
1198
|
};
|
|
1202
1199
|
}
|
|
1203
1200
|
}
|
|
1204
1201
|
export {
|
|
1205
|
-
|
|
1202
|
+
M as default
|
|
1206
1203
|
};
|
|
@@ -5,8 +5,10 @@ export default class SignalControlAreaController {
|
|
|
5
5
|
private subDistrictControllerLayer;
|
|
6
6
|
private crossLayer;
|
|
7
7
|
private highlightLayer;
|
|
8
|
-
private
|
|
8
|
+
private scaleWatcher?;
|
|
9
|
+
private clickWatcher?;
|
|
9
10
|
private readonly crossScale;
|
|
11
|
+
private openDriveServer;
|
|
10
12
|
constructor(view: __esri.MapView | __esri.SceneView);
|
|
11
13
|
showSignalControlArea(params: any): IResult;
|
|
12
14
|
clearSignalControlArea(): IResult;
|
|
@@ -18,7 +20,18 @@ export default class SignalControlAreaController {
|
|
|
18
20
|
}): Promise<IResult>;
|
|
19
21
|
resetHighlight(): IResult;
|
|
20
22
|
showSubSignalControlArea(params: any): IResult;
|
|
21
|
-
|
|
23
|
+
/**
|
|
24
|
+
* 点击路口时
|
|
25
|
+
* @param event
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
private handleViewClick;
|
|
29
|
+
private showNearbyCrosses;
|
|
30
|
+
/**
|
|
31
|
+
* 编辑子区的路口
|
|
32
|
+
* @returns
|
|
33
|
+
*/
|
|
34
|
+
editSubSignalArea(): Promise<IResult>;
|
|
22
35
|
/**
|
|
23
36
|
* 在区控\子区\路口图层中查找对应的graphic
|
|
24
37
|
* @param id
|
|
@@ -32,7 +45,12 @@ export default class SignalControlAreaController {
|
|
|
32
45
|
* @returns
|
|
33
46
|
*/
|
|
34
47
|
private drawArea;
|
|
35
|
-
|
|
48
|
+
/**
|
|
49
|
+
* 显示子区时路口的样式
|
|
50
|
+
* @param attributes
|
|
51
|
+
* @returns
|
|
52
|
+
*/
|
|
53
|
+
private getCrossSymbolInSubDistrict;
|
|
36
54
|
/**
|
|
37
55
|
* 生成路口点符号。在不同比例尺下,使用不同的符号
|
|
38
56
|
* @param attributes
|