gisviewer-vue3-arcgis 1.0.153 → 1.0.155
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 +3 -1
- package/es/src/gis-map/gis-map.vue.mjs +120 -116
- package/es/src/gis-map/index.d.ts +2 -0
- package/es/src/gis-map/utils/holo-flow/index.d.ts +1 -2
- package/es/src/gis-map/utils/holo-flow/index.mjs +19 -12
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +9 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +43 -0
- package/es/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +3 -4
- package/es/src/gis-map/utils/open-drive-renderer/index.d.ts +1 -0
- package/es/src/gis-map/utils/open-drive-renderer/index.mjs +27 -21
- package/es/src/gis-map/utils/overlay.d.ts +3 -1
- package/es/src/gis-map/utils/overlay.mjs +75 -43
- package/es/src/gis-map/utils/signal-control-area-controller/index.mjs +16 -4
- package/es/src/types/index.d.ts +5 -0
- package/lib/src/gis-map/gis-map.vue.d.ts +3 -1
- package/lib/src/gis-map/gis-map.vue.js +1 -1
- package/lib/src/gis-map/index.d.ts +2 -0
- package/lib/src/gis-map/utils/holo-flow/index.d.ts +1 -2
- package/lib/src/gis-map/utils/holo-flow/index.js +1 -1
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.d.ts +9 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -0
- package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.d.ts +3 -4
- package/lib/src/gis-map/utils/open-drive-renderer/index.d.ts +1 -0
- package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
- package/lib/src/gis-map/utils/overlay.d.ts +3 -1
- package/lib/src/gis-map/utils/overlay.js +1 -1
- package/lib/src/gis-map/utils/signal-control-area-controller/index.js +1 -1
- package/lib/src/types/index.d.ts +5 -0
- package/package.json +1 -1
|
@@ -1,30 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
import l from "@arcgis/core/
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Polygon as n } from "@arcgis/core/geometry";
|
|
2
|
+
import * as l from "@arcgis/core/geometry/geometryEngine";
|
|
3
|
+
import y from "@arcgis/core/Graphic";
|
|
4
|
+
import h from "@arcgis/core/layers/GraphicsLayer";
|
|
5
|
+
class u {
|
|
6
|
+
constructor(e, s) {
|
|
5
7
|
this.defaultPointSymbol = {
|
|
6
8
|
type: "simple-marker",
|
|
7
9
|
style: "circle",
|
|
8
10
|
color: "yellow",
|
|
9
11
|
size: 10
|
|
10
|
-
}, this.view =
|
|
12
|
+
}, this.view = e, this.overlayLayer = new h({
|
|
11
13
|
...s
|
|
12
14
|
}), this.view.map.layers.add(this.overlayLayer);
|
|
13
15
|
}
|
|
16
|
+
addMask(e) {
|
|
17
|
+
this.removeMask();
|
|
18
|
+
const s = e.maskColor || [100, 100, 100, 0.8], i = e.maskSize || 100, r = new n({
|
|
19
|
+
rings: e.geometry.rings
|
|
20
|
+
}), t = r.centroid, a = l.geodesicBuffer(
|
|
21
|
+
t,
|
|
22
|
+
i,
|
|
23
|
+
"kilometers"
|
|
24
|
+
), o = l.difference(
|
|
25
|
+
a,
|
|
26
|
+
r
|
|
27
|
+
), d = new y({
|
|
28
|
+
geometry: o,
|
|
29
|
+
symbol: {
|
|
30
|
+
type: "simple-fill",
|
|
31
|
+
color: s,
|
|
32
|
+
outline: {
|
|
33
|
+
style: "none"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
attributes: { type: "mask" }
|
|
37
|
+
});
|
|
38
|
+
this.overlayLayer.add(d);
|
|
39
|
+
}
|
|
40
|
+
removeMask() {
|
|
41
|
+
const e = this.overlayLayer.graphics.find(
|
|
42
|
+
(s) => s.getAttribute("type") === "mask"
|
|
43
|
+
);
|
|
44
|
+
e && this.overlayLayer.remove(e);
|
|
45
|
+
}
|
|
14
46
|
/**
|
|
15
47
|
* 添加覆盖物
|
|
16
48
|
* @param params
|
|
17
49
|
*/
|
|
18
|
-
addOverlays(
|
|
50
|
+
addOverlays(e) {
|
|
19
51
|
let s = 0, i = 0;
|
|
20
|
-
for (const
|
|
21
|
-
|
|
22
|
-
const t =
|
|
52
|
+
for (const r of e.overlays) {
|
|
53
|
+
r.properties ? (r.properties.type || (r.properties.type = e.type), r.properties.id || (r.properties.id = r.id)) : r.properties = { type: e.type, id: r.id };
|
|
54
|
+
const t = r.symbol || e.defaultSymbol || this.defaultPointSymbol;
|
|
23
55
|
this.addOverlay(
|
|
24
|
-
|
|
56
|
+
r,
|
|
25
57
|
t,
|
|
26
|
-
|
|
27
|
-
|
|
58
|
+
r.properties,
|
|
59
|
+
r.visible
|
|
28
60
|
).message === "add" ? s++ : i++;
|
|
29
61
|
}
|
|
30
62
|
return { status: 0, message: `新增${s}, 更新${i}` };
|
|
@@ -33,10 +65,10 @@ class v {
|
|
|
33
65
|
* 按type移除覆盖物
|
|
34
66
|
* @param types
|
|
35
67
|
*/
|
|
36
|
-
removeOverlaysByType(
|
|
68
|
+
removeOverlaysByType(e) {
|
|
37
69
|
const s = this.overlayLayer.graphics.filter((i) => {
|
|
38
|
-
const
|
|
39
|
-
return
|
|
70
|
+
const r = i.getAttribute("type");
|
|
71
|
+
return e.includes(r);
|
|
40
72
|
});
|
|
41
73
|
return this.overlayLayer.graphics.removeMany(s), { status: 0, message: `删除${s.length}` };
|
|
42
74
|
}
|
|
@@ -44,10 +76,10 @@ class v {
|
|
|
44
76
|
* 按id移除覆盖物
|
|
45
77
|
* @param ids
|
|
46
78
|
*/
|
|
47
|
-
removeOverlaysById(
|
|
79
|
+
removeOverlaysById(e) {
|
|
48
80
|
const s = this.overlayLayer.graphics.filter((i) => {
|
|
49
|
-
const
|
|
50
|
-
return
|
|
81
|
+
const r = i.getAttribute("id");
|
|
82
|
+
return e.includes(r);
|
|
51
83
|
});
|
|
52
84
|
return this.overlayLayer.graphics.removeMany(s), { status: 0, message: `删除${s.length}` };
|
|
53
85
|
}
|
|
@@ -56,10 +88,10 @@ class v {
|
|
|
56
88
|
* @param ids
|
|
57
89
|
* @param isShow
|
|
58
90
|
*/
|
|
59
|
-
isShowOverlaysByIds(
|
|
91
|
+
isShowOverlaysByIds(e, s) {
|
|
60
92
|
this.overlayLayer.graphics.map((i) => {
|
|
61
|
-
const
|
|
62
|
-
|
|
93
|
+
const r = i.getAttribute("id");
|
|
94
|
+
e.includes(r) ? i.visible = s : i.visible = !s;
|
|
63
95
|
});
|
|
64
96
|
}
|
|
65
97
|
/**
|
|
@@ -68,8 +100,8 @@ class v {
|
|
|
68
100
|
* @memberof Overlay
|
|
69
101
|
*/
|
|
70
102
|
showAllOverlays() {
|
|
71
|
-
this.overlayLayer.graphics.forEach((
|
|
72
|
-
|
|
103
|
+
this.overlayLayer.graphics.forEach((e) => {
|
|
104
|
+
e.visible = !0;
|
|
73
105
|
});
|
|
74
106
|
}
|
|
75
107
|
/**
|
|
@@ -77,8 +109,8 @@ class v {
|
|
|
77
109
|
* @returns
|
|
78
110
|
*/
|
|
79
111
|
removeAllOverlays() {
|
|
80
|
-
const
|
|
81
|
-
return this.overlayLayer.removeAll(), { status: 0, message: `删除${
|
|
112
|
+
const e = this.overlayLayer.graphics.length;
|
|
113
|
+
return this.overlayLayer.removeAll(), { status: 0, message: `删除${e}` };
|
|
82
114
|
}
|
|
83
115
|
/**
|
|
84
116
|
* 销毁
|
|
@@ -88,8 +120,8 @@ class v {
|
|
|
88
120
|
destroy() {
|
|
89
121
|
this.view.map.remove(this.overlayLayer), this.overlayLayer.destroy();
|
|
90
122
|
}
|
|
91
|
-
removeGraphics(
|
|
92
|
-
Array.isArray(
|
|
123
|
+
removeGraphics(e) {
|
|
124
|
+
Array.isArray(e) || (e = [e]), this.overlayLayer.graphics.removeMany(e);
|
|
93
125
|
}
|
|
94
126
|
/**
|
|
95
127
|
* 查找当前点击是否有覆盖物在当前图层
|
|
@@ -99,9 +131,9 @@ class v {
|
|
|
99
131
|
* @returns
|
|
100
132
|
* @memberof Overlay
|
|
101
133
|
*/
|
|
102
|
-
async findGraphic(
|
|
103
|
-
var
|
|
104
|
-
return (
|
|
134
|
+
async findGraphic(e) {
|
|
135
|
+
var r;
|
|
136
|
+
return (r = (await this.view.hitTest(e)).results) == null ? void 0 : r.filter(
|
|
105
137
|
(t) => t.type === "graphic" && t.graphic.layer === this.overlayLayer
|
|
106
138
|
);
|
|
107
139
|
}
|
|
@@ -127,23 +159,23 @@ class v {
|
|
|
127
159
|
* @param symbol
|
|
128
160
|
* @param properties
|
|
129
161
|
*/
|
|
130
|
-
addPoint(
|
|
162
|
+
addPoint(e, s, i, r) {
|
|
131
163
|
let t, a = !0;
|
|
132
|
-
return
|
|
133
|
-
(
|
|
134
|
-
)), t ? t.visible =
|
|
135
|
-
visible:
|
|
136
|
-
}), this.overlayLayer.add(t), a = !1), t.geometry =
|
|
164
|
+
return e.id && (t = this.overlayLayer.graphics.find(
|
|
165
|
+
(o) => o.getAttribute("id") === e.id
|
|
166
|
+
)), t ? t.visible = r ?? t.visible : (r = r ?? !0, t = new y({
|
|
167
|
+
visible: r
|
|
168
|
+
}), this.overlayLayer.add(t), a = !1), t.geometry = e.geometry, t.symbol = s, t.attributes = i, { status: 0, message: a ? "add" : "update" };
|
|
137
169
|
}
|
|
138
|
-
addOverlay(
|
|
170
|
+
addOverlay(e, s, i, r) {
|
|
139
171
|
let t, a = !0;
|
|
140
|
-
return
|
|
141
|
-
(
|
|
142
|
-
)), t ? t.visible =
|
|
143
|
-
visible:
|
|
144
|
-
}), this.overlayLayer.add(t), a = !1), t.geometry =
|
|
172
|
+
return e.id && (t = this.overlayLayer.graphics.find(
|
|
173
|
+
(o) => o.getAttribute("id") === e.id
|
|
174
|
+
)), t ? t.visible = r ?? t.visible : (r = r ?? !0, t = new y({
|
|
175
|
+
visible: r
|
|
176
|
+
}), this.overlayLayer.add(t), a = !1), t.geometry = e.geometry, t.symbol = s, t.attributes = i, { status: 0, message: a ? "add" : "update" };
|
|
145
177
|
}
|
|
146
178
|
}
|
|
147
179
|
export {
|
|
148
|
-
|
|
180
|
+
u as default
|
|
149
181
|
};
|
|
@@ -90,10 +90,22 @@ class M {
|
|
|
90
90
|
).toArray().map((i) => i.clone()), s = this.crossLayer.graphics.filter(
|
|
91
91
|
(i) => i.getAttribute("id") === e.id || i.getAttribute("districtId") === e.id || i.getAttribute("subDistrictId") === e.id
|
|
92
92
|
).toArray().map((i) => i.clone());
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
if (t.length > 0 && this.highlightLayer.addMany(t), r.length > 0 && this.highlightLayer.addMany(r), s.length > 0 && this.highlightLayer.addMany(s), this.highlightLayer.graphics.length === 0)
|
|
94
|
+
return { status: 1, message: "未找到" };
|
|
95
|
+
if (t.length > 0)
|
|
96
|
+
await this.view.goTo(t);
|
|
97
|
+
else if (r.length > 0) {
|
|
98
|
+
const i = r[0].geometry.centroid;
|
|
99
|
+
await this.view.goTo({
|
|
100
|
+
target: i,
|
|
101
|
+
scale: this.crossScale - 500
|
|
102
|
+
});
|
|
103
|
+
} else
|
|
104
|
+
s.length > 1 ? await this.view.goTo(s) : await this.view.goTo({
|
|
105
|
+
target: s[0].geometry,
|
|
106
|
+
scale: 1500
|
|
107
|
+
});
|
|
108
|
+
return { status: 0, message: "ok" };
|
|
97
109
|
}
|
|
98
110
|
resetHighlight() {
|
|
99
111
|
return this.highlightLayer.removeAll(), this.view.closePopup(), this.districtControllerLayer.visible = !0, this.subDistrictControllerLayer.visible = !0, this.crossLayer.visible = !0, { status: 0, message: "ok" };
|
package/es/src/types/index.d.ts
CHANGED
|
@@ -129,6 +129,11 @@ export interface IOverlay {
|
|
|
129
129
|
symbol?: IPointSymbol | ILineSymbol | IPolygonSymbol;
|
|
130
130
|
properties?: any;
|
|
131
131
|
}
|
|
132
|
+
export interface IMaskParam {
|
|
133
|
+
geometry: IPolygon;
|
|
134
|
+
maskColor?: number[];
|
|
135
|
+
maskSize?: number;
|
|
136
|
+
}
|
|
132
137
|
export interface IOverlayParam {
|
|
133
138
|
type?: string;
|
|
134
139
|
defaultSymbol?: IPointSymbol | ILineSymbol | IPolygonSymbol;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import MapView from '@arcgis/core/views/MapView';
|
|
2
2
|
import SceneView from '@arcgis/core/views/SceneView';
|
|
3
|
-
import { IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowOpenDriveFromFileParams, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
|
|
3
|
+
import { IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowOpenDriveFromFileParams, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
|
|
4
4
|
import HoloFlow from './utils/holo-flow';
|
|
5
5
|
import MapInitializer from './utils/map-initializer';
|
|
6
6
|
import OpenDriveRenderer from './utils/open-drive-renderer';
|
|
@@ -63,6 +63,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
|
|
|
63
63
|
toggleTrafficObject: (params: IToggleTrafficInfoParams) => void;
|
|
64
64
|
toggleVehicleInfo: (contentType: string) => void;
|
|
65
65
|
addOverlays: (params: IOverlayParam) => Promise<import("../types").IResult>;
|
|
66
|
+
addMask: (params: IMaskParam) => void;
|
|
67
|
+
removeMask: () => void;
|
|
66
68
|
removeOverlaysByType: (types: string[]) => import("../types").IResult;
|
|
67
69
|
removeOverlaysById: (ids: string[]) => import("../types").IResult;
|
|
68
70
|
removeAllOverlays: () => import("../types").IResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),y=require("./stores/index.js");require("./style/index.css");const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),y=require("./stores/index.js");require("./style/index.css");const De=require("./utils/holo-flow/index.js"),Le=require("./utils/map-initializer.js"),O=require("./utils/open-drive-renderer/index.js"),C=require("./utils/overlay.js"),Ae=require("./utils/queue-length.js"),k=require("./utils/road-config-tool/index.js"),Ie=require("./utils/signal-control-area-controller/index.js"),be=require("./utils/traffic-flow.js"),qe={class:"gis-viewer"},Me={style:{position:"absolute",bottom:"10px",left:"10px"}},_e=o.defineComponent({__name:"gis-map",props:{config:{},assetsRoot:{}},emits:["mapLoaded","markerClick","mapClick"],setup(T,{expose:D,emit:L}){const p=o.ref(null);let c,l,i,r,n,a,m,t,s;const d=o.ref(!1);o.onMounted(async()=>{if(y.registerStore(),!p.value)return;document.addEventListener("keydown",g=>{g.ctrlKey&&g.key==="i"&&(d.value=!d.value)});const e=o.getCurrentInstance(),{$gisviewerAssetsRoot:u}=e.appContext.config.globalProperties,S=await(await fetch(h.config)).json();S.assetsRoot=h.assetsRoot||u;const ke=y.default.useAppDataStore;ke.mapConfig=S,l=new Le.default,c=await l.initialize({container:p.value,markerClickCallback:(g,w,v,Te)=>{f("markerClick",g,w,v,Te)},mapClickCallback:(g,w,v)=>{f("mapClick",g,w,v)}}),n=new De.default(c),await n.init(),f("mapLoaded")}),o.onUnmounted(()=>{s==null||s.clearSignalControlArea(),t==null||t.clearOpenDrive(),n==null||n.clearHoloTrace(),n==null||n.clearHoloSignal(),r==null||r.disconnectTrafficFlow()});const A=o.computed(()=>c),I=()=>{const e=y.default.useAppDataStore;e.saveTrackLog=!0},b=()=>{n.downloadTrackLog()},q=async e=>await l.setMapCenter(e),M=async e=>await l.setMapCamera(e),_=async e=>await l.lookAt(e),x=e=>l.setLayerVisibility(e),H=(e,u)=>l.requestCoordinateTransform(e,u),V=e=>{l.cancelCoordinateTransform(e)},N=e=>{l.setMapZoomRange(e)},B=e=>(i||(i=new k.default(c)),i.showLaneNumber(e)),E=()=>{i==null||i.clearLaneNumber()},j=async e=>(i||(i=new k.default(c)),await i.initializeSearch(e)),z=async()=>i==null?void 0:i.calCrossIndicatorArea(),P=async()=>{},Q=async(e,u)=>{r||(r=new be.default(c)),r.connectTrafficFlow(e,u)},F=()=>{r==null||r.disconnectTrafficFlow()},Z=e=>{n.handleVehicleTraceData(e)},K=()=>{n.clearHoloTrace()},U=e=>{n.setInterpolate(e)},G=async e=>{await n.handleSignalData(e)},J=()=>{n.clearHoloSignal()},W=e=>{r==null||r.toggleTrafficInfo(e),n.toggleTrafficInfo(e)},X=e=>{n.togglePause(e)},Y=e=>{r==null||r.toggleTrafficObject(e),n.toggleTrafficObject(e)},R=e=>{n.updatePanelContent(e)},$=async e=>(a||(a=new C.default(c)),a.addOverlays(e)),ee=e=>(a||(a=new C.default(c)),a.addMask(e)),te=()=>{a==null||a.removeMask()},ae=e=>a==null?void 0:a.removeOverlaysByType(e),ne=e=>a==null?void 0:a.removeOverlaysById(e),re=()=>a==null?void 0:a.removeAllOverlays(),se=()=>{a==null||a.showAllOverlays()},oe=e=>{m||(m=new Ae.default(c)),m.updateQueueLength(e)},ce=()=>{m==null||m.removeQueueLength()},ie=async(e,u)=>(t||(t=new O.default(c)),await t.showOpenDriveFromServer(e,u)),le=async e=>(t||(t=new O.default(c)),await t.clearOpenDrive(),await t.showOpenDriveFromFile(e)),ue=async()=>await(t==null?void 0:t.clearOpenDrive()),me=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地图"},pe=async e=>t?t.unselectSumo(e):{status:-1,message:"未加载OpenDrive地图"},de=async e=>t?await t.geometrySearch(e):{status:-1,message:"未加载OpenDrive地图"},fe=async e=>t?await t.getSumoInfo(e):{status:-1,message:"未加载OpenDrive地图"},we=async e=>t?await(t==null?void 0:t.splitLane(e)):{status:-1,message:"未加载OpenDrive地图"},ve=async()=>t?t==null?void 0:t.clearSplitLane():{status:-1,message:"未加载OpenDrive地图"},ye=e=>(s||(s=new Ie.default(c)),s.showSignalControlArea(e)),he=()=>{s==null||s.clearSignalControlArea()},Se=async e=>s?await s.locateSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Oe=async e=>s?await s.highlightSignalControlArea(e):{status:-1,message:"未加载信号控制区"},Ce=()=>s?s.resetHighlight():{status:-1,message:"未加载信号控制区"},h=T,f=L;return D({mapViewer:A,setLayerVisibility:x,setMapCenter:q,lookAt:_,setMapCamera:M,setMapZoomRange:N,requestCoordinateTransform:H,cancelCoordinateTransform:V,addOverlays:$,addMask:ee,removeMask:te,showAllOverlays:se,removeOverlaysByType:ae,removeOverlaysById:ne,removeAllOverlays:re,showLaneNumber:B,clearLaneNumber:E,initializeAreaTool:j,calCrossIndicatorArea:z,calRoadIndicatorArea:P,connectCarFlow:Q,disconnectCarFlow:F,handleHoloVehicleTraceData:Z,clearHoloTrace:K,handleHoloSignalData:G,clearHoloSignal:J,setInterpolate:U,toggleTrafficInfo:W,toggleTrafficObject:Y,toggleVehicleInfo:R,togglePause:X,updateQueueLength:oe,removeQueueLength:ce,showOpenDriveFromServer:ie,showOpenDriveFromFile:le,clearOpenDrive:ue,geometrySearchInOpenDrive:de,findSumoInOpenDrive:me,selectSumoInOpenDrive:ge,unselectSumoInOpenDrive:pe,getSumoInfo:fe,splitOpenDriveLane:we,clearSplitOpenDriveLane:ve,showSignalControlArea:ye,clearSignalControlArea:he,locateSignalControlArea:Se,highlightSignalControlArea:Oe,resetHighlightSignalControlArea:Ce}),(e,u)=>(o.openBlock(),o.createElementBlock("div",qe,[o.createElementVNode("div",{class:"gis-viewer-main",ref_key:"mapContainer",ref:p},[o.withDirectives(o.createElementVNode("div",Me,[o.createElementVNode("button",{style:{"margin-right":"10px"},onClick:I}," 开始记录 "),o.createElementVNode("button",{onClick:b},"下载日志")],512),[[o.vShow,d.value]])],512)]))}});exports.default=_e;
|
|
@@ -52,6 +52,8 @@ export declare const GisMap: import("@easyest/utils/dist/lib/withinstall").SFCWi
|
|
|
52
52
|
toggleTrafficObject: (params: import("../types").IToggleTrafficInfoParams) => void;
|
|
53
53
|
toggleVehicleInfo: (contentType: string) => void;
|
|
54
54
|
addOverlays: (params: import("../types").IOverlayParam) => Promise<import("../types").IResult>;
|
|
55
|
+
addMask: (params: import("../types").IMaskParam) => void;
|
|
56
|
+
removeMask: () => void;
|
|
55
57
|
removeOverlaysByType: (types: string[]) => import("../types").IResult;
|
|
56
58
|
removeOverlaysById: (ids: string[]) => import("../types").IResult;
|
|
57
59
|
removeAllOverlays: () => import("../types").IResult;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import View from '@arcgis/core/views/View';
|
|
2
1
|
import { IToggleTrafficInfoParams } from '../../../types';
|
|
3
2
|
export default class Index {
|
|
4
3
|
private readonly view;
|
|
5
4
|
private traceHoloFlow;
|
|
6
5
|
private signalHoloFlow;
|
|
7
|
-
constructor(view:
|
|
6
|
+
constructor(view: __esri.MapView | __esri.SceneView);
|
|
8
7
|
init(): Promise<void>;
|
|
9
8
|
/**
|
|
10
9
|
* 处理全息流轨迹数据
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../types/index.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../../types/index.js"),i=require("../../stores/index.js"),s=require("./signal-holo-flow.js"),n=require("./signal-holo-flow-lsr.js"),c=require("./trace-holo-flow.js");class r{constructor(e){this.view=e}async init(){this.traceHoloFlow=new c.default(this.view),await this.traceHoloFlow.init()}handleVehicleTraceData(e){this.traceHoloFlow.handleVehicleTraceData(e)}toggleTrafficObject(e){switch(e.name.toLowerCase()){case"groundVehicle".toLowerCase():this.traceHoloFlow.toggleGroundVehicle(e.visible);break;case"elevatedVehicle".toLowerCase():this.traceHoloFlow.toggleElevatedVehicle(e.visible);break}}clearHoloTrace(){this.traceHoloFlow.clearTrace()}toggleTrafficInfo(e){this.traceHoloFlow.toggleTrafficInfo(e)}togglePause(e){this.traceHoloFlow.togglePause(e)}updatePanelContent(e){let o=t.EVehiclePlateState.None;switch(e){case"none":o=t.EVehiclePlateState.None;break;case"plateNumber":o=t.EVehiclePlateState.PlateNumber;break;case"vehicleId":o=t.EVehiclePlateState.Id;break;case"mix":o=t.EVehiclePlateState.Mix;break}this.traceHoloFlow.updatePanelContent(o)}async handleSignalData(e){var o,l;if(!this.signalHoloFlow){const a=i.default.useAppDataStore;((l=(o=JSON.parse(JSON.stringify(a.mapConfig)).holoFlow)==null?void 0:o.signal)==null?void 0:l.style)==="LSR"?this.signalHoloFlow=new n.default(this.view):this.signalHoloFlow=new s.default(this.view),await this.signalHoloFlow.initializeLayer()}await this.signalHoloFlow.handleSignalData(e)}clearHoloSignal(){var e;(e=this.signalHoloFlow)==null||e.clearSignal()}setInterpolate(e){this.traceHoloFlow.setInterpolate(e)}downloadTrackLog(){this.traceHoloFlow.downloadLog()}}exports.default=r;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import SignalHoloFlow from './signal-holo-flow';
|
|
2
|
+
export default class LSRSignalHoloFlow extends SignalHoloFlow {
|
|
3
|
+
private stopLineLayer;
|
|
4
|
+
constructor(view: __esri.MapView | __esri.SceneView);
|
|
5
|
+
private stopLineMap;
|
|
6
|
+
initializeLayer(): Promise<void>;
|
|
7
|
+
handleSignalData(data: any): Promise<void>;
|
|
8
|
+
clearSignal(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("@arcgis/core/Graphic"),d=require("@arcgis/core/layers/GraphicsLayer"),h=require("./signal-holo-flow.js");class y extends h.default{constructor(e){super(e),this.stopLineLayer=new d,this.stopLineMap=new Map,this.view.map.add(this.stopLineLayer)}async initializeLayer(){var s,i;console.time("初始化停止线图层");let e=(i=(s=this.mapConfig.holoFlow)==null?void 0:s.signal)==null?void 0:i.stopLineLayer;if(!e)return;e=this.mapConfig.assetsRoot+"/"+e;const o=await(await fetch(e)).json();console.log(o.features.length),o.features.forEach(t=>{const{roadId:n,nodeId:r}=t.properties,{coordinates:l}=t.geometry,p=this.stopLineMap.get(r);p?p.set(n,l):this.stopLineMap.set(r,new Map([[n,l]]))}),console.timeEnd("初始化停止线图层"),console.log(this.stopLineMap.size)}async handleSignalData(e){const{crossId:a}=e,o=this.stopLineMap.get(a);o&&o.forEach((s,i)=>{const t=new c({geometry:{type:"polyline",paths:[s]},symbol:{type:"simple-line",color:[255,0,0],width:4}});this.stopLineLayer.add(t)})}clearSignal(){}}exports.default=y;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import View from '@arcgis/core/views/View';
|
|
2
1
|
export default class SignalHoloFlow {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
protected view: __esri.MapView | __esri.SceneView;
|
|
3
|
+
protected mapConfig: any;
|
|
5
4
|
/** 显示停止线的图层 */
|
|
6
5
|
private phaseLineLayer;
|
|
7
6
|
/** 每个路口的当前相位 */
|
|
@@ -11,7 +10,7 @@ export default class SignalHoloFlow {
|
|
|
11
10
|
private countdownWatchHandel;
|
|
12
11
|
private plateBackground;
|
|
13
12
|
private lastDataTime;
|
|
14
|
-
constructor(view:
|
|
13
|
+
constructor(view: __esri.MapView | __esri.SceneView);
|
|
15
14
|
/**
|
|
16
15
|
* 初始化相位线图层
|
|
17
16
|
* */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@arcgis/core/Graphic"),P=require("@arcgis/core/core/promiseUtils"),A=require("@arcgis/core/geometry"),J=require("@arcgis/core/geometry/geometryEngine"),C=require("@arcgis/core/layers/FeatureLayer"),I=require("@arcgis/core/layers/GraphicsLayer"),q=require("@turf/helpers"),O=require("@turf/line-slice-along"),b=require("axios"),E=require("md5"),M=require("pako"),T=require("vue"),H=require("../../stores/index.js"),R=require("../common-utils.js");function j(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 F=j(P),S=j(J),$=j(q);class D{constructor(e){this.junctionNames=new Map,this.projectName="",this.openDriveServer="",this.currentSectionCode="",this.selectedSectionIds=[],this.currentJunctionId="",this.view=e,this.laneLayer=new C({id:"OpenDriveLane",fields:[{name:"ObjectID",alias:"ObjectID",type:"oid"},{name:"id",alias:"编号",type:"string"},{name:"roadId",alias:"道路号",type:"string"},{name:"roadName",alias:"道路名称",type:"string"},{name:"sectionId",alias:"路段号",type:"string"},{name:"sectionIndex",alias:"路段序号",type:"string"},{name:"laneId",alias:"车道号",type:"string"},{name:"type",alias:"类型",type:"string"},{name:"sumoId",alias:"sumo编号",type:"string"},{name:"fromNode",alias:"起点路口",type:"string"},{name:"toNode",alias:"终点路口",type:"string"}],objectIdField:"ObjectID",geometryType:"polygon",spatialReference:{wkid:4326},source:[],outFields:["*"],renderer:{type:"unique-value",field:"type",defaultSymbol:{type:"simple-fill",color:[100,100,100],style:"solid",outline:{color:"white",width:1}},uniqueValueInfos:[{value:"shoulder",label:"路肩",symbol:{type:"simple-fill",color:"#008000",style:"solid",outline:{color:"white",width:1}}},{value:"border",label:"路沿",symbol:{type:"simple-fill",color:"#DCDCDC",style:"solid",outline:{color:"white",width:1}}},{value:"driving",label:"机动车道",symbol:{type:"simple-fill",color:[47,79,79,.8],style:"solid",outline:{color:"white",width:1}}},{value:"none",label:"无",symbol:{type:"simple-fill",color:[111,120,135],style:"none",outline:{color:"white",width:1}}},{value:"restricted",label:"禁行区",symbol:{type:"simple-fill",color:"yellow",style:"solid",outline:{color:"yellow",width:2}}},{value:"parking",label:"停车区",symbol:{type:"simple-fill",color:[115,115,115],style:"solid",outline:{color:"white",width:1}}},{value:"median",label:"中央隔离带",symbol:{type:"simple-fill",color:"#008000",style:"solid",outline:{color:"white",width:1}}},{value:"biking",label:"非机动车道",symbol:{type:"simple-fill",color:"#D3D3D3",style:"solid",outline:{color:"white",width:1}}},{value:"sidewalk",label:"人行道",symbol:{type:"simple-fill",color:"#C0C0C0",style:"solid",outline:{color:"white",width:1}}},{value:"junction",label:"路口区域",symbol:{type:"simple-fill",color:"#2F4F4F",style:"solid",outline:{color:"white",width:1}}},{value:"selected",label:"选中车道",symbol:{type:"simple-fill",color:[141,168,211],style:"solid",outline:{color:"white",width:1}}}]}}),this.roadNameLayer=new C({id:"OpenDriveRoadName",fields:[{name:"ObjectID",alias:"ObjectID",type:"oid"},{name:"roadId",alias:"道路号",type:"string"},{name:"roadName",alias:"道路名称",type:"string"}],objectIdField:"ObjectID",geometryType:"polyline",spatialReference:{wkid:4326},source:[],renderer:{type:"simple",symbol:{type:"simple-line",style:"solid",color:[0,0,0,0],width:1}},labelingInfo:[{symbol:{type:"text",color:"black",haloColor:"white",haloSize:1,font:{size:12,family:"sans-serif"}},labelPlacement:this.view.type==="2d"?"center-along":void 0,labelExpressionInfo:{expression:"$feature.roadName"}}]}),this.junctionLayer=new I({id:"OpenDriveJunction"}),this.sectionLayer=new I({id:"OpenDriveSection"}),this.highlightLayer=new I({id:"OpenDriveHighlight"}),this.flashLayer=new I({id:"OpenDriveFlash"}),this.drawLayer=new I({id:"Draw"}),this.splitLaneLayer=new I({id:"SplitLane"}),this.view.map.addMany([this.laneLayer,this.junctionLayer,this.sectionLayer,this.roadNameLayer,this.highlightLayer,this.flashLayer,this.drawLayer,this.splitLaneLayer])}static getInstance(e){return this.instance||(this.instance=new D(e)),this.instance}async makeMd5FromFile(e){try{const i=await(await fetch(e)).text();return{status:0,message:"ok",result:E(i)}}catch(t){return{status:-1,message:t.message}}}async showOpenDriveFromFile(e){var m,p;this.openDriveClickCallback=e.selectedCallback,console.time("md5用时");const t=await this.makeMd5FromFile(e.file);if(t.status!==0)return t;this.projectName=t.result,console.timeEnd("md5用时"),this.openDriveServer=e.server,await this.makeMd5FromFile(e.file);const i=`http://${this.openDriveServer}/api/openDrive/uploadXodr`;let n;try{n=await b.post(i,{},{params:{url:e.file,projectName:this.projectName}})}catch(g){return{status:-1,message:g.message}}if(n.status!==200)return{status:-1,message:n.statusText};console.time("渲染用时");const s=n.data.result.geoSetting;R.default.setGeoData(s.geoReference,s.offsetX,s.offsetY);let c=n.data.result.json;c.startsWith(window.location.protocol)||(c=`${window.location.protocol}//${e.server}${c}`);const a=await(await fetch(c)).arrayBuffer(),o=M.inflate(a,{to:"string"}),l=JSON.parse(o);await this.showAllLanes(l,((m=e.options)==null?void 0:m.showJunctionLane)||!1,((p=e.options)==null?void 0:p.showRoadName)||!0);const d=n.data.result.junctions;this.showJunction(d),e.options&&e.options.centerMap!==!1&&await this.view.goTo(this.allLaneGraphics),this.mouseMoveHandler||this.monitorMouseMove(),this.mouseClickHandler||this.monitorMouseClick();const h=H.default.useAppDataStore;return T.watch(()=>h.isSketching,()=>{var g,f;h.isSketching?((g=this.mouseMoveHandler)==null||g.remove(),this.mouseMoveHandler=void 0,(f=this.mouseClickHandler)==null||f.remove(),this.mouseClickHandler=void 0):(this.monitorMouseMove(),this.monitorMouseClick())}),console.timeEnd("渲染用时"),{status:0,message:"ok"}}async showOpenDriveFromServer(e,t){const i=`http://${e}/api/openDrive/analyzeXodr`,n=await b.get(i,{headers:{projectName:t},params:{analyze:!1,compressed:!0}});if(n.status!==200)throw new Error(`OpenDriveRenderer: ${n.statusText}`);let s=n.data.result.json;s.startsWith(window.location.protocol)||(s=`${window.location.protocol}//${e}${s}`);const r=await(await fetch(s)).arrayBuffer(),a=M.inflate(r,{to:"string"}),o=JSON.parse(a);return await this.showAllLanes(o,!1,!1),{status:0,message:"ok"}}async showAllLanes(e,t,i){const n=await this.laneLayer.queryFeatures();return n.features.length>0&&this.laneLayer.applyEdits({deleteFeatures:n.features}),this.roadNameLayer.visible=i,new Promise(s=>{let c=0;this.allLaneGraphics=[],this.allRefLineGraphics=[];const r=[];for(const o of e){if(!t&&o.junction!=="-1")continue;const{id:l,refLine:d}=o;let h=o.name;h.includes("(")&&(h=h.slice(0,h.indexOf("("))),h=h.replace(/(.)/g,"$1 ");const m=new y({geometry:{type:"polyline",paths:[d]},attributes:{ObjectID:c++,roadId:l,roadName:h}});this.allRefLineGraphics.push(m),o.laneSections.sort((p,g)=>Number(p.id)-Number(g.id));for(let p=0;p<o.laneSections.length;p++){const g=o.laneSections[p],f=Number(g.id);for(const u of g.lanePaths){const w=Number(u.id);if(w===0)continue;const v=u.type,x=[...u.outerPath],N=u.innerPath.concat(x.reverse());if(N.length<=3){console.warn(`lane ${w} has less than 3 points`);continue}N.push(u.innerPath[0]);const k=new A.Polygon({rings:[N]});if(k){const G=new y({geometry:k,attributes:{ObjectID:c++,id:`${l}+${f}+${w}`,fromNode:o.fromNode,toNode:o.toNode,roadId:String(l),roadName:o.name,sectionId:String(f),sectionIndex:p,laneId:w,type:v,sumoId:"",leftLine:u.innerPath,rightLine:u.outerPath}});this.allLaneGraphics.push(G),r.push(G)}}}}const a=setInterval(()=>{if(r.length>0||this.allRefLineGraphics.length>0){if(r.length>0){const o=r.splice(0,100);this.laneLayer.applyEdits({addFeatures:o})}if(this.allRefLineGraphics.length>0){const o=this.allRefLineGraphics.splice(0,10);this.roadNameLayer.applyEdits({addFeatures:o})}}else clearInterval(a),s()},10)})}showJunction(e){const t=[];for(const i of e){if(!i)continue;this.junctionNames.set(i.id,i.name),i.nodeType=i.type;const n=new y({geometry:{type:"point",x:i.coordinates[0],y:i.coordinates[1]},attributes:{...i,selected:!1,type:"OpenDriveJunction"},symbol:{type:"picture-marker",url:i.crossId?"/GisViewerAssets/Images/point_green.png":"/GisViewerAssets/Images/point_yellow.png",width:30,height:30},popupTemplate:{title:i.name,content:[{type:"fields",fieldInfos:[{fieldName:"id",label:"路口编号"},{fieldName:"crossId",label:"信号机编号"}]}]}});t.push(n)}this.junctionLayer.addMany(t)}monitorMouseMove(){const e=F.debounce(async t=>{var c;const n=(c=(await this.view.hitTest(t,{include:[this.laneLayer,this.junctionLayer]})).results)==null?void 0:c.filter(r=>r.type==="graphic");if(n.length===0){this.currentSectionCode!==""&&(this.currentSectionCode="",this.highlightLayer.removeAll()),this.currentJunctionId!==""&&(this.currentJunctionId=""),this.view.closePopup();return}const s=n[0];if(this.hitGraphic=s.graphic,s.layer.id==="OpenDriveLane"){const r=`${this.hitGraphic.getAttribute("roadId")}+${this.hitGraphic.getAttribute("sectionId")}`;if(this.currentSectionCode===r||this.selectedSectionIds.includes(r)||this.sectionLayer.graphics.findIndex(u=>u.getAttribute("id")===r)>=0)return;this.currentSectionCode=r;const o=this.allLaneGraphics.filter(u=>`${u.attributes.roadId}+${u.attributes.sectionId}`===r),l=S.union(o.map(u=>u.geometry)),d=this.hitGraphic.getAttribute("fromNode"),h=this.hitGraphic.getAttribute("toNode"),m=this.junctionNames.get(d)||d,p=this.junctionNames.get(h)||h,g=new y({geometry:l,symbol:{type:"simple-fill",color:[0,255,255,.5],style:"solid",outline:{color:[0,255,255],width:1}},attributes:{type:"OpenDriveSection",id:r,selected:!1,fromNodeName:m,toNodeName:p,laneCount:o.length},popupTemplate:{title:this.hitGraphic.getAttribute("roadName"),content:[{type:"fields",fieldInfos:[{fieldName:"fromNodeName",label:"起点路口"},{fieldName:"toNodeName",label:"终点路口"},{fieldName:"laneCount",label:"车道数量"}]}]}});this.highlightLayer.removeAll(),this.highlightLayer.add(g);const f=this.view.toMap(t);this.view.openPopup({features:[g],location:f})}else if(s.layer.id==="OpenDriveJunction"){const r=this.hitGraphic.getAttribute("id");if(r===this.currentJunctionId)return;this.currentJunctionId=r,this.view.openPopup({features:[this.hitGraphic],location:this.hitGraphic.geometry})}});this.mouseMoveHandler=this.view.on("pointer-move",async t=>{e(t).catch(()=>{})})}monitorMouseClick(){const e=F.debounce(async t=>{var a;const n=(a=(await this.view.hitTest(t,{include:[this.highlightLayer,this.junctionLayer,this.sectionLayer]})).results)==null?void 0:a.filter(o=>o.type==="graphic");if(n.length===0)return;const s=n[0].graphic,c=s.getAttribute("type"),r=s.getAttribute("id");if(c==="OpenDriveJunction")if(s.getAttribute("selected")===!1){const o=`http://${this.openDriveServer}/api/sumo/getSumoJunction`,l=await b.get(o,{params:{id:r,projectName:this.projectName}});l.status===200&&l.data.status===0&&(this.openDriveClickCallback&&this.openDriveClickCallback({type:"OpenDriveJunction",id:r,details:l.data.result}),s.setAttribute("selected",!0),s.symbol.url="/GisViewerAssets/Images/point_red.png",this.increasePictureMarkerSize(s,50))}else{this.openDriveClickCallback&&this.openDriveClickCallback({type:"OpenDriveJunction",id:r,details:void 0}),s.setAttribute("selected",!1);const o=s.getAttribute("crossId");s.symbol.url=o?"/GisViewerAssets/Images/point_green.png":"/GisViewerAssets/Images/point_yellow.png",this.decreasePictureMarkerSize(s,30)}else if(c==="OpenDriveSection")if(s.layer.id==="OpenDriveHighlight"){this.highlightLayer.remove(s),this.sectionLayer.add(s),s.setAttribute("selected",!0),this.selectedSectionIds.push(r);const o=`http://${this.openDriveServer}/api/sumo/getSumoEdge`,l=await b.get(o,{params:{id:r,projectName:this.projectName}});if(l.status===200&&l.data.status===0&&this.openDriveClickCallback){const d=l.data.result.obj_id;s.setAttribute("edgeId",d),this.openDriveClickCallback({type:"OpenDriveSection",id:d,details:l.data.result})}}else this.sectionLayer.remove(s),this.selectedSectionIds=this.selectedSectionIds.filter(o=>o!==r),this.openDriveClickCallback&&this.openDriveClickCallback({type:"OpenDriveSection",id:s.getAttribute("edgeId"),details:void 0})});this.mouseClickHandler=this.view.on("immediate-click",async t=>{e(t).catch(()=>{})})}increasePictureMarkerSize(e,t){const i=setInterval(()=>{const n=e.symbol,s=n.width;s<t?e.symbol={type:"picture-marker",url:n.url,width:s+1,height:s+1}:clearInterval(i)},20)}decreasePictureMarkerSize(e,t){const i=setInterval(()=>{const n=e.symbol,s=n.width;s>t?e.symbol={type:"picture-marker",url:n.url,width:s-1,height:s-1}:clearInterval(i)},20)}async getSumoInfo(e){switch(e.type){case"junction":{const t=`http://${this.openDriveServer}/api/sumo/getSumoJunction`,i=await b.get(t,{params:{id:e.id,projectName:this.projectName}});return i.status===200?i.data:{status:-1,message:`路口信息查询失败: ${e.id}`}}case"edge":{const t=e.id.split("#");let i=t[0];i.startsWith("-")&&(i=i.slice(1));let n=0;t.length===2&&(n=Number(t[1]));const s=this.allLaneGraphics.find(c=>c.getAttribute("roadId")===i&&c.getAttribute("sectionIndex")===n);if(s){const c=`${i}+${s.getAttribute("sectionId")}`,r=`http://${this.openDriveServer}/api/sumo/getSumoEdge`,a=await b.get(r,{params:{id:c,projectName:this.projectName}});return a.status===200?a.data:{status:-1,message:`路段信息查询失败: ${c}`}}else return{status:-1,message:"未知类型"}}default:return{status:-1,message:"未知类型"}}}async clearOpenDrive(){var t,i;let e=await this.laneLayer.queryFeatures();e.features.length>0&&await this.laneLayer.applyEdits({deleteFeatures:e.features}),e=await this.roadNameLayer.queryFeatures(),e.features.length>0&&await this.roadNameLayer.applyEdits({deleteFeatures:e.features}),this.highlightLayer.removeAll(),this.junctionLayer.removeAll(),this.sectionLayer.removeAll(),this.flashLayer.removeAll(),(t=this.mouseMoveHandler)==null||t.remove(),this.mouseMoveHandler=void 0,(i=this.mouseClickHandler)==null||i.remove(),this.mouseClickHandler=void 0}async findSumo(e){const{type:t,id:i}=e,n=e.flash===void 0?!0:e.flash;if(t==="junction")return await this.findJunction(i,n);if(t==="edge"){const s=i.split("_");if(s.length>2)return{status:-1,message:"id格式错误"};const c=s.length===2?Number(s[1]):void 0,r=s[0].split("#");if(r.length>2)return{status:-1,message:"id格式错误"};const a=r[0],o=r.length===2?Number(r[1]):void 0;return await this.findLane({roadsectId:a,segmentId:o,laneId:c,flash:n})}else return{status:-1,message:"未知类型"}}async findJunction(e,t){const i=this.junctionLayer.graphics.find(n=>n.attributes.id===e);if(!i)return{status:-1,message:"未找到。请检查路口编号"};if(t){const n=new y({geometry:i.geometry,symbol:{type:"simple-marker",style:"circle",size:30,color:[255,0,0,.6],outline:{color:"red",width:1}}});this.flashGraphic(n)}return await this.view.goTo(i.geometry,{duration:1e3}),{status:0,message:"ok"}}async findLane(e){let{roadsectId:t,segmentId:i,laneId:n}=e;t.startsWith("-")&&(t=t.slice(1));let s=this.allLaneGraphics.filter(a=>a.attributes.roadId===t);if(s.length===0)return{status:-1,message:"未找到。请检查路段编号"};if(i!==void 0){const a=[];if(s.forEach(o=>{const l=Number(o.attributes.sectionId);a.indexOf(l)===-1&&a.push(l)}),a.sort((o,l)=>o-l),i>a.length-1)return{status:-1,message:"未找到。请检查基本段编号"};i=a[i],s=s.filter(o=>Number(o.attributes.sectionId)===i)}if(n!==void 0){const a=[];if(s.forEach(o=>{const l=Number(o.attributes.laneId);a.indexOf(l)===-1&&a.push(l)}),a.sort((o,l)=>o-l),n>a.length-1)return{status:-1,message:"未找到。请检查车道编号"};n=a[n],s=s.filter(o=>Number(o.attributes.laneId)===n)}const c=s.map(a=>a.geometry),r=S.union(c);if(e.flash){const a=new y({geometry:r,symbol:{type:"simple-fill",color:[255,0,0,.5],style:"solid",outline:{color:"red",width:0}}});this.flashGraphic(a)}return await this.view.goTo(r,{duration:1e3}),{status:0,message:"ok"}}flashGraphic(e){this.flashLayer.removeAll(),this.flashLayer.add(e);let t=0,i=!0;const n=setInterval(()=>{i?(this.flashLayer.opacity-=.02,this.flashLayer.opacity<=.1&&(i=!1,t++)):(this.flashLayer.opacity+=.02,this.flashLayer.opacity>=1&&(i=!0)),t>=5&&(this.flashLayer.removeAll(),this.flashLayer.opacity=1,clearInterval(n))},10)}unselectSumo(e){if((!e||e.type==="junction")&&this.junctionLayer.graphics.forEach(t=>{if((!e||!e.id||e.id===""||e.id===t.getAttribute("id"))&&t.getAttribute("selected")){t.setAttribute("selected",!1);const i=t.getAttribute("crossId");t.symbol.url=i?"/GisViewerAssets/Images/point_green.png":"/GisViewerAssets/Images/point_yellow.png",this.decreasePictureMarkerSize(t,30)}}),!e||e.type==="edge"){let t;!e||!e.id||e.id===""?t=this.sectionLayer.graphics.toArray():t=this.sectionLayer.graphics.filter(i=>i.getAttribute("edgeId")===e.id).toArray(),t.length>0&&(t.forEach(i=>{const n=i.getAttribute("id");this.selectedSectionIds=this.selectedSectionIds.filter(s=>s!==n)}),this.sectionLayer.removeMany(t))}return{status:0,message:"ok"}}selectSumo(e){switch(e.type){case"junction":return this.junctionLayer.graphics.forEach(t=>{if(e.id===t.getAttribute("id"))return t.setAttribute("selected",!0),t.symbol.url="/GisViewerAssets/Images/point_red.png",this.increasePictureMarkerSize(t,50),{status:0,message:"ok"}}),{status:-1,message:"未找到路口"};case"edge":{const t=e.id.split("#");let i=String(t[0]);i.startsWith("-")&&(i=i.slice(1));let n=0;t.length===2&&(n=Number(t[1]));let s=[];if(t.length===1?s=this.allLaneGraphics.filter(c=>c.getAttribute("roadId")===i):t.length===2&&(s=this.allLaneGraphics.filter(c=>c.getAttribute("roadId")===i&&c.getAttribute("sectionIndex")===n)),s.length>0){const c=new Map;return s.forEach(r=>{const a=r.getAttribute("roadId")+"+"+r.getAttribute("sectionId");this.selectedSectionIds.includes(a)||this.selectedSectionIds.push(a);let o=c.get(a);o?o.push(r.geometry):(o=[r.geometry],c.set(a,o))}),c.forEach((r,a)=>{const o=S.union(r),l=new y({geometry:o,symbol:{type:"simple-fill",color:[0,255,255,.5],style:"solid",outline:{color:[0,255,255],width:1}},attributes:{type:"OpenDriveSection",id:a,edgeId:e.id,selected:!0}});this.sectionLayer.add(l)}),{status:0,message:"ok"}}else return{status:-1,message:"未找到路段"}}default:return{status:-1,message:"未知类型"}}}async geometrySearch(e){const t=new A.Polygon({rings:[e]}),i=await this.laneLayer.queryFeatures({geometry:t,outFields:["*"]}),n=[],s=[];for(const a of i.features){const o=a.getAttribute("roadId"),l=a.getAttribute("sectionIndex"),d=`${o}#${l}`;if(n.indexOf(d)===-1){n.push(d),this.selectSumo({type:"edge",id:d});const h=`http://${this.openDriveServer}/api/sumo/getSumoEdge`,m=await b.get(h,{params:{id:`${o}+${a.getAttribute("sectionId")}`,projectName:this.projectName}});m.status===200&&m.data.status===0&&s.push(m.data.result)}}const c=this.junctionLayer.graphics.filter(a=>{const o=a.geometry;return S.contains(t,o)}),r=[];for(const a of c){const o=a.getAttribute("id");this.selectSumo({type:"junction",id:o});const l=`http://${this.openDriveServer}/api/sumo/getSumoJunction`,d=await b.get(l,{params:{id:o,projectName:this.projectName}});d.status===200&&d.data.status===0&&r.push(d.data.result)}return{status:0,message:"ok",result:{junctions:r,edges:s}}}async splitLane(e){const i=e.id.split("_");if(i.length!==2)return{status:-1,message:"车道编号格式错误"};const n=Number(i[1]),s=i[0].split("#"),c=s.length===2?Number(s[1]):0;let r=s[0];r.startsWith("-")&&(r=r.slice(1));const a=this.allLaneGraphics.filter(v=>v.getAttribute("roadId")===r&&v.getAttribute("sectionIndex")===c);if(a.length===0)return{status:-1,message:"未找到路段"};const o=a.length-n,l=a.find(v=>Math.abs(v.getAttribute("laneId"))===o);if(!l)return{status:-1,message:"未找到车道"};const d=e.start||0,h=e.end||100,m=$.lineString(l.getAttribute("leftLine")),p=O.lineSliceAlong(m,d,h,{units:"meters"}),g=$.lineString(l.getAttribute("rightLine")),f=O.lineSliceAlong(g,d,h,{units:"meters"}),u=p.geometry.coordinates.concat(f.geometry.coordinates.reverse());u.push(u[u.length-1]);const w=new y({geometry:new A.Polygon({rings:[u]}),attributes:{ObjectID:l.getAttribute("ObjectID"),id:l.getAttribute("id"),fromNode:l.getAttribute("fromNode"),toNode:l.getAttribute("toNode"),roadId:l.getAttribute("roadId"),roadName:l.getAttribute("roadName"),sectionId:l.getAttribute("sectionId"),sectionIndex:l.getAttribute("sectionIndex"),laneId:l.getAttribute("laneId"),type:l.getAttribute("type"),sumoId:l.getAttribute("sumoId"),leftLine:p.geometry.coordinates,rightLine:f.geometry.coordinates},symbol:{type:"simple-fill",color:[255,0,0,.8],outline:{color:"red"}}});return this.splitLaneLayer.add(w),this.view.goTo(w),{status:0,message:"ok",result:e}}clearSplitLane(){this.splitLaneLayer.removeAll()}}exports.default=D;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@arcgis/core/Graphic"),P=require("@arcgis/core/core/promiseUtils"),N=require("@arcgis/core/geometry"),q=require("@arcgis/core/geometry/geometryEngine"),C=require("@arcgis/core/layers/FeatureLayer"),v=require("@arcgis/core/layers/GraphicsLayer"),J=require("@turf/helpers"),O=require("@turf/line-slice-along"),b=require("axios"),E=require("fast-xml-parser"),R=require("md5"),M=require("pako"),T=require("vue"),H=require("../../stores/index.js"),_=require("../common-utils.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 $=D(P),S=D(q),x=D(J);class j{constructor(e){this.junctionNames=new Map,this.projectName="",this.openDriveServer="",this.currentSectionCode="",this.selectedSectionIds=[],this.currentJunctionId="",this.view=e,this.laneLayer=new C({id:"OpenDriveLane",fields:[{name:"ObjectID",alias:"ObjectID",type:"oid"},{name:"id",alias:"编号",type:"string"},{name:"roadId",alias:"道路号",type:"string"},{name:"roadName",alias:"道路名称",type:"string"},{name:"sectionId",alias:"路段号",type:"string"},{name:"sectionIndex",alias:"路段序号",type:"string"},{name:"laneId",alias:"车道号",type:"string"},{name:"type",alias:"类型",type:"string"},{name:"sumoId",alias:"sumo编号",type:"string"},{name:"fromNode",alias:"起点路口",type:"string"},{name:"toNode",alias:"终点路口",type:"string"}],objectIdField:"ObjectID",geometryType:"polygon",spatialReference:{wkid:4326},source:[],outFields:["*"],renderer:{type:"unique-value",field:"type",defaultSymbol:{type:"simple-fill",color:[100,100,100],style:"solid",outline:{color:"white",width:1}},uniqueValueInfos:[{value:"shoulder",label:"路肩",symbol:{type:"simple-fill",color:"#008000",style:"solid",outline:{color:"white",width:1}}},{value:"border",label:"路沿",symbol:{type:"simple-fill",color:"#DCDCDC",style:"solid",outline:{color:"white",width:1}}},{value:"driving",label:"机动车道",symbol:{type:"simple-fill",color:[47,79,79,.8],style:"solid",outline:{color:"white",width:1}}},{value:"none",label:"无",symbol:{type:"simple-fill",color:[111,120,135],style:"none",outline:{color:"white",width:1}}},{value:"restricted",label:"禁行区",symbol:{type:"simple-fill",color:"yellow",style:"solid",outline:{color:"yellow",width:2}}},{value:"parking",label:"停车区",symbol:{type:"simple-fill",color:[115,115,115],style:"solid",outline:{color:"white",width:1}}},{value:"median",label:"中央隔离带",symbol:{type:"simple-fill",color:"#008000",style:"solid",outline:{color:"white",width:1}}},{value:"biking",label:"非机动车道",symbol:{type:"simple-fill",color:"#D3D3D3",style:"solid",outline:{color:"white",width:1}}},{value:"sidewalk",label:"人行道",symbol:{type:"simple-fill",color:"#C0C0C0",style:"solid",outline:{color:"white",width:1}}},{value:"junction",label:"路口区域",symbol:{type:"simple-fill",color:"#2F4F4F",style:"solid",outline:{color:"white",width:1}}},{value:"selected",label:"选中车道",symbol:{type:"simple-fill",color:[141,168,211],style:"solid",outline:{color:"white",width:1}}}]}}),this.roadNameLayer=new C({id:"OpenDriveRoadName",fields:[{name:"ObjectID",alias:"ObjectID",type:"oid"},{name:"roadId",alias:"道路号",type:"string"},{name:"roadName",alias:"道路名称",type:"string"}],objectIdField:"ObjectID",geometryType:"polyline",spatialReference:{wkid:4326},source:[],renderer:{type:"simple",symbol:{type:"simple-line",style:"solid",color:[0,0,0,0],width:1}},labelingInfo:[{symbol:{type:"text",color:"black",haloColor:"white",haloSize:1,font:{size:12,family:"sans-serif"}},labelPlacement:this.view.type==="2d"?"center-along":void 0,labelExpressionInfo:{expression:"$feature.roadName"}}]}),this.junctionLayer=new v({id:"OpenDriveJunction"}),this.sectionLayer=new v({id:"OpenDriveSection"}),this.highlightLayer=new v({id:"OpenDriveHighlight"}),this.flashLayer=new v({id:"OpenDriveFlash"}),this.drawLayer=new v({id:"Draw"}),this.splitLaneLayer=new v({id:"SplitLane"}),this.borderLayer=new v({id:"OpenDriveBorder"}),this.view.map.addMany([this.laneLayer,this.junctionLayer,this.sectionLayer,this.roadNameLayer,this.highlightLayer,this.flashLayer,this.drawLayer,this.splitLaneLayer,this.borderLayer])}static getInstance(e){return this.instance||(this.instance=new j(e)),this.instance}async makeMd5FromFile(e){var t;try{const r=await(await fetch(e)).text(),n=(t=new E.XMLParser({ignoreAttributes:!1,allowBooleanAttributes:!0}).parse(r).OpenDRIVE.userData)==null?void 0:t.border;return{status:0,message:"ok",result:{md5:R(r),border:n}}}catch(i){return{status:-1,message:i.message}}}async showOpenDriveFromFile(e){var m,p;this.openDriveClickCallback=e.selectedCallback,console.time("md5用时");const t=await this.makeMd5FromFile(e.file);if(t.status!==0)return t;this.projectName=t.result.md5,console.timeEnd("md5用时"),console.log(t.result.border),this.openDriveServer=e.server;const i=`http://${this.openDriveServer}/api/openDrive/uploadXodr`;let r;try{r=await b.post(i,{},{params:{url:e.file,projectName:this.projectName}})}catch(g){return{status:-1,message:g.message}}if(r.status!==200)return{status:-1,message:r.statusText};console.time("渲染用时");const s=r.data.result.geoSetting;_.default.setGeoData(s.geoReference,s.offsetX,s.offsetY);let c=r.data.result.json;c.startsWith(window.location.protocol)||(c=`${window.location.protocol}//${e.server}${c}`);const a=await(await fetch(c)).arrayBuffer(),o=M.inflate(a,{to:"string"}),l=JSON.parse(o);await this.showAllLanes(l,((m=e.options)==null?void 0:m.showJunctionLane)||!1,((p=e.options)==null?void 0:p.showRoadName)||!0);const d=r.data.result.junctions;this.showJunction(d),e.options&&e.options.centerMap!==!1&&await this.view.goTo(this.allLaneGraphics),this.mouseMoveHandler||this.monitorMouseMove(),this.mouseClickHandler||this.monitorMouseClick();const h=H.default.useAppDataStore;return T.watch(()=>h.isSketching,()=>{var g,f;h.isSketching?((g=this.mouseMoveHandler)==null||g.remove(),this.mouseMoveHandler=void 0,(f=this.mouseClickHandler)==null||f.remove(),this.mouseClickHandler=void 0):(this.monitorMouseMove(),this.monitorMouseClick())}),console.timeEnd("渲染用时"),{status:0,message:"ok"}}async showOpenDriveFromServer(e,t){const i=`http://${e}/api/openDrive/analyzeXodr`,r=await b.get(i,{headers:{projectName:t},params:{analyze:!1,compressed:!0}});if(r.status!==200)throw new Error(`OpenDriveRenderer: ${r.statusText}`);let s=r.data.result.json;s.startsWith(window.location.protocol)||(s=`${window.location.protocol}//${e}${s}`);const n=await(await fetch(s)).arrayBuffer(),a=M.inflate(n,{to:"string"}),o=JSON.parse(a);return await this.showAllLanes(o,!1,!1),{status:0,message:"ok"}}async showAllLanes(e,t,i){const r=await this.laneLayer.queryFeatures();return r.features.length>0&&this.laneLayer.applyEdits({deleteFeatures:r.features}),this.roadNameLayer.visible=i,new Promise(s=>{let c=0;this.allLaneGraphics=[],this.allRefLineGraphics=[];const n=[];for(const o of e){if(!t&&o.junction!=="-1")continue;const{id:l,refLine:d}=o;let h=o.name;h.includes("(")&&(h=h.slice(0,h.indexOf("("))),h=h.replace(/(.)/g,"$1 ");const m=new y({geometry:{type:"polyline",paths:[d]},attributes:{ObjectID:c++,roadId:l,roadName:h}});this.allRefLineGraphics.push(m),o.laneSections.sort((p,g)=>Number(p.id)-Number(g.id));for(let p=0;p<o.laneSections.length;p++){const g=o.laneSections[p],f=Number(g.id);for(const u of g.lanePaths){const w=Number(u.id);if(w===0)continue;const I=u.type,F=[...u.outerPath],A=u.innerPath.concat(F.reverse());if(A.length<=3){console.warn(`lane ${w} has less than 3 points`);continue}A.push(u.innerPath[0]);const k=new N.Polygon({rings:[A]});if(k){const G=new y({geometry:k,attributes:{ObjectID:c++,id:`${l}+${f}+${w}`,fromNode:o.fromNode,toNode:o.toNode,roadId:String(l),roadName:o.name,sectionId:String(f),sectionIndex:p,laneId:w,type:I,sumoId:"",leftLine:u.innerPath,rightLine:u.outerPath}});this.allLaneGraphics.push(G),n.push(G)}}}}const a=setInterval(()=>{if(n.length>0||this.allRefLineGraphics.length>0){if(n.length>0){const o=n.splice(0,100);this.laneLayer.applyEdits({addFeatures:o})}if(this.allRefLineGraphics.length>0){const o=this.allRefLineGraphics.splice(0,10);this.roadNameLayer.applyEdits({addFeatures:o})}}else clearInterval(a),s()},10)})}showJunction(e){const t=[];for(const i of e){if(!i)continue;this.junctionNames.set(i.id,i.name),i.nodeType=i.type;const r=new y({geometry:{type:"point",x:i.coordinates[0],y:i.coordinates[1]},attributes:{...i,selected:!1,type:"OpenDriveJunction"},symbol:{type:"picture-marker",url:i.crossId?"/GisViewerAssets/Images/point_green.png":"/GisViewerAssets/Images/point_yellow.png",width:30,height:30},popupTemplate:{title:i.name,content:[{type:"fields",fieldInfos:[{fieldName:"id",label:"路口编号"},{fieldName:"crossId",label:"信号机编号"}]}]}});t.push(r)}this.junctionLayer.addMany(t)}monitorMouseMove(){const e=$.debounce(async t=>{var c;const r=(c=(await this.view.hitTest(t,{include:[this.laneLayer,this.junctionLayer]})).results)==null?void 0:c.filter(n=>n.type==="graphic");if(r.length===0){this.currentSectionCode!==""&&(this.currentSectionCode="",this.highlightLayer.removeAll()),this.currentJunctionId!==""&&(this.currentJunctionId=""),this.view.closePopup();return}const s=r[0];if(this.hitGraphic=s.graphic,s.layer.id==="OpenDriveLane"){const n=`${this.hitGraphic.getAttribute("roadId")}+${this.hitGraphic.getAttribute("sectionId")}`;if(this.currentSectionCode===n||this.selectedSectionIds.includes(n)||this.sectionLayer.graphics.findIndex(u=>u.getAttribute("id")===n)>=0)return;this.currentSectionCode=n;const o=this.allLaneGraphics.filter(u=>`${u.attributes.roadId}+${u.attributes.sectionId}`===n),l=S.union(o.map(u=>u.geometry)),d=this.hitGraphic.getAttribute("fromNode"),h=this.hitGraphic.getAttribute("toNode"),m=this.junctionNames.get(d)||d,p=this.junctionNames.get(h)||h,g=new y({geometry:l,symbol:{type:"simple-fill",color:[0,255,255,.5],style:"solid",outline:{color:[0,255,255],width:1}},attributes:{type:"OpenDriveSection",id:n,selected:!1,fromNodeName:m,toNodeName:p,laneCount:o.length},popupTemplate:{title:this.hitGraphic.getAttribute("roadName"),content:[{type:"fields",fieldInfos:[{fieldName:"fromNodeName",label:"起点路口"},{fieldName:"toNodeName",label:"终点路口"},{fieldName:"laneCount",label:"车道数量"}]}]}});this.highlightLayer.removeAll(),this.highlightLayer.add(g);const f=this.view.toMap(t);this.view.openPopup({features:[g],location:f})}else if(s.layer.id==="OpenDriveJunction"){const n=this.hitGraphic.getAttribute("id");if(n===this.currentJunctionId)return;this.currentJunctionId=n,this.view.openPopup({features:[this.hitGraphic],location:this.hitGraphic.geometry})}});this.mouseMoveHandler=this.view.on("pointer-move",async t=>{e(t).catch(()=>{})})}monitorMouseClick(){const e=$.debounce(async t=>{var a;const r=(a=(await this.view.hitTest(t,{include:[this.highlightLayer,this.junctionLayer,this.sectionLayer]})).results)==null?void 0:a.filter(o=>o.type==="graphic");if(r.length===0)return;const s=r[0].graphic,c=s.getAttribute("type"),n=s.getAttribute("id");if(c==="OpenDriveJunction")if(s.getAttribute("selected")===!1){const o=`http://${this.openDriveServer}/api/sumo/getSumoJunction`,l=await b.get(o,{params:{id:n,projectName:this.projectName}});l.status===200&&l.data.status===0&&(this.openDriveClickCallback&&this.openDriveClickCallback({type:"OpenDriveJunction",id:n,details:l.data.result}),s.setAttribute("selected",!0),s.symbol.url="/GisViewerAssets/Images/point_red.png",this.increasePictureMarkerSize(s,50))}else{this.openDriveClickCallback&&this.openDriveClickCallback({type:"OpenDriveJunction",id:n,details:void 0}),s.setAttribute("selected",!1);const o=s.getAttribute("crossId");s.symbol.url=o?"/GisViewerAssets/Images/point_green.png":"/GisViewerAssets/Images/point_yellow.png",this.decreasePictureMarkerSize(s,30)}else if(c==="OpenDriveSection")if(s.layer.id==="OpenDriveHighlight"){this.highlightLayer.remove(s),this.sectionLayer.add(s),s.setAttribute("selected",!0),this.selectedSectionIds.push(n);const o=`http://${this.openDriveServer}/api/sumo/getSumoEdge`,l=await b.get(o,{params:{id:n,projectName:this.projectName}});if(l.status===200&&l.data.status===0&&this.openDriveClickCallback){const d=l.data.result.obj_id;s.setAttribute("edgeId",d),this.openDriveClickCallback({type:"OpenDriveSection",id:d,details:l.data.result})}}else this.sectionLayer.remove(s),this.selectedSectionIds=this.selectedSectionIds.filter(o=>o!==n),this.openDriveClickCallback&&this.openDriveClickCallback({type:"OpenDriveSection",id:s.getAttribute("edgeId"),details:void 0})});this.mouseClickHandler=this.view.on("immediate-click",async t=>{e(t).catch(()=>{})})}increasePictureMarkerSize(e,t){const i=setInterval(()=>{const r=e.symbol,s=r.width;s<t?e.symbol={type:"picture-marker",url:r.url,width:s+1,height:s+1}:clearInterval(i)},20)}decreasePictureMarkerSize(e,t){const i=setInterval(()=>{const r=e.symbol,s=r.width;s>t?e.symbol={type:"picture-marker",url:r.url,width:s-1,height:s-1}:clearInterval(i)},20)}async getSumoInfo(e){switch(e.type){case"junction":{const t=`http://${this.openDriveServer}/api/sumo/getSumoJunction`,i=await b.get(t,{params:{id:e.id,projectName:this.projectName}});return i.status===200?i.data:{status:-1,message:`路口信息查询失败: ${e.id}`}}case"edge":{const t=e.id.split("#");let i=t[0];i.startsWith("-")&&(i=i.slice(1));let r=0;t.length===2&&(r=Number(t[1]));const s=this.allLaneGraphics.find(c=>c.getAttribute("roadId")===i&&c.getAttribute("sectionIndex")===r);if(s){const c=`${i}+${s.getAttribute("sectionId")}`,n=`http://${this.openDriveServer}/api/sumo/getSumoEdge`,a=await b.get(n,{params:{id:c,projectName:this.projectName}});return a.status===200?a.data:{status:-1,message:`路段信息查询失败: ${c}`}}else return{status:-1,message:"未知类型"}}default:return{status:-1,message:"未知类型"}}}async clearOpenDrive(){var t,i;let e=await this.laneLayer.queryFeatures();e.features.length>0&&await this.laneLayer.applyEdits({deleteFeatures:e.features}),e=await this.roadNameLayer.queryFeatures(),e.features.length>0&&await this.roadNameLayer.applyEdits({deleteFeatures:e.features}),this.highlightLayer.removeAll(),this.junctionLayer.removeAll(),this.sectionLayer.removeAll(),this.flashLayer.removeAll(),(t=this.mouseMoveHandler)==null||t.remove(),this.mouseMoveHandler=void 0,(i=this.mouseClickHandler)==null||i.remove(),this.mouseClickHandler=void 0}async findSumo(e){const{type:t,id:i}=e,r=e.flash===void 0?!0:e.flash;if(t==="junction")return await this.findJunction(i,r);if(t==="edge"){const s=i.split("_");if(s.length>2)return{status:-1,message:"id格式错误"};const c=s.length===2?Number(s[1]):void 0,n=s[0].split("#");if(n.length>2)return{status:-1,message:"id格式错误"};const a=n[0],o=n.length===2?Number(n[1]):void 0;return await this.findLane({roadsectId:a,segmentId:o,laneId:c,flash:r})}else return{status:-1,message:"未知类型"}}async findJunction(e,t){const i=this.junctionLayer.graphics.find(r=>r.attributes.id===e);if(!i)return{status:-1,message:"未找到。请检查路口编号"};if(t){const r=new y({geometry:i.geometry,symbol:{type:"simple-marker",style:"circle",size:30,color:[255,0,0,.6],outline:{color:"red",width:1}}});this.flashGraphic(r)}return await this.view.goTo(i.geometry,{duration:1e3}),{status:0,message:"ok"}}async findLane(e){let{roadsectId:t,segmentId:i,laneId:r}=e;t.startsWith("-")&&(t=t.slice(1));let s=this.allLaneGraphics.filter(a=>a.attributes.roadId===t);if(s.length===0)return{status:-1,message:"未找到。请检查路段编号"};if(i!==void 0){const a=[];if(s.forEach(o=>{const l=Number(o.attributes.sectionId);a.indexOf(l)===-1&&a.push(l)}),a.sort((o,l)=>o-l),i>a.length-1)return{status:-1,message:"未找到。请检查基本段编号"};i=a[i],s=s.filter(o=>Number(o.attributes.sectionId)===i)}if(r!==void 0){const a=[];if(s.forEach(o=>{const l=Number(o.attributes.laneId);a.indexOf(l)===-1&&a.push(l)}),a.sort((o,l)=>o-l),r>a.length-1)return{status:-1,message:"未找到。请检查车道编号"};r=a[r],s=s.filter(o=>Number(o.attributes.laneId)===r)}const c=s.map(a=>a.geometry),n=S.union(c);if(e.flash){const a=new y({geometry:n,symbol:{type:"simple-fill",color:[255,0,0,.5],style:"solid",outline:{color:"red",width:0}}});this.flashGraphic(a)}return await this.view.goTo(n,{duration:1e3}),{status:0,message:"ok"}}flashGraphic(e){this.flashLayer.removeAll(),this.flashLayer.add(e);let t=0,i=!0;const r=setInterval(()=>{i?(this.flashLayer.opacity-=.02,this.flashLayer.opacity<=.1&&(i=!1,t++)):(this.flashLayer.opacity+=.02,this.flashLayer.opacity>=1&&(i=!0)),t>=5&&(this.flashLayer.removeAll(),this.flashLayer.opacity=1,clearInterval(r))},10)}unselectSumo(e){if((!e||e.type==="junction")&&this.junctionLayer.graphics.forEach(t=>{if((!e||!e.id||e.id===""||e.id===t.getAttribute("id"))&&t.getAttribute("selected")){t.setAttribute("selected",!1);const i=t.getAttribute("crossId");t.symbol.url=i?"/GisViewerAssets/Images/point_green.png":"/GisViewerAssets/Images/point_yellow.png",this.decreasePictureMarkerSize(t,30)}}),!e||e.type==="edge"){let t;!e||!e.id||e.id===""?t=this.sectionLayer.graphics.toArray():t=this.sectionLayer.graphics.filter(i=>i.getAttribute("edgeId")===e.id).toArray(),t.length>0&&(t.forEach(i=>{const r=i.getAttribute("id");this.selectedSectionIds=this.selectedSectionIds.filter(s=>s!==r)}),this.sectionLayer.removeMany(t))}return{status:0,message:"ok"}}selectSumo(e){switch(e.type){case"junction":return this.junctionLayer.graphics.forEach(t=>{if(e.id===t.getAttribute("id"))return t.setAttribute("selected",!0),t.symbol.url="/GisViewerAssets/Images/point_red.png",this.increasePictureMarkerSize(t,50),{status:0,message:"ok"}}),{status:-1,message:"未找到路口"};case"edge":{const t=e.id.split("#");let i=String(t[0]);i.startsWith("-")&&(i=i.slice(1));let r=0;t.length===2&&(r=Number(t[1]));let s=[];if(t.length===1?s=this.allLaneGraphics.filter(c=>c.getAttribute("roadId")===i):t.length===2&&(s=this.allLaneGraphics.filter(c=>c.getAttribute("roadId")===i&&c.getAttribute("sectionIndex")===r)),s.length>0){const c=new Map;return s.forEach(n=>{const a=n.getAttribute("roadId")+"+"+n.getAttribute("sectionId");this.selectedSectionIds.includes(a)||this.selectedSectionIds.push(a);let o=c.get(a);o?o.push(n.geometry):(o=[n.geometry],c.set(a,o))}),c.forEach((n,a)=>{const o=S.union(n),l=new y({geometry:o,symbol:{type:"simple-fill",color:[0,255,255,.5],style:"solid",outline:{color:[0,255,255],width:1}},attributes:{type:"OpenDriveSection",id:a,edgeId:e.id,selected:!0}});this.sectionLayer.add(l)}),{status:0,message:"ok"}}else return{status:-1,message:"未找到路段"}}default:return{status:-1,message:"未知类型"}}}async geometrySearch(e){const t=new N.Polygon({rings:[e]}),i=await this.laneLayer.queryFeatures({geometry:t,outFields:["*"]}),r=[],s=[];for(const a of i.features){const o=a.getAttribute("roadId"),l=a.getAttribute("sectionIndex"),d=`${o}#${l}`;if(r.indexOf(d)===-1){r.push(d),this.selectSumo({type:"edge",id:d});const h=`http://${this.openDriveServer}/api/sumo/getSumoEdge`,m=await b.get(h,{params:{id:`${o}+${a.getAttribute("sectionId")}`,projectName:this.projectName}});m.status===200&&m.data.status===0&&s.push(m.data.result)}}const c=this.junctionLayer.graphics.filter(a=>{const o=a.geometry;return S.contains(t,o)}),n=[];for(const a of c){const o=a.getAttribute("id");this.selectSumo({type:"junction",id:o});const l=`http://${this.openDriveServer}/api/sumo/getSumoJunction`,d=await b.get(l,{params:{id:o,projectName:this.projectName}});d.status===200&&d.data.status===0&&n.push(d.data.result)}return{status:0,message:"ok",result:{junctions:n,edges:s}}}async splitLane(e){const i=e.id.split("_");if(i.length!==2)return{status:-1,message:"车道编号格式错误"};const r=Number(i[1]),s=i[0].split("#"),c=s.length===2?Number(s[1]):0;let n=s[0];n.startsWith("-")&&(n=n.slice(1));const a=this.allLaneGraphics.filter(I=>I.getAttribute("roadId")===n&&I.getAttribute("sectionIndex")===c);if(a.length===0)return{status:-1,message:"未找到路段"};const o=a.length-r,l=a.find(I=>Math.abs(I.getAttribute("laneId"))===o);if(!l)return{status:-1,message:"未找到车道"};const d=e.start||0,h=e.end||100,m=x.lineString(l.getAttribute("leftLine")),p=O.lineSliceAlong(m,d,h,{units:"meters"}),g=x.lineString(l.getAttribute("rightLine")),f=O.lineSliceAlong(g,d,h,{units:"meters"}),u=p.geometry.coordinates.concat(f.geometry.coordinates.reverse());u.push(u[u.length-1]);const w=new y({geometry:new N.Polygon({rings:[u]}),attributes:{ObjectID:l.getAttribute("ObjectID"),id:l.getAttribute("id"),fromNode:l.getAttribute("fromNode"),toNode:l.getAttribute("toNode"),roadId:l.getAttribute("roadId"),roadName:l.getAttribute("roadName"),sectionId:l.getAttribute("sectionId"),sectionIndex:l.getAttribute("sectionIndex"),laneId:l.getAttribute("laneId"),type:l.getAttribute("type"),sumoId:l.getAttribute("sumoId"),leftLine:p.geometry.coordinates,rightLine:f.geometry.coordinates},symbol:{type:"simple-fill",color:[255,0,0,.8],outline:{color:"red"}}});return this.splitLaneLayer.add(w),this.view.goTo(w),{status:0,message:"ok",result:e}}clearSplitLane(){this.splitLaneLayer.removeAll()}}exports.default=j;
|
|
@@ -2,7 +2,7 @@ import Graphic from '@arcgis/core/Graphic';
|
|
|
2
2
|
import GraphicsLayer from '@arcgis/core/layers/GraphicsLayer';
|
|
3
3
|
import MapView from '@arcgis/core/views/MapView';
|
|
4
4
|
import SceneView from '@arcgis/core/views/SceneView';
|
|
5
|
-
import { IOverlay, IOverlayParam, IPointSymbol, IResult } from '../../types';
|
|
5
|
+
import { IMaskParam, IOverlay, IOverlayParam, IPointSymbol, IResult } from '../../types';
|
|
6
6
|
interface IOverlayOptions {
|
|
7
7
|
id: string;
|
|
8
8
|
}
|
|
@@ -11,6 +11,8 @@ export default class Overlay {
|
|
|
11
11
|
overlayLayer: GraphicsLayer;
|
|
12
12
|
constructor(view: MapView | SceneView, options?: IOverlayOptions);
|
|
13
13
|
private defaultPointSymbol;
|
|
14
|
+
addMask(params: IMaskParam): void;
|
|
15
|
+
removeMask(): void;
|
|
14
16
|
/**
|
|
15
17
|
* 添加覆盖物
|
|
16
18
|
* @param params
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@arcgis/core/Graphic"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("@arcgis/core/geometry"),u=require("@arcgis/core/geometry/geometryEngine"),l=require("@arcgis/core/Graphic"),h=require("@arcgis/core/layers/GraphicsLayer");function p(o){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const r in o)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(o,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>o[r]})}}return e.default=o,Object.freeze(e)}const n=p(u);class v{constructor(e,r){this.defaultPointSymbol={type:"simple-marker",style:"circle",color:"yellow",size:10},this.view=e,this.overlayLayer=new h({...r}),this.view.map.layers.add(this.overlayLayer)}addMask(e){this.removeMask();const r=e.maskColor||[100,100,100,.8],i=e.maskSize||100,t=new d.Polygon({rings:e.geometry.rings}),s=t.centroid,a=n.geodesicBuffer(s,i,"kilometers"),y=n.difference(a,t),c=new l({geometry:y,symbol:{type:"simple-fill",color:r,outline:{style:"none"}},attributes:{type:"mask"}});this.overlayLayer.add(c)}removeMask(){const e=this.overlayLayer.graphics.find(r=>r.getAttribute("type")==="mask");e&&this.overlayLayer.remove(e)}addOverlays(e){let r=0,i=0;for(const t of e.overlays){t.properties?(t.properties.type||(t.properties.type=e.type),t.properties.id||(t.properties.id=t.id)):t.properties={type:e.type,id:t.id};const s=t.symbol||e.defaultSymbol||this.defaultPointSymbol;this.addOverlay(t,s,t.properties,t.visible).message==="add"?r++:i++}return{status:0,message:`新增${r}, 更新${i}`}}removeOverlaysByType(e){const r=this.overlayLayer.graphics.filter(i=>{const t=i.getAttribute("type");return e.includes(t)});return this.overlayLayer.graphics.removeMany(r),{status:0,message:`删除${r.length}`}}removeOverlaysById(e){const r=this.overlayLayer.graphics.filter(i=>{const t=i.getAttribute("id");return e.includes(t)});return this.overlayLayer.graphics.removeMany(r),{status:0,message:`删除${r.length}`}}isShowOverlaysByIds(e,r){this.overlayLayer.graphics.map(i=>{const t=i.getAttribute("id");e.includes(t)?i.visible=r:i.visible=!r})}showAllOverlays(){this.overlayLayer.graphics.forEach(e=>{e.visible=!0})}removeAllOverlays(){const e=this.overlayLayer.graphics.length;return this.overlayLayer.removeAll(),{status:0,message:`删除${e}`}}destroy(){this.view.map.remove(this.overlayLayer),this.overlayLayer.destroy()}removeGraphics(e){Array.isArray(e)||(e=[e]),this.overlayLayer.graphics.removeMany(e)}async findGraphic(e){var t;return(t=(await this.view.hitTest(e)).results)==null?void 0:t.filter(s=>s.type==="graphic"&&s.graphic.layer===this.overlayLayer)}hideLayer(){this.overlayLayer.visible=!1}showLayer(){this.overlayLayer.visible=!0}addPoint(e,r,i,t){let s,a=!0;return e.id&&(s=this.overlayLayer.graphics.find(y=>y.getAttribute("id")===e.id)),s?s.visible=t??s.visible:(t=t??!0,s=new l({visible:t}),this.overlayLayer.add(s),a=!1),s.geometry=e.geometry,s.symbol=r,s.attributes=i,{status:0,message:a?"add":"update"}}addOverlay(e,r,i,t){let s,a=!0;return e.id&&(s=this.overlayLayer.graphics.find(y=>y.getAttribute("id")===e.id)),s?s.visible=t??s.visible:(t=t??!0,s=new l({visible:t}),this.overlayLayer.add(s),a=!1),s.geometry=e.geometry,s.symbol=r,s.attributes=i,{status:0,message:a?"add":"update"}}}exports.default=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("@arcgis/core/core/reactiveUtils.js"),u=require("@arcgis/core/Graphic"),n=require("@arcgis/core/layers/GraphicsLayer"),b=require("@turf/buffer"),L=require("@turf/concave"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("@arcgis/core/core/reactiveUtils.js"),u=require("@arcgis/core/Graphic"),n=require("@arcgis/core/layers/GraphicsLayer"),b=require("@turf/buffer"),L=require("@turf/concave"),g=require("@turf/convex"),C=require("@turf/helpers"),v=require("../common-utils.js"),w=require("./district-controller.js");function m(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const t in a)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(a,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>a[t]})}}return e.default=a,Object.freeze(e)}const S=m(f),c=m(C);class A{constructor(e){this.crossScale=5e3,this.view=e,this.districtControllerLayer=new n({id:"districtControllerLayer",maxScale:144447,minScale:1155582}),this.subDistrictControllerLayer=new n({id:"subDistrictControllerLayer",maxScale:0,minScale:144447}),this.crossLayer=new n({id:"crossLayer",maxScale:0,minScale:36112}),this.highlightLayer=new n({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.districtControllerLayer.visible=!0,this.subDistrictControllerLayer.visible=!0;for(const t of e){const r=new w.default(t);this.drawArea(r,!0)}return this.watchHandle=S.watch(()=>this.view.scale,(t,r)=>{t>this.crossScale&&r<=this.crossScale?(this.crossLayer.graphics.forEach(s=>{s.symbol=this.getCrossGraphicSymbol(s.attributes,"marker")}),this.highlightLayer.graphics.forEach(s=>{s.getAttribute("type")==="cross"&&(s.symbol=this.getCrossGraphicSymbol(s.attributes,"marker"))})):t<=this.crossScale&&r>this.crossScale&&(this.crossLayer.graphics.forEach(s=>{s.symbol=this.getCrossGraphicSymbol(s.attributes,"picture")}),this.highlightLayer.graphics.forEach(s=>{s.getAttribute("type")==="cross"&&(s.symbol=this.getCrossGraphicSymbol(s.attributes,"picture"))}))}),{status:0,message:"ok"}}clearSignalControlArea(){var e;return this.districtControllerLayer.removeAll(),this.subDistrictControllerLayer.removeAll(),this.crossLayer.removeAll(),this.highlightLayer.removeAll(),(e=this.watchHandle)==null||e.remove(),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:"未找到"}}showPopup(e){const t=e.geometry.type==="point"?e.geometry:e.geometry.centroid;this.view.openPopup({features:[e],location:t})}async highlightSignalControlArea(e){if(!e.id||e.id==="")return{status:1,message:"请输入id"};this.highlightLayer.removeAll(),this.districtControllerLayer.visible=!1,this.subDistrictControllerLayer.visible=!1,this.crossLayer.visible=!1;const t=this.districtControllerLayer.graphics.filter(i=>i.getAttribute("id")===e.id).toArray().map(i=>i.clone()),r=this.subDistrictControllerLayer.graphics.filter(i=>i.getAttribute("id")===e.id||i.getAttribute("parentId")===e.id).toArray().map(i=>i.clone()),s=this.crossLayer.graphics.filter(i=>i.getAttribute("id")===e.id||i.getAttribute("districtId")===e.id||i.getAttribute("subDistrictId")===e.id).toArray().map(i=>i.clone());if(t.length>0&&this.highlightLayer.addMany(t),r.length>0&&this.highlightLayer.addMany(r),s.length>0&&this.highlightLayer.addMany(s),this.highlightLayer.graphics.length===0)return{status:1,message:"未找到"};if(t.length>0)await this.view.goTo(t);else if(r.length>0){const i=r[0].geometry.centroid;await this.view.goTo({target:i,scale:this.crossScale-500})}else s.length>1?await this.view.goTo(s):await this.view.goTo({target:s[0].geometry,scale:1500});return{status:0,message:"ok"}}resetHighlight(){return this.highlightLayer.removeAll(),this.view.closePopup(),this.districtControllerLayer.visible=!0,this.subDistrictControllerLayer.visible=!0,this.crossLayer.visible=!0,{status:0,message:"ok"}}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 i=null;if(r.length===2)i=c.lineString(r);else if(r.length>2){const h=c.featureCollection(r.map(d=>c.point(d)));t?i=g(h):(i=L(h),i||(i=g(h)))}i||(i=c.lineString(r));const l=b(i.geometry,t?200:30,{units:"meters"});let o;t?o=[{fieldName:"id",label:"区控编号"},{fieldName:"crossCount",label:"路口数量"},{fieldName:"subDistrictCount",label:"子区数量"}]:o=[{fieldName:"parentName",label:"所属区控"},{fieldName:"crossCount",label:"路口数量"}];const p={type:"signalControlArea",id:e.id,name:e.name,parentId:e.parentId,parentName:e.parentName,crossCount:e.crossCount,subDistrictCount:e.subDistrictCount},y=new u({geometry:{type:"polygon",rings:l.geometry.coordinates},symbol:{type:"simple-fill",color:[...e.areaColor,t?.6:.8],outline:{color:e.areaColor,width:2,style:t?"solid":"long-dash"}},attributes:p,popupTemplate:{title:`${t?"区控":"子区"} ${e.name}`,content:[{type:"fields",fieldInfos:o}]}});t?this.districtControllerLayer.add(y):this.subDistrictControllerLayer.add(y)}for(const i of e.subDistricts)this.drawArea(i,!1);const s=[];e.crosses.forEach(i=>{if(v.default.isCoordinateValid(i)){const l={type:"cross",id:i.id,name:i.name,color:e.areaColor,signalId:i.signalId,districtId:t?e.id:e.parentId,districtName:t?e.name:e.parentName,subDistrictId:t?"":e.id,subDistrictName:t?"":e.name,isKey:i.isKey},o=new u({geometry:{type:"point",x:i.longitude,y:i.latitude},symbol:this.getCrossGraphicSymbol(l,"marker"),attributes:l,popupTemplate:{title:i.name,content:[{type:"fields",fieldInfos:[{fieldName:"districtName",label:"区控名称"},{fieldName:"subDistrictName",label:"子区名称"},{fieldName:"id",label:"路口编号"},{fieldName:"signalId",label:"信号机编号"}]}]}});s.push(o)}else console.log("路口坐标无效",i)}),this.crossLayer.addMany(s)}getCrossGraphicSymbol(e,t){const{isKey:r,color:s}=e;if(t==="marker")return r?{type:"picture-marker",url:"/GisViewerAssets/Images/icon_star.png",width:"30px",height:"30px"}:{type:"simple-marker",style:"circle",color:s,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:22,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?45:30,rotateClockwise:!0,textureFilter:"Picture",url:`/GisViewerAssets/Images/xhj_${r?4:1}.png`,offsetY:r?22:15}]}}}}}exports.default=A;
|
package/lib/src/types/index.d.ts
CHANGED
|
@@ -129,6 +129,11 @@ export interface IOverlay {
|
|
|
129
129
|
symbol?: IPointSymbol | ILineSymbol | IPolygonSymbol;
|
|
130
130
|
properties?: any;
|
|
131
131
|
}
|
|
132
|
+
export interface IMaskParam {
|
|
133
|
+
geometry: IPolygon;
|
|
134
|
+
maskColor?: number[];
|
|
135
|
+
maskSize?: number;
|
|
136
|
+
}
|
|
132
137
|
export interface IOverlayParam {
|
|
133
138
|
type?: string;
|
|
134
139
|
defaultSymbol?: IPointSymbol | ILineSymbol | IPolygonSymbol;
|