gisviewer-vue3-arcgis 1.0.284 → 1.0.285

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.
Files changed (95) hide show
  1. package/es/index.mjs +6 -5
  2. package/es/src/gis-map/gis-map.vue.d.ts +124 -1
  3. package/es/src/gis-map/gis-map.vue.mjs +63 -63
  4. package/es/src/gis-map/index.d.ts +124 -1
  5. package/es/src/gis-map/utils/edpass-device-controller.mjs +278 -0
  6. package/es/src/gis-map/utils/green-wave-band-controller/index.mjs +362 -0
  7. package/es/src/gis-map/utils/holo-flow/index.mjs +101 -0
  8. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +125 -0
  9. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.mjs +153 -0
  10. package/es/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.mjs +4 -0
  11. package/es/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.mjs +336 -0
  12. package/es/src/gis-map/utils/holo-flow/signal-holo-flow.mjs +236 -0
  13. package/es/src/gis-map/utils/holo-flow/trace-holo-flow.mjs +106 -0
  14. package/es/src/gis-map/utils/holo-flow/trace-renderer-external.mjs +576 -0
  15. package/es/src/gis-map/utils/holo-flow/trace-renderer-layer.mjs +386 -0
  16. package/es/src/gis-map/utils/index.mjs +2 -2
  17. package/es/src/gis-map/utils/police-jurisdiction.mjs +202 -0
  18. package/es/src/gis-map/utils/road-config-tool/cross.mjs +127 -0
  19. package/es/src/gis-map/utils/road-config-tool/entrance.mjs +79 -0
  20. package/es/src/gis-map/utils/road-config-tool/exit.mjs +86 -0
  21. package/es/src/gis-map/utils/road-config-tool/index.mjs +112 -0
  22. package/es/src/gis-map/utils/road-config-tool/indicator-area.mjs +44 -0
  23. package/es/src/gis-map/utils/road-config-tool/lane.mjs +35 -0
  24. package/es/src/gis-map/utils/road-config-tool/search-nearby-lanes.mjs +265 -0
  25. package/es/src/gis-map/utils/signal-control-area/cross-renderer.mjs +593 -0
  26. package/es/src/gis-map/utils/signal-control-area/district-controller.mjs +84 -0
  27. package/es/src/gis-map/utils/signal-control-area/district-renderer.mjs +122 -0
  28. package/es/src/gis-map/utils/signal-control-area/edit-area.mjs +550 -0
  29. package/es/src/gis-map/utils/signal-control-area/layer-symbol.mjs +984 -0
  30. package/es/src/gis-map/utils/signal-control-area/signal-area-controller.mjs +140 -0
  31. package/es/src/gis-map/utils/signal-control-area/signal-cross-controller.mjs +423 -0
  32. package/es/src/gis-map/utils/signal-control-area/signal-renderer.mjs +123 -0
  33. package/es/src/gis-map/utils/signal-control-area/sub-district-renderer.mjs +367 -0
  34. package/es/src/gis-map/utils/signal-system/signal-system-controller.mjs +137 -0
  35. package/es/src/gis-map/utils/sketchViewTool.mjs +503 -0
  36. package/es/src/gis-map-ol/gis-map-ol.vue.d.ts +50 -0
  37. package/es/src/gis-map-ol/gis-map-ol.vue.mjs +67 -0
  38. package/es/src/gis-map-ol/gis-map-ol.vue2.mjs +4 -0
  39. package/es/src/gis-map-ol/gis-map-ol.vue3.mjs +5 -0
  40. package/es/src/gis-map-ol/index.d.ts +44 -1
  41. package/es/src/gis-map-ol/index.mjs +8 -0
  42. package/es/src/gis-map-ol/utils/ol-map-initializer.d.ts +28 -0
  43. package/es/src/gis-map-ol/utils/ol-map-initializer.mjs +129 -0
  44. package/es/src/gis-map-ol/utils/signal-control/signal-cross-controller.d.ts +42 -0
  45. package/es/src/gis-map-ol/utils/signal-control/signal-cross-controller.mjs +263 -0
  46. package/es/src/index.mjs +4 -4
  47. package/es/src/types/index.mjs +5 -0
  48. package/lib/index.js +1 -1
  49. package/lib/src/gis-map/gis-map.vue.d.ts +124 -1
  50. package/lib/src/gis-map/gis-map.vue.js +1 -1
  51. package/lib/src/gis-map/index.d.ts +124 -1
  52. package/lib/src/gis-map/utils/edpass-device-controller.js +1 -0
  53. package/lib/src/gis-map/utils/green-wave-band-controller/index.js +1 -0
  54. package/lib/src/gis-map/utils/holo-flow/index.js +1 -0
  55. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +125 -0
  56. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -0
  57. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.js +1 -0
  58. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -0
  59. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -0
  60. package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +2 -0
  61. package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.js +1 -0
  62. package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.js +1 -0
  63. package/lib/src/gis-map/utils/index.js +1 -1
  64. package/lib/src/gis-map/utils/police-jurisdiction.js +1 -0
  65. package/lib/src/gis-map/utils/road-config-tool/cross.js +1 -0
  66. package/lib/src/gis-map/utils/road-config-tool/entrance.js +1 -0
  67. package/lib/src/gis-map/utils/road-config-tool/exit.js +1 -0
  68. package/lib/src/gis-map/utils/road-config-tool/index.js +1 -0
  69. package/lib/src/gis-map/utils/road-config-tool/indicator-area.js +1 -0
  70. package/lib/src/gis-map/utils/road-config-tool/lane.js +1 -0
  71. package/lib/src/gis-map/utils/road-config-tool/search-nearby-lanes.js +1 -0
  72. package/lib/src/gis-map/utils/signal-control-area/cross-renderer.js +1 -0
  73. package/lib/src/gis-map/utils/signal-control-area/district-controller.js +1 -0
  74. package/lib/src/gis-map/utils/signal-control-area/district-renderer.js +1 -0
  75. package/lib/src/gis-map/utils/signal-control-area/edit-area.js +1 -0
  76. package/lib/src/gis-map/utils/signal-control-area/layer-symbol.js +1 -0
  77. package/lib/src/gis-map/utils/signal-control-area/signal-area-controller.js +1 -0
  78. package/lib/src/gis-map/utils/signal-control-area/signal-cross-controller.js +1 -0
  79. package/lib/src/gis-map/utils/signal-control-area/signal-renderer.js +1 -0
  80. package/lib/src/gis-map/utils/signal-control-area/sub-district-renderer.js +1 -0
  81. package/lib/src/gis-map/utils/signal-system/signal-system-controller.js +1 -0
  82. package/lib/src/gis-map/utils/sketchViewTool.js +1 -0
  83. package/lib/src/gis-map-ol/gis-map-ol.vue.d.ts +50 -0
  84. package/lib/src/gis-map-ol/gis-map-ol.vue.js +1 -0
  85. package/lib/src/gis-map-ol/gis-map-ol.vue2.js +1 -0
  86. package/lib/src/gis-map-ol/gis-map-ol.vue3.js +1 -0
  87. package/lib/src/gis-map-ol/index.d.ts +44 -1
  88. package/lib/src/gis-map-ol/index.js +1 -0
  89. package/lib/src/gis-map-ol/utils/ol-map-initializer.d.ts +28 -0
  90. package/lib/src/gis-map-ol/utils/ol-map-initializer.js +1 -0
  91. package/lib/src/gis-map-ol/utils/signal-control/signal-cross-controller.d.ts +42 -0
  92. package/lib/src/gis-map-ol/utils/signal-control/signal-cross-controller.js +1 -0
  93. package/lib/src/index.js +1 -1
  94. package/lib/src/types/index.js +1 -0
  95. package/package.json +1 -1
