gisviewer-vue3-arcgis 1.0.284 → 1.0.286

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 (135) hide show
  1. package/es/index.mjs +6 -5
  2. package/es/src/gis-map/gis-map.vue.d.ts +126 -3
  3. package/es/src/gis-map/gis-map.vue.mjs +63 -63
  4. package/es/src/gis-map/index.d.ts +126 -3
  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 +240 -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 +578 -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/overlay.d.ts +2 -2
  18. package/es/src/gis-map/utils/overlay.mjs +2 -2
  19. package/es/src/gis-map/utils/police-jurisdiction.mjs +202 -0
  20. package/es/src/gis-map/utils/road-config-tool/cross.mjs +127 -0
  21. package/es/src/gis-map/utils/road-config-tool/entrance.mjs +79 -0
  22. package/es/src/gis-map/utils/road-config-tool/exit.mjs +86 -0
  23. package/es/src/gis-map/utils/road-config-tool/index.mjs +112 -0
  24. package/es/src/gis-map/utils/road-config-tool/indicator-area.mjs +44 -0
  25. package/es/src/gis-map/utils/road-config-tool/lane.mjs +35 -0
  26. package/es/src/gis-map/utils/road-config-tool/search-nearby-lanes.mjs +265 -0
  27. package/es/src/gis-map/utils/signal-control-area/cross-renderer.mjs +593 -0
  28. package/es/src/gis-map/utils/signal-control-area/district-controller.mjs +84 -0
  29. package/es/src/gis-map/utils/signal-control-area/district-renderer.mjs +122 -0
  30. package/es/src/gis-map/utils/signal-control-area/edit-area.mjs +550 -0
  31. package/es/src/gis-map/utils/signal-control-area/layer-symbol.mjs +984 -0
  32. package/es/src/gis-map/utils/signal-control-area/signal-area-controller.mjs +140 -0
  33. package/es/src/gis-map/utils/signal-control-area/signal-cross-controller.mjs +423 -0
  34. package/es/src/gis-map/utils/signal-control-area/signal-renderer.mjs +123 -0
  35. package/es/src/gis-map/utils/signal-control-area/sub-district-renderer.mjs +367 -0
  36. package/es/src/gis-map/utils/signal-system/signal-system-controller.mjs +137 -0
  37. package/es/src/gis-map/utils/sketchViewTool.mjs +503 -0
  38. package/es/src/gis-map-ol/gis-map-ol.vue.d.ts +79 -0
  39. package/es/src/gis-map-ol/gis-map-ol.vue.mjs +93 -0
  40. package/es/src/gis-map-ol/gis-map-ol.vue2.mjs +4 -0
  41. package/es/src/gis-map-ol/gis-map-ol.vue3.mjs +5 -0
  42. package/es/src/gis-map-ol/index.d.ts +69 -1
  43. package/es/src/gis-map-ol/index.mjs +8 -0
  44. package/es/src/gis-map-ol/utils/cluster/index.d.ts +2 -0
  45. package/es/src/gis-map-ol/utils/cluster/pixel-cluster-calculator.d.ts +65 -0
  46. package/es/src/gis-map-ol/utils/cluster/pixel-cluster-calculator.mjs +122 -0
  47. package/es/src/gis-map-ol/utils/ol-map-initializer.d.ts +29 -0
  48. package/es/src/gis-map-ol/utils/ol-map-initializer.mjs +183 -0
  49. package/es/src/gis-map-ol/utils/overlay/cluster-point-controller.d.ts +23 -0
  50. package/es/src/gis-map-ol/utils/overlay/cluster-point-controller.mjs +102 -0
  51. package/es/src/gis-map-ol/utils/overlay/overlay-controller.d.ts +116 -0
  52. package/es/src/gis-map-ol/utils/overlay/overlay-controller.mjs +276 -0
  53. package/es/src/gis-map-ol/utils/police-area-controller.d.ts +16 -0
  54. package/es/src/gis-map-ol/utils/police-area-controller.mjs +155 -0
  55. package/es/src/gis-map-ol/utils/signal-control/signal-cross-controller.d.ts +33 -0
  56. package/es/src/gis-map-ol/utils/signal-control/signal-cross-controller.mjs +221 -0
  57. package/es/src/gis-map-ol/utils/signal-control/signal-system-controller.d.ts +49 -0
  58. package/es/src/gis-map-ol/utils/signal-control/signal-system-controller.mjs +127 -0
  59. package/es/src/gis-map-ol/utils/style/line-style.d.ts +64 -0
  60. package/es/src/gis-map-ol/utils/style/line-style.mjs +151 -0
  61. package/es/src/gis-map-ol/utils/style/point-style.d.ts +78 -0
  62. package/es/src/gis-map-ol/utils/style/point-style.mjs +206 -0
  63. package/es/src/gis-map-ol/utils/style/polygon-style.d.ts +60 -0
  64. package/es/src/gis-map-ol/utils/style/polygon-style.mjs +166 -0
  65. package/es/src/index.mjs +4 -4
  66. package/es/src/types/index.d.ts +2 -1
  67. package/es/src/types/index.mjs +5 -0
  68. package/lib/index.js +1 -1
  69. package/lib/src/gis-map/gis-map.vue.d.ts +126 -3
  70. package/lib/src/gis-map/gis-map.vue.js +1 -1
  71. package/lib/src/gis-map/index.d.ts +126 -3
  72. package/lib/src/gis-map/utils/edpass-device-controller.js +1 -0
  73. package/lib/src/gis-map/utils/green-wave-band-controller/index.js +1 -0
  74. package/lib/src/gis-map/utils/holo-flow/index.js +1 -0
  75. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.d.ts +125 -0
  76. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue.js +1 -0
  77. package/lib/src/gis-map/utils/holo-flow/signal-countdown-panel.vue2.js +1 -0
  78. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow-lsr.js +1 -0
  79. package/lib/src/gis-map/utils/holo-flow/signal-holo-flow.js +1 -0
  80. package/lib/src/gis-map/utils/holo-flow/trace-holo-flow.js +2 -0
  81. package/lib/src/gis-map/utils/holo-flow/trace-renderer-external.js +1 -0
  82. package/lib/src/gis-map/utils/holo-flow/trace-renderer-layer.js +1 -0
  83. package/lib/src/gis-map/utils/index.js +1 -1
  84. package/lib/src/gis-map/utils/overlay.d.ts +2 -2
  85. package/lib/src/gis-map/utils/overlay.js +1 -1
  86. package/lib/src/gis-map/utils/police-jurisdiction.js +1 -0
  87. package/lib/src/gis-map/utils/road-config-tool/cross.js +1 -0
  88. package/lib/src/gis-map/utils/road-config-tool/entrance.js +1 -0
  89. package/lib/src/gis-map/utils/road-config-tool/exit.js +1 -0
  90. package/lib/src/gis-map/utils/road-config-tool/index.js +1 -0
  91. package/lib/src/gis-map/utils/road-config-tool/indicator-area.js +1 -0
  92. package/lib/src/gis-map/utils/road-config-tool/lane.js +1 -0
  93. package/lib/src/gis-map/utils/road-config-tool/search-nearby-lanes.js +1 -0
  94. package/lib/src/gis-map/utils/signal-control-area/cross-renderer.js +1 -0
  95. package/lib/src/gis-map/utils/signal-control-area/district-controller.js +1 -0
  96. package/lib/src/gis-map/utils/signal-control-area/district-renderer.js +1 -0
  97. package/lib/src/gis-map/utils/signal-control-area/edit-area.js +1 -0
  98. package/lib/src/gis-map/utils/signal-control-area/layer-symbol.js +1 -0
  99. package/lib/src/gis-map/utils/signal-control-area/signal-area-controller.js +1 -0
  100. package/lib/src/gis-map/utils/signal-control-area/signal-cross-controller.js +1 -0
  101. package/lib/src/gis-map/utils/signal-control-area/signal-renderer.js +1 -0
  102. package/lib/src/gis-map/utils/signal-control-area/sub-district-renderer.js +1 -0
  103. package/lib/src/gis-map/utils/signal-system/signal-system-controller.js +1 -0
  104. package/lib/src/gis-map/utils/sketchViewTool.js +1 -0
  105. package/lib/src/gis-map-ol/gis-map-ol.vue.d.ts +79 -0
  106. package/lib/src/gis-map-ol/gis-map-ol.vue.js +1 -0
  107. package/lib/src/gis-map-ol/gis-map-ol.vue2.js +1 -0
  108. package/lib/src/gis-map-ol/gis-map-ol.vue3.js +1 -0
  109. package/lib/src/gis-map-ol/index.d.ts +69 -1
  110. package/lib/src/gis-map-ol/index.js +1 -0
  111. package/lib/src/gis-map-ol/utils/cluster/index.d.ts +2 -0
  112. package/lib/src/gis-map-ol/utils/cluster/pixel-cluster-calculator.d.ts +65 -0
  113. package/lib/src/gis-map-ol/utils/cluster/pixel-cluster-calculator.js +1 -0
  114. package/lib/src/gis-map-ol/utils/ol-map-initializer.d.ts +29 -0
  115. package/lib/src/gis-map-ol/utils/ol-map-initializer.js +1 -0
  116. package/lib/src/gis-map-ol/utils/overlay/cluster-point-controller.d.ts +23 -0
  117. package/lib/src/gis-map-ol/utils/overlay/cluster-point-controller.js +1 -0
  118. package/lib/src/gis-map-ol/utils/overlay/overlay-controller.d.ts +116 -0
  119. package/lib/src/gis-map-ol/utils/overlay/overlay-controller.js +1 -0
  120. package/lib/src/gis-map-ol/utils/police-area-controller.d.ts +16 -0
  121. package/lib/src/gis-map-ol/utils/police-area-controller.js +1 -0
  122. package/lib/src/gis-map-ol/utils/signal-control/signal-cross-controller.d.ts +33 -0
  123. package/lib/src/gis-map-ol/utils/signal-control/signal-cross-controller.js +1 -0
  124. package/lib/src/gis-map-ol/utils/signal-control/signal-system-controller.d.ts +49 -0
  125. package/lib/src/gis-map-ol/utils/signal-control/signal-system-controller.js +1 -0
  126. package/lib/src/gis-map-ol/utils/style/line-style.d.ts +64 -0
  127. package/lib/src/gis-map-ol/utils/style/line-style.js +1 -0
  128. package/lib/src/gis-map-ol/utils/style/point-style.d.ts +78 -0
  129. package/lib/src/gis-map-ol/utils/style/point-style.js +1 -0
  130. package/lib/src/gis-map-ol/utils/style/polygon-style.d.ts +60 -0
  131. package/lib/src/gis-map-ol/utils/style/polygon-style.js +1 -0
  132. package/lib/src/index.js +1 -1
  133. package/lib/src/types/index.d.ts +2 -1
  134. package/lib/src/types/index.js +1 -0
  135. package/package.json +1 -1