@@ -0,0 +1,265 @@
1
+ import l from "@arcgis/core/Graphic";
2
+ import * as f from "@arcgis/core/core/promiseUtils";
3
+ import { Point as b, Polyline as p } from "@arcgis/core/geometry";
4
+ import S from "@arcgis/core/geometry/SpatialReference";
5
+ import * as h from "@arcgis/core/geometry/geometryEngineAsync";
6
+ import m from "@arcgis/core/layers/FeatureLayer";
7
+ import u from "@arcgis/core/layers/GraphicsLayer";
8
+ import G from "@arcgis/core/layers/support/FeatureEffect";
9
+ import R from "@arcgis/core/layers/support/FeatureFilter";
10
+ import d from "@arcgis/core/renderers/SimpleRenderer";
11
+ import v from "@arcgis/core/rest/support/Query";
12
+ import { SimpleMarkerSymbol as g, SimpleLineSymbol as L, SimpleFillSymbol as w } from "@arcgis/core/symbols";
13
+ import F from "@arcgis/core/widgets/Sketch/SketchViewModel";
14
+ import A from "../../../stores/index.mjs";
15
+ import I from "../common-utils.mjs";
16
+ class V {
17
+ constructor(e) {
18
+ this.geometryUnit = "meters", this.view = e, this.pointLayer = new u(), this.bufferAreaLayer = new u({
19
+ blendMode: "color-burn"
20
+ }), this.view.map.layers.addMany([this.bufferAreaLayer, this.pointLayer]);
21
+ const i = f.debounce(
22
+ async (t) => {
23
+ const r = await this.calculateBuffer(t);
24
+ this.updateLayerFilter(r);
25
+ }
26
+ );
27
+ this.sketchViewModel = new F({
28
+ view: e,
29
+ layer: this.pointLayer
30
+ }), this.sketchViewModel.on("update", (t) => {
31
+ var c, s;
32
+ ((s = (c = t.toolEventInfo) == null ? void 0 : c.mover) == null ? void 0 : s.attributes.type) === "edge" && (t.toolEventInfo.type === "move-start" ? this.centerGeometryAtStart = this.centerGraphic.geometry : this.centerGraphic.geometry = this.centerGeometryAtStart);
33
+ const r = this.centerGraphic.geometry, o = this.edgeGraphic.geometry, n = [
34
+ [r.x, r.y],
35
+ [o.x, o.y]
36
+ ];
37
+ i(n).catch((y) => {
38
+ if (!f.isAbortError(y))
39
+ throw y;
40
+ });
41
+ });
42
+ }
43
+ /**
44
+ * 搜索路口中心点周边车道
45
+ * @param params
46
+ * @returns Promise<IResult>
47
+ */
48
+ async initializeSearch(e) {
49
+ if (this.laneLayer)
50
+ this.laneLayer.visible = !0, this.stopLineLayer.visible = !0;
51
+ else {
52
+ const s = await this.loadLaneAndStopLineLayer();
53
+ if (s.status !== 0)
54
+ return s;
55
+ }
56
+ const { crossId: i, crossCenter: t } = e, r = new b({
57
+ longitude: t[0],
58
+ latitude: t[1]
59
+ });
60
+ this.view.goTo(
61
+ {
62
+ target: r,
63
+ zoom: 18
64
+ },
65
+ { duration: 2e3 }
66
+ ), this.centerGraphic = new l({
67
+ geometry: r,
68
+ symbol: new g({
69
+ style: "circle",
70
+ color: [0, 255, 255, 0.5],
71
+ size: 10
72
+ }),
73
+ attributes: {
74
+ crossId: i,
75
+ type: "center"
76
+ }
77
+ });
78
+ const o = I.destinationWithPoint(
79
+ r,
80
+ 90,
81
+ e.bufferRadius || 70
82
+ );
83
+ this.edgeGraphic = new l({
84
+ geometry: o,
85
+ symbol: new g({
86
+ style: "circle",
87
+ color: [0, 255, 255, 0.5],
88
+ size: 10
89
+ }),
90
+ attributes: {
91
+ crossId: i,
92
+ type: "edge"
93
+ }
94
+ });
95
+ const n = new p({
96
+ paths: [
97
+ [
98
+ [r.x, r.y],
99
+ [o.x, o.y]
100
+ ]
101
+ ]
102
+ });
103
+ this.radiusLineGraphic = new l({
104
+ geometry: n,
105
+ symbol: new L({
106
+ color: [0, 255, 255],
107
+ width: 2
108
+ })
109
+ }), this.pointLayer.addMany([
110
+ this.centerGraphic,
111
+ this.edgeGraphic,
112
+ this.radiusLineGraphic
113
+ ]);
114
+ const c = await h.geodesicBuffer(
115
+ r,
116
+ e.bufferRadius || 70,
117
+ this.geometryUnit
118
+ );
119
+ return this.bufferGraphic = new l({
120
+ geometry: c,
121
+ symbol: new w({
122
+ color: [150, 150, 150],
123
+ outline: {
124
+ color: "#FFEB00",
125
+ width: "3px"
126
+ }
127
+ })
128
+ }), this.bufferAreaLayer.add(this.bufferGraphic), this.sketchViewModel.update([this.edgeGraphic, this.centerGraphic], {
129
+ tool: "move"
130
+ }), { status: 0, message: "初始化成功" };
131
+ }
132
+ /**
133
+ * 获取当前缓冲区的搜索结果
134
+ */
135
+ async getCurrentSearchResult() {
136
+ const e = new v();
137
+ e.relationParameter = "intersects", e.geometry = this.bufferGraphic.geometry, e.returnGeometry = !0, e.outSpatialReference = new S({ wkid: 4326 }), e.outFields = ["*"];
138
+ const i = (await this.laneLayer.queryFeatures(e)).features, t = (await this.stopLineLayer.queryFeatures(e)).features;
139
+ return {
140
+ lanes: i,
141
+ stopLines: t
142
+ };
143
+ }
144
+ /**
145
+ * 清除地图上显示的搜索结果
146
+ */
147
+ clearResult() {
148
+ this.sketchViewModel.complete(), this.pointLayer.removeAll(), this.bufferAreaLayer.removeAll(), this.laneLayer.visible = !1, this.stopLineLayer.visible = !1;
149
+ }
150
+ /**
151
+ * 计算缓冲区
152
+ * 移动边缘点或圆心点后调用
153
+ * @param vertices 圆心点与边缘点的坐标
154
+ */
155
+ async calculateBuffer(e) {
156
+ this.radiusLineGraphic.geometry = new p({
157
+ paths: [e],
158
+ spatialReference: this.view.spatialReference
159
+ });
160
+ const i = await h.geodesicLength(
161
+ this.radiusLineGraphic.geometry,
162
+ this.geometryUnit
163
+ ), t = await h.geodesicBuffer(
164
+ this.centerGraphic.geometry,
165
+ i,
166
+ this.geometryUnit
167
+ );
168
+ return this.bufferGraphic.geometry = t, t;
169
+ }
170
+ /**
171
+ * 载入车道和停止线图层
172
+ */
173
+ async loadLaneAndStopLineLayer() {
174
+ var s, y;
175
+ const e = A.useAppDataStore, i = JSON.parse(JSON.stringify(e.mapConfig));
176
+ if (!((s = i.roadConfigTool) != null && s.initLanePolygonLayer))
177
+ return {
178
+ status: -1,
179
+ message: "roadConfigTool.initLanePolygonLayer未配置"
180
+ };
181
+ if (!((y = i.roadConfigTool) != null && y.initStopLineLayer))
182
+ return {
183
+ status: -1,
184
+ message: "roadConfigTool.initStopLineLayer"
185
+ };
186
+ const t = `${i.assetsRoot}${i.roadConfigTool.initLanePolygonLayer}`;
187
+ let r;
188
+ try {
189
+ r = await (await fetch(t)).json();
190
+ } catch (a) {
191
+ return { status: -2, message: `${t}读取失败`, result: a.message };
192
+ }
193
+ const o = r.features.filter((a) => a.attributes.RoadSecID !== "").map((a) => l.fromJSON(a));
194
+ this.laneLayer = new m({
195
+ objectIdField: "FID",
196
+ spatialReference: r.spatialReference,
197
+ geometryType: "polygon",
198
+ source: o,
199
+ fields: [
200
+ {
201
+ name: "RoadSecID",
202
+ alias: "RoadSecID",
203
+ type: "string"
204
+ }
205
+ ],
206
+ renderer: new d({
207
+ symbol: new w({
208
+ color: [255, 0, 0, 0.3],
209
+ outline: {
210
+ color: "white"
211
+ }
212
+ })
213
+ })
214
+ }), this.view.map.layers.add(this.laneLayer);
215
+ const n = `${i.assetsRoot}${i.roadConfigTool.initStopLineLayer}`;
216
+ try {
217
+ r = await (await fetch(n)).json();
218
+ } catch (a) {
219
+ return {
220
+ status: -2,
221
+ message: `${n}读取失败`,
222
+ result: a.message
223
+ };
224
+ }
225
+ const c = r.features.filter((a) => a.attributes.RoadSecID !== "").map((a) => l.fromJSON(a));
226
+ return this.stopLineLayer = new m({
227
+ objectIdField: "FID",
228
+ spatialReference: r.spatialReference,
229
+ geometryType: "polyline",
230
+ source: c,
231
+ fields: [
232
+ {
233
+ name: "RoadSecID",
234
+ alias: "RoadSecID",
235
+ type: "string"
236
+ }
237
+ ],
238
+ renderer: new d({
239
+ symbol: new L({
240
+ color: "red",
241
+ width: 4,
242
+ cap: "butt",
243
+ join: "miter"
244
+ })
245
+ })
246
+ }), this.view.map.layers.add(this.stopLineLayer), { status: 0, message: "ok" };
247
+ }
248
+ /**
249
+ * 更新车道与停止线图层的filter,高亮缓冲区内部的要素
250
+ * @param buffer
251
+ */
252
+ updateLayerFilter(e) {
253
+ const i = new R({
254
+ geometry: e,
255
+ spatialRelationship: "intersects"
256
+ }), t = new G({
257
+ filter: i,
258
+ excludedEffect: "opacity(0%)"
259
+ });
260
+ this.laneLayer.featureEffect = t, this.stopLineLayer.featureEffect = t;
261
+ }
262
+ }
263
+ export {
264
+ V as default
265
+ };