@@ -0,0 +1,367 @@
1
+ import m from "@arcgis/core/Graphic";
2
+ import w from "@arcgis/core/layers/FeatureLayer";
3
+ import D from "../common-utils.mjs";
4
+ import { subDistrictPointLayerOptions as P, subDistrictLineLayerOptions as g } from "./layer-symbol.mjs";
5
+ class q {
6
+ constructor(t) {
7
+ this.roadConnections = [], this.view = t, this.subDistrictPointLayer = new w(
8
+ P
9
+ ), this.subDistrictPointLayer.spatialReference = t.spatialReference, this.subDistrictPointLayer.popupEnabled = !0, this.subDistrictLineLayer = new w(
10
+ g
11
+ ), this.subDistrictLineLayer.spatialReference = t.spatialReference, this.subDistrictLineLayer.popupEnabled = !0, this.view.map.addMany([
12
+ this.subDistrictLineLayer,
13
+ this.subDistrictPointLayer
14
+ ]);
15
+ }
16
+ async showSubDistricts(t) {
17
+ var n;
18
+ await this.clearSubDistricts(), (n = this.clickHandler) == null || n.remove(), this.clickHandler = this.view.on("click", this.viewHitTest.bind(this));
19
+ let s = 0;
20
+ const i = [], r = [];
21
+ t.forEach((e) => {
22
+ e.roadConnections.length > 0 && this.roadConnections.push(...e.roadConnections), r.push({
23
+ value: e.id,
24
+ label: e.name,
25
+ symbol: {
26
+ type: "simple-marker",
27
+ style: "circle",
28
+ color: [...e.areaColor, 0.8],
29
+ size: "8px",
30
+ outline: {
31
+ color: [...e.areaColor],
32
+ width: 4
33
+ }
34
+ }
35
+ }), e.signals.forEach((a) => {
36
+ const d = new m({
37
+ geometry: {
38
+ type: "point",
39
+ longitude: a.longitude,
40
+ latitude: a.latitude
41
+ },
42
+ attributes: {
43
+ ObjectID: s++,
44
+ id: a.nodeId,
45
+ name: a.name,
46
+ subDistrictId: e.id,
47
+ subDistrictName: e.name,
48
+ districtId: e.parentId,
49
+ districtName: e.parentName,
50
+ signalCount: e.signalCount,
51
+ color: e.areaColor.join(","),
52
+ type: "subDistrict"
53
+ }
54
+ });
55
+ i.push(d);
56
+ });
57
+ }), this.subDistrictPointLayer.renderer = {
58
+ type: "simple",
59
+ symbol: {
60
+ type: "simple-marker",
61
+ color: [23, 151, 255, 0.8],
62
+ size: "8px",
63
+ outline: {
64
+ color: "white",
65
+ width: 1
66
+ }
67
+ }
68
+ }, this.currentPointRenderer = this.subDistrictPointLayer.renderer.clone(), await this.subDistrictPointLayer.applyEdits({
69
+ addFeatures: i
70
+ }), await D.viewGoto(this.view, i);
71
+ }
72
+ /**
73
+ * 显示区控下的所有子区,用道路线表示
74
+ * @param id 区控ID
75
+ */
76
+ async showRoads(t) {
77
+ const { type: s, id: i } = t, r = this.subDistrictPointLayer.createQuery(), n = s === "district" ? "districtId" : "subDistrictId";
78
+ i !== "" ? r.where = `${n} = '${i}'` : r.where = "1=1";
79
+ const e = await this.subDistrictPointLayer.queryFeatures(
80
+ r
81
+ ), a = /* @__PURE__ */ new Map();
82
+ e.features.forEach((o) => {
83
+ var b;
84
+ const {
85
+ subDistrictId: c,
86
+ color: u,
87
+ id: h,
88
+ districtName: p,
89
+ subDistrictName: f,
90
+ signalCount: y
91
+ } = o.attributes;
92
+ a.has(c) || a.set(c, {
93
+ color: u,
94
+ signalIds: [],
95
+ districtName: p,
96
+ subDistrictName: f,
97
+ signalCount: y
98
+ }), (b = a.get(c)) == null || b.signalIds.push(h);
99
+ });
100
+ const d = [], L = [];
101
+ for (const o of a) {
102
+ let c = 0;
103
+ const u = o[0];
104
+ d.push({
105
+ value: u,
106
+ symbol: {
107
+ type: "simple-line",
108
+ color: o[1].color.split(",").map(Number),
109
+ width: 2,
110
+ style: "solid"
111
+ }
112
+ });
113
+ const { districtName: h, subDistrictName: p, signalIds: f, signalCount: y } = o[1];
114
+ this.roadConnections.filter(
115
+ (l) => l.subDistrictId === u
116
+ ).forEach((l) => {
117
+ const I = new m({
118
+ geometry: {
119
+ type: "polyline",
120
+ paths: l.coordinates
121
+ },
122
+ attributes: {
123
+ ObjectID: c++,
124
+ id: l.id,
125
+ districtId: l.districtId,
126
+ subDistrictId: u,
127
+ subDistrictName: p,
128
+ districtName: h,
129
+ signalCount: y,
130
+ color: o[1].color
131
+ }
132
+ });
133
+ L.push(I);
134
+ });
135
+ }
136
+ this.subDistrictLineLayer.renderer = {
137
+ type: "simple",
138
+ symbol: {
139
+ type: "simple-line",
140
+ color: [23, 151, 255],
141
+ width: 2
142
+ }
143
+ // type: 'unique-value',
144
+ // field: 'subDistrictId',
145
+ // defaultSymbol: {
146
+ // type: 'simple-line',
147
+ // color: [180, 180, 180, 0.5],
148
+ // width: 2,
149
+ // style: 'solid'
150
+ // },
151
+ // defaultLabel: '其他子区',
152
+ // uniqueValueInfos,
153
+ // visualVariables: [
154
+ // {
155
+ // type: 'size',
156
+ // valueExpression: '$view.scale',
157
+ // stops: [
158
+ // {
159
+ // size: 6,
160
+ // value: 2500
161
+ // },
162
+ // {
163
+ // size: 5,
164
+ // value: 5000
165
+ // },
166
+ // {
167
+ // size: 4,
168
+ // value: 18055.954822000003
169
+ // },
170
+ // {
171
+ // size: 3,
172
+ // value: 144447.638572
173
+ // },
174
+ // {
175
+ // size: 2,
176
+ // value: 1155581.108577
177
+ // }
178
+ // ]
179
+ // }
180
+ // ]
181
+ }, this.currentLineRenderer = this.subDistrictLineLayer.renderer.clone(), await this.subDistrictLineLayer.applyEdits({
182
+ addFeatures: L
183
+ });
184
+ }
185
+ async clearSubDistricts() {
186
+ var i;
187
+ const t = await this.subDistrictPointLayer.queryFeatures();
188
+ t.features.length > 0 && await this.subDistrictPointLayer.applyEdits({
189
+ deleteFeatures: t.features
190
+ }), this.subDistrictPointLayer.definitionExpression = "1=1";
191
+ const s = await this.subDistrictLineLayer.queryFeatures();
192
+ s.features.length > 0 && await this.subDistrictLineLayer.applyEdits({
193
+ deleteFeatures: s.features
194
+ }), this.subDistrictLineLayer.definitionExpression = "1=1", this.roadConnections = [], (i = this.clickHandler) == null || i.remove();
195
+ }
196
+ setVisible(t) {
197
+ this.showRoads({ type: "district", id: "" }), this.subDistrictPointLayer.visible = t, this.subDistrictLineLayer.visible = t;
198
+ }
199
+ /**
200
+ * 定位子区
201
+ * @param id 子区ID
202
+ */
203
+ async locateSubDistrict(t) {
204
+ const s = this.subDistrictPointLayer.createQuery();
205
+ s.where = `subDistrictId = '${t}'`, s.returnGeometry = !0;
206
+ const i = await this.subDistrictPointLayer.queryFeatures(s);
207
+ return i.features.length > 0 ? (await D.viewGoto(this.view, i.features, !1), { status: 0, message: "ok" }) : { status: 1, message: "未找到子区" };
208
+ }
209
+ /**
210
+ * 高亮子区, 其他子区隐藏
211
+ * @param id 子区ID
212
+ * @return 返回高亮子区的数量以及区控id
213
+ */
214
+ async highlightSubDistrict(t) {
215
+ let s = "";
216
+ const i = this.subDistrictPointLayer.definitionExpression;
217
+ this.subDistrictPointLayer.definitionExpression = `subDistrictId = '${t.id}'`;
218
+ const r = await this.subDistrictPointLayer.queryFeatures(), n = r.features.length;
219
+ return n > 0 ? (this.subDistrictLineLayer.definitionExpression = `subDistrictId = '${t.id}'`, s = r.features[0].attributes.districtId, await D.viewGoto(
220
+ this.view,
221
+ r.features,
222
+ t.needZoom !== !1
223
+ )) : this.subDistrictPointLayer.definitionExpression = i, { count: n, parentId: s };
224
+ }
225
+ /**
226
+ * 按照区控、子区id显示子区
227
+ * @param type 类型,district 或 subDistrict
228
+ * @param id
229
+ */
230
+ filter(t) {
231
+ const { type: s, id: i } = t, r = `${s === "district" ? "districtId" : "subDistrictId"} = '${i}'`;
232
+ this.subDistrictPointLayer.definitionExpression = r, this.subDistrictLineLayer.definitionExpression = r;
233
+ }
234
+ /**
235
+ * 重置过滤器,显示所有子区
236
+ */
237
+ resetFilter() {
238
+ this.subDistrictPointLayer.definitionExpression = "1=1", this.subDistrictLineLayer.definitionExpression = "1=1";
239
+ }
240
+ /**
241
+ * 监听地图点击事件,进行子区高亮
242
+ * @param event
243
+ */
244
+ async viewHitTest(t) {
245
+ var r;
246
+ const i = (r = (await this.view.hitTest(t, {
247
+ include: [this.subDistrictPointLayer, this.subDistrictLineLayer]
248
+ })).results) == null ? void 0 : r.filter(
249
+ (n) => n.type === "graphic"
250
+ );
251
+ if (i.length === 0)
252
+ console.time("resetRenderer"), this.subDistrictPointLayer.renderer = this.currentPointRenderer, this.subDistrictLineLayer.renderer = this.currentLineRenderer;
253
+ else {
254
+ const n = i[0].graphic, e = n.attributes.color.split(",").map(Number);
255
+ this.subDistrictPointLayer.renderer = {
256
+ type: "unique-value",
257
+ field: "subDistrictId",
258
+ defaultSymbol: {
259
+ type: "simple-marker",
260
+ style: "circle",
261
+ color: [0, 0, 0, 0],
262
+ size: "8px",
263
+ outline: {
264
+ color: [180, 180, 180, 0.5],
265
+ width: 4
266
+ }
267
+ },
268
+ defaultLabel: "其他子区",
269
+ uniqueValueInfos: [
270
+ {
271
+ value: n.attributes.subDistrictId,
272
+ symbol: {
273
+ type: "simple-marker",
274
+ style: "circle",
275
+ color: [...e, 0.8],
276
+ size: "8px",
277
+ outline: {
278
+ color: e,
279
+ width: 4
280
+ }
281
+ }
282
+ }
283
+ ]
284
+ // visualVariables: [
285
+ // {
286
+ // type: 'size',
287
+ // valueExpression: '$view.scale',
288
+ // stops: [
289
+ // {
290
+ // size: 24,
291
+ // value: 2500
292
+ // },
293
+ // {
294
+ // size: 20,
295
+ // value: 5000
296
+ // },
297
+ // {
298
+ // size: 8,
299
+ // value: 18055.954822000003
300
+ // },
301
+ // {
302
+ // size: 4,
303
+ // value: 144447.638572
304
+ // },
305
+ // {
306
+ // size: 2,
307
+ // value: 1155581.108577
308
+ // }
309
+ // ]
310
+ // }
311
+ // ]
312
+ }, this.subDistrictLineLayer.renderer = {
313
+ type: "unique-value",
314
+ field: "subDistrictId",
315
+ defaultSymbol: {
316
+ type: "simple-line",
317
+ style: "solid",
318
+ color: [180, 180, 180, 0.5],
319
+ width: "8px"
320
+ },
321
+ defaultLabel: "其他子区",
322
+ uniqueValueInfos: [
323
+ {
324
+ value: n.attributes.subDistrictId,
325
+ symbol: {
326
+ type: "simple-line",
327
+ style: "solid",
328
+ color: n.attributes.color.split(",").map(Number),
329
+ width: "8px"
330
+ }
331
+ }
332
+ ]
333
+ // visualVariables: [
334
+ // {
335
+ // type: 'size',
336
+ // valueExpression: '$view.scale',
337
+ // stops: [
338
+ // {
339
+ // size: 6,
340
+ // value: 2500
341
+ // },
342
+ // {
343
+ // size: 5,
344
+ // value: 5000
345
+ // },
346
+ // {
347
+ // size: 4,
348
+ // value: 18055.954822000003
349
+ // },
350
+ // {
351
+ // size: 3,
352
+ // value: 144447.638572
353
+ // },
354
+ // {
355
+ // size: 2,
356
+ // value: 1155581.108577
357
+ // }
358
+ // ]
359
+ // }
360
+ // ]
361
+ };
362
+ }
363
+ }
364
+ }
365
+ export {
366
+ q as default
367
+ };
@@ -0,0 +1,137 @@
1
+ import i from "@arcgis/core/Graphic";
2
+ import h from "@arcgis/core/layers/GraphicsLayer";
3
+ import o from "../common-utils.mjs";
4
+ class S {
5
+ constructor(e) {
6
+ this.view = e, this.signalSystemLayer = new h({
7
+ title: "信控系统图层"
8
+ }), this.view.map.add(this.signalSystemLayer);
9
+ }
10
+ /**
11
+ * 显示信控系统
12
+ * @param params
13
+ * @returns
14
+ */
15
+ async showSignalSystems(e) {
16
+ return e.areaList.forEach((s) => {
17
+ this.showSystem(s);
18
+ }), await o.viewGoto(
19
+ this.view,
20
+ this.signalSystemLayer.graphics.toArray()
21
+ ), {
22
+ status: 0,
23
+ message: "success"
24
+ };
25
+ }
26
+ /**
27
+ * 显示信控子系统
28
+ * @param params
29
+ * @returns
30
+ */
31
+ async showSubSignalSystems(e) {
32
+ return e.areaList.forEach((s) => {
33
+ this.showSubSystem(s);
34
+ }), await o.viewGoto(
35
+ this.view,
36
+ this.signalSystemLayer.graphics.toArray()
37
+ ), {
38
+ status: 0,
39
+ message: "success"
40
+ };
41
+ }
42
+ removeSubSignalSystems(e) {
43
+ return e ? this.signalSystemLayer.graphics.filter((s) => s.getAttribute("subCode") === e).forEach((s) => {
44
+ this.signalSystemLayer.remove(s);
45
+ }) : this.signalSystemLayer.removeAll(), {
46
+ status: 0,
47
+ message: "success"
48
+ };
49
+ }
50
+ removeSignalSystems(e) {
51
+ return e ? this.signalSystemLayer.graphics.filter((s) => s.getAttribute("areaCode") === e).forEach((s) => {
52
+ this.signalSystemLayer.remove(s);
53
+ }) : this.signalSystemLayer.removeAll(), {
54
+ status: 0,
55
+ message: "success"
56
+ };
57
+ }
58
+ showSystem(e) {
59
+ if (e.shape) {
60
+ let s;
61
+ if (typeof e.shape == "string" ? s = JSON.parse(e.shape) : s = e.shape, s) {
62
+ const t = new i({
63
+ geometry: {
64
+ type: "polyline",
65
+ paths: [s]
66
+ },
67
+ symbol: e.lineSymbol || {
68
+ type: "simple-line",
69
+ style: "dash",
70
+ color: [17, 113, 191],
71
+ width: 2
72
+ },
73
+ attributes: {
74
+ areaCode: e.areaCode,
75
+ type: "signal-system-border"
76
+ }
77
+ });
78
+ this.signalSystemLayer.add(t);
79
+ }
80
+ }
81
+ e.children.forEach((s) => {
82
+ this.showSubSystem(s, e.areaCode);
83
+ });
84
+ }
85
+ showSubSystem(e, s) {
86
+ if (e.subShape) {
87
+ let t;
88
+ typeof e.subShape == "string" ? t = JSON.parse(e.subShape) : t = e.subShape;
89
+ const a = t.map((r, l) => new i({
90
+ geometry: {
91
+ type: "polyline",
92
+ paths: [r]
93
+ },
94
+ symbol: e.roadSymbol || {
95
+ type: "simple-line",
96
+ color: [23, 151, 255],
97
+ width: 3
98
+ },
99
+ attributes: {
100
+ type: "signal-sub-system",
101
+ id: e.subAreaCode + "_" + l,
102
+ subCode: e.subAreaCode,
103
+ areaCode: s || ""
104
+ }
105
+ }));
106
+ this.signalSystemLayer.addMany(a);
107
+ }
108
+ if (e.children) {
109
+ const t = e.children.map((a) => new i({
110
+ geometry: {
111
+ type: "point",
112
+ longitude: Number(a.x),
113
+ latitude: Number(a.y)
114
+ },
115
+ symbol: a.symbol || e.nodeSymbol || {
116
+ type: "simple-marker",
117
+ color: [23, 151, 255, 0.8],
118
+ size: 10,
119
+ outline: {
120
+ color: [23, 151, 255],
121
+ width: 2
122
+ }
123
+ },
124
+ attributes: {
125
+ ...a,
126
+ type: "signal-sub-system-node",
127
+ subCode: e.subAreaCode,
128
+ areaCode: s || ""
129
+ }
130
+ }));
131
+ this.signalSystemLayer.addMany(t);
132
+ }
133
+ }
134
+ }
135
+ export {
136
+ S as default
137
+ };