gisviewer-vue3-arcgis 1.0.258 → 1.0.262

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 (27) hide show
  1. package/es/src/gis-map/gis-map.vue.d.ts +9 -1
  2. package/es/src/gis-map/gis-map.vue.mjs +96 -88
  3. package/es/src/gis-map/index.d.ts +8 -0
  4. package/es/src/gis-map/utils/GreenWaveline.d.ts +68 -0
  5. package/es/src/gis-map/utils/dbscan-cluster/index.d.ts +1 -0
  6. package/es/src/gis-map/utils/dbscan-cluster/index.mjs +67 -76
  7. package/es/src/gis-map/utils/map-initializer.mjs +1 -1
  8. package/es/src/gis-map/utils/open-drive-renderer/index.d.ts +2 -1
  9. package/es/src/gis-map/utils/open-drive-renderer/index.mjs +369 -328
  10. package/es/src/gis-map/utils/signal-control-area/cross-renderer.d.ts +51 -1
  11. package/es/src/gis-map/utils/signal-control-area/cross-renderer.mjs +401 -20
  12. package/es/src/gis-map/utils/signal-control-area/show-area.mjs +23 -17
  13. package/es/src/types/index.d.ts +5 -0
  14. package/lib/src/gis-map/gis-map.vue.d.ts +9 -1
  15. package/lib/src/gis-map/gis-map.vue.js +1 -1
  16. package/lib/src/gis-map/index.d.ts +8 -0
  17. package/lib/src/gis-map/utils/GreenWaveline.d.ts +68 -0
  18. package/lib/src/gis-map/utils/dbscan-cluster/index.d.ts +1 -0
  19. package/lib/src/gis-map/utils/dbscan-cluster/index.js +1 -1
  20. package/lib/src/gis-map/utils/map-initializer.js +1 -1
  21. package/lib/src/gis-map/utils/open-drive-renderer/index.d.ts +2 -1
  22. package/lib/src/gis-map/utils/open-drive-renderer/index.js +1 -1
  23. package/lib/src/gis-map/utils/signal-control-area/cross-renderer.d.ts +51 -1
  24. package/lib/src/gis-map/utils/signal-control-area/cross-renderer.js +1 -1
  25. package/lib/src/gis-map/utils/signal-control-area/show-area.js +1 -1
  26. package/lib/src/types/index.d.ts +5 -0
  27. package/package.json +1 -1
@@ -4,8 +4,22 @@ export default class CrossRenderer {
4
4
  private crossLayer;
5
5
  private crossGraphicSymbol;
6
6
  private locations;
7
+ private currentShowMode;
8
+ private zoomWatchHandle;
9
+ private symbolScale;
10
+ private currentZoom;
11
+ private readonly clusterRadius;
12
+ private readonly minClusterPoints;
13
+ private readonly maxClusterSymbolSize;
14
+ private readonly minClusterSymbolSize;
7
15
  constructor(view: __esri.MapView | __esri.SceneView);
8
- showCrosses(controllers: DistrictController[]): Promise<void>;
16
+ addCrosses(controllers: DistrictController[]): Promise<void>;
17
+ clearCrosses(): void;
18
+ private updateScatterSymbol;
19
+ /**
20
+ * 将地理位置转换为屏幕坐标
21
+ */
22
+ private locationToScreen;
9
23
  /**
10
24
  * 显示聚合点
11
25
  */
@@ -14,4 +28,40 @@ export default class CrossRenderer {
14
28
  * 显示散点
15
29
  */
16
30
  showScatter(): void;
31
+ /**
32
+ * 确定路口符号
33
+ * @param attributes
34
+ * @returns
35
+ */
36
+ private getCrossSymbol;
37
+ /**
38
+ * 获取邻居点
39
+ * @param locations
40
+ * @param index
41
+ * @param eps
42
+ * @returns
43
+ */
44
+ private getNeighbors;
45
+ /**
46
+ * 两点间的像素距离
47
+ * @param point1
48
+ * @param point2
49
+ * @returns
50
+ */
51
+ private getDistance;
52
+ /**
53
+ * 从聚类结果中创建聚类对象
54
+ * @param locations
55
+ * @returns
56
+ */
57
+ private createClusters;
58
+ /**
59
+ * 按照像素距离聚类
60
+ * @param locations
61
+ * @param eps
62
+ * @param minPoints
63
+ * @returns
64
+ */
65
+ private doPixelCluster;
66
+ private showClusterResult;
17
67
  }
@@ -1,6 +1,8 @@
1
- import o from "@arcgis/core/layers/GraphicsLayer";
2
- class l {
3
- constructor(r) {
1
+ import { Point as y } from "@arcgis/core/geometry";
2
+ import u from "@arcgis/core/Graphic";
3
+ import b from "@arcgis/core/layers/GraphicsLayer";
4
+ class f {
5
+ constructor(e) {
4
6
  this.crossGraphicSymbol = {
5
7
  type: "cim",
6
8
  data: {
@@ -83,44 +85,423 @@ class l {
83
85
  ]
84
86
  }
85
87
  }
86
- }, this.locations = [], this.view = r, this.crossLayer = new o(), this.view.map.add(this.crossLayer);
88
+ }, this.locations = [], this.currentShowMode = "scatter", this.symbolScale = 5e3, this.currentZoom = 0, this.clusterRadius = 120, this.minClusterPoints = 2, this.maxClusterSymbolSize = 50, this.minClusterSymbolSize = 25, this.view = e, this.crossLayer = new b(), this.view.map.add(this.crossLayer), this.currentZoom = e.zoom;
87
89
  }
88
- async showCrosses(r) {
89
- r.forEach((i) => {
90
- i.signals.forEach((e) => {
91
- e.longitude && e.latitude && !isNaN(e.longitude) && !isNaN(e.latitude) && this.locations.push({
92
- id: e.id,
93
- x: e.longitude,
94
- y: e.latitude,
90
+ async addCrosses(e) {
91
+ e.forEach((t) => {
92
+ t.signals.forEach((r) => {
93
+ r.longitude && r.latitude && !isNaN(r.longitude) && !isNaN(r.latitude) && this.locations.push({
94
+ id: r.id,
95
+ x: r.longitude,
96
+ y: r.latitude,
95
97
  visited: !1,
96
98
  clusterId: void 0,
97
- properties: e
99
+ properties: r
98
100
  });
99
- }), i.subDistricts.forEach((e) => {
100
- e.signals.forEach((t) => {
101
- t.longitude && t.latitude && !isNaN(t.longitude) && !isNaN(t.latitude) && this.locations.push({
102
- id: t.id,
103
- x: t.longitude,
104
- y: t.latitude,
101
+ }), t.subDistricts.forEach((r) => {
102
+ r.signals.forEach((s) => {
103
+ s.longitude && s.latitude && !isNaN(s.longitude) && !isNaN(s.latitude) && this.locations.push({
104
+ id: s.id,
105
+ x: s.longitude,
106
+ y: s.latitude,
105
107
  visited: !1,
106
108
  clusterId: void 0,
107
- properties: t
109
+ properties: s
108
110
  });
109
111
  });
110
112
  });
113
+ }), this.zoomWatchHandle = this.view.watch(
114
+ "scale",
115
+ (t, r) => {
116
+ if (this.currentShowMode === "scatter")
117
+ (t < this.symbolScale && r >= this.symbolScale || t >= this.symbolScale && r < this.symbolScale) && (console.log("Scale changed, updating cross display symbol"), this.updateScatterSymbol());
118
+ else if (this.currentShowMode === "cluster" && Math.abs(this.view.zoom - this.currentZoom) >= 1) {
119
+ this.currentZoom = this.view.zoom, this.locationToScreen(), console.time("cluster");
120
+ const s = this.doPixelCluster(
121
+ this.clusterRadius,
122
+ this.minClusterPoints
123
+ );
124
+ console.timeEnd("cluster"), this.showClusterResult(s);
125
+ }
126
+ }
127
+ );
128
+ }
129
+ clearCrosses() {
130
+ var e;
131
+ console.log("Clearing crosses"), this.crossLayer.removeAll(), this.locations = [], (e = this.zoomWatchHandle) == null || e.remove();
132
+ }
133
+ updateScatterSymbol() {
134
+ this.crossLayer.graphics.forEach((e) => {
135
+ e.symbol = this.getCrossSymbol(e.attributes);
136
+ });
137
+ }
138
+ /**
139
+ * 将地理位置转换为屏幕坐标
140
+ */
141
+ locationToScreen() {
142
+ this.locations.forEach((e) => {
143
+ const t = this.view.toScreen(
144
+ new y({ x: e.x, y: e.y })
145
+ );
146
+ e.properties.screenX = t.x, e.properties.screenY = t.y;
111
147
  });
112
148
  }
113
149
  /**
114
150
  * 显示聚合点
115
151
  */
116
152
  showCluster() {
153
+ this.crossLayer.removeAll(), this.currentShowMode = "cluster", this.locationToScreen();
154
+ const e = this.doPixelCluster(
155
+ this.clusterRadius,
156
+ this.minClusterPoints
157
+ );
158
+ this.showClusterResult(e);
117
159
  }
118
160
  /**
119
161
  * 显示散点
120
162
  */
121
163
  showScatter() {
164
+ this.crossLayer.removeAll(), this.currentShowMode = "scatter";
165
+ const e = this.locations.map((t) => new u({
166
+ geometry: {
167
+ type: "point",
168
+ longitude: t.x,
169
+ latitude: t.y
170
+ },
171
+ symbol: this.getCrossSymbol(t.properties),
172
+ attributes: t.properties
173
+ }));
174
+ this.crossLayer.addMany(e);
175
+ }
176
+ /**
177
+ * 确定路口符号
178
+ * @param attributes
179
+ * @returns
180
+ */
181
+ getCrossSymbol(e) {
182
+ if (this.view.scale > this.symbolScale)
183
+ return e.isKey ? {
184
+ // 关键路口用星号图标
185
+ type: "picture-marker",
186
+ url: "/GisViewerAssets/Images/icon_star.png",
187
+ width: "20px",
188
+ height: "20px"
189
+ } : {
190
+ // 普通路口用圆点
191
+ type: "simple-marker",
192
+ style: "circle",
193
+ color: [5, 116, 255, 0.8],
194
+ size: 8,
195
+ outline: {
196
+ color: "white",
197
+ width: 0
198
+ }
199
+ };
200
+ {
201
+ const t = e.isKey ? "/GisViewerAssets/Images/cross/gis_gjxklk_orange.png" : "/GisViewerAssets/Images/cross/gis_xhj_blue.png";
202
+ return {
203
+ type: "cim",
204
+ data: {
205
+ type: "CIMSymbolReference",
206
+ primitiveOverrides: [
207
+ {
208
+ // 将textGraphic的TextString替换为graphic.attributes.name
209
+ type: "CIMPrimitiveOverride",
210
+ primitiveName: "textGraphic",
211
+ propertyName: "TextString",
212
+ valueExpressionInfo: {
213
+ type: "CIMExpressionInfo",
214
+ title: "Custom",
215
+ expression: 'Replace($feature.name, "与", "/") + " " + $feature.signalId',
216
+ returnType: "Default"
217
+ }
218
+ }
219
+ ],
220
+ symbol: {
221
+ type: "CIMPointSymbol",
222
+ symbolLayers: [
223
+ // 路口名称
224
+ {
225
+ type: "CIMVectorMarker",
226
+ size: 32,
227
+ colorLocked: !0,
228
+ anchorPointUnits: "Relative",
229
+ frame: { xmin: -16, ymin: -16, xmax: 16, ymax: 16 },
230
+ markerGraphics: [
231
+ {
232
+ type: "CIMMarkerGraphic",
233
+ primitiveName: "textGraphic",
234
+ geometry: { x: 0, y: 0 },
235
+ symbol: {
236
+ type: "CIMTextSymbol",
237
+ height: 12,
238
+ horizontalAlignment: "Center",
239
+ offsetX: 0,
240
+ offsetY: 20,
241
+ haloSize: 1,
242
+ haloSymbol: {
243
+ type: "CIMPolygonSymbol",
244
+ symbolLayers: [
245
+ {
246
+ type: "CIMSolidFill",
247
+ enable: !0,
248
+ color: [255, 255, 255, 255]
249
+ }
250
+ ]
251
+ },
252
+ symbol: {
253
+ type: "CIMPolygonSymbol",
254
+ symbolLayers: [
255
+ {
256
+ type: "CIMSolidFill",
257
+ enable: !0,
258
+ color: [0, 0, 0, 255]
259
+ }
260
+ ]
261
+ },
262
+ verticalAlignment: "Center"
263
+ },
264
+ textString: ""
265
+ }
266
+ ],
267
+ scaleSymbolsProportionally: !0,
268
+ respectFrame: !0
269
+ },
270
+ // 路口图标
271
+ {
272
+ type: "CIMPictureMarker",
273
+ enable: !0,
274
+ anchorPoint: {
275
+ x: 0,
276
+ y: 0
277
+ },
278
+ anchorPointUnits: "Relative",
279
+ size: 20,
280
+ rotateClockwise: !0,
281
+ textureFilter: "Picture",
282
+ url: t
283
+ }
284
+ ]
285
+ }
286
+ }
287
+ };
288
+ }
289
+ }
290
+ /**
291
+ * 获取邻居点
292
+ * @param locations
293
+ * @param index
294
+ * @param eps
295
+ * @returns
296
+ */
297
+ getNeighbors(e, t) {
298
+ return this.locations.filter((r) => r.id === e.id || r.visited ? !1 : this.getDistance(e, r) <= t);
299
+ }
300
+ /**
301
+ * 两点间的像素距离
302
+ * @param point1
303
+ * @param point2
304
+ * @returns
305
+ */
306
+ getDistance(e, t) {
307
+ return Math.sqrt(
308
+ Math.pow(e.properties.screenX - t.properties.screenX, 2) + Math.pow(e.properties.screenY - t.properties.screenY, 2)
309
+ );
310
+ }
311
+ /**
312
+ * 从聚类结果中创建聚类对象
313
+ * @param locations
314
+ * @returns
315
+ */
316
+ createClusters(e) {
317
+ const t = {}, r = [];
318
+ for (let i = 0; i < e.length; i++) {
319
+ const o = e[i];
320
+ o.clusterId === void 0 || o.clusterId === -1 ? r.push(o) : (t[o.clusterId] || (t[o.clusterId] = []), t[o.clusterId].push(o));
321
+ }
322
+ const s = Object.keys(t).map((i, o) => {
323
+ const a = t[Number(i)], l = a.length, n = a.reduce((c, m) => c + m.x, 0), h = a.reduce((c, m) => c + m.y, 0), p = n / l, d = h / l;
324
+ return {
325
+ id: Number(i),
326
+ items: a,
327
+ count: l,
328
+ center: {
329
+ x: p,
330
+ y: d
331
+ }
332
+ };
333
+ });
334
+ return r.length > 0 && s.push({
335
+ id: -1,
336
+ items: r,
337
+ count: r.length,
338
+ center: null
339
+ }), s;
340
+ }
341
+ /**
342
+ * 按照像素距离聚类
343
+ * @param locations
344
+ * @param eps
345
+ * @param minPoints
346
+ * @returns
347
+ */
348
+ doPixelCluster(e, t) {
349
+ let r = 0;
350
+ this.locations.forEach((s) => {
351
+ s.visited = !1, s.clusterId = void 0;
352
+ });
353
+ for (let s = 0; s < this.locations.length; s++) {
354
+ const i = this.locations[s];
355
+ if (i.visited)
356
+ continue;
357
+ i.visited = !0;
358
+ const o = this.getNeighbors(i, e);
359
+ o.length < t ? i.clusterId = -1 : (o.forEach((a) => {
360
+ a.visited = !0, a.clusterId = r;
361
+ }), i.clusterId = r, r++);
362
+ }
363
+ return this.createClusters(this.locations);
364
+ }
365
+ showClusterResult(e) {
366
+ this.crossLayer.removeAll();
367
+ let t = Number.MIN_VALUE, r = Number.MAX_VALUE;
368
+ e.forEach((s) => {
369
+ s.count > 1 && (r = Math.min(r, s.count), t = Math.max(t, s.count));
370
+ }), e.forEach((s) => {
371
+ if (s.id !== -1) {
372
+ let i = r === t ? (this.maxClusterSymbolSize + this.minClusterSymbolSize) / 2 : this.minClusterSymbolSize + (s.count - r) / (t - r) * (this.maxClusterSymbolSize - this.minClusterSymbolSize);
373
+ i *= 0.75;
374
+ const l = (s.count.toString().length * 8 + 6) / 2, n = new u({
375
+ geometry: new y({ x: s.center.x, y: s.center.y }),
376
+ attributes: {
377
+ count: s.count
378
+ },
379
+ symbol: {
380
+ type: "cim",
381
+ data: {
382
+ type: "CIMSymbolReference",
383
+ primitiveOverrides: [
384
+ {
385
+ // 将textGraphic的TextString替换为graphic.attributes.name
386
+ type: "CIMPrimitiveOverride",
387
+ primitiveName: "textGraphic",
388
+ propertyName: "TextString",
389
+ valueExpressionInfo: {
390
+ type: "CIMExpressionInfo",
391
+ title: "Custom",
392
+ expression: "$feature.count",
393
+ returnType: "Default"
394
+ }
395
+ }
396
+ ],
397
+ symbol: {
398
+ type: "CIMPointSymbol",
399
+ symbolLayers: [
400
+ // 聚合数量
401
+ {
402
+ type: "CIMVectorMarker",
403
+ size: i,
404
+ colorLocked: !0,
405
+ anchorPointUnits: "Relative",
406
+ frame: { xmin: -16, ymin: -16, xmax: 16, ymax: 16 },
407
+ markerGraphics: [
408
+ // 数量文本框
409
+ {
410
+ type: "CIMMarkerGraphic",
411
+ geometry: {
412
+ rings: [
413
+ [
414
+ [-l, 40],
415
+ [l, 40],
416
+ [l, 20],
417
+ [-l, 20],
418
+ [-l, 40]
419
+ ]
420
+ ]
421
+ },
422
+ symbol: {
423
+ type: "CIMPolygonSymbol",
424
+ symbolLayers: [
425
+ {
426
+ type: "CIMSolidFill",
427
+ enable: !0,
428
+ color: [2, 72, 200, 255]
429
+ },
430
+ {
431
+ type: "CIMSolidStroke",
432
+ enable: !0,
433
+ width: 5,
434
+ color: [2, 72, 200, 128]
435
+ }
436
+ ]
437
+ }
438
+ },
439
+ // 数量文字
440
+ {
441
+ type: "CIMMarkerGraphic",
442
+ primitiveName: "textGraphic",
443
+ geometry: { x: 0, y: 0 },
444
+ symbol: {
445
+ type: "CIMTextSymbol",
446
+ height: 16,
447
+ horizontalAlignment: "Center",
448
+ offsetX: 0,
449
+ offsetY: 30,
450
+ symbol: {
451
+ type: "CIMPolygonSymbol",
452
+ symbolLayers: [
453
+ {
454
+ type: "CIMSolidFill",
455
+ enable: !0,
456
+ color: [255, 255, 255, 255]
457
+ }
458
+ ]
459
+ },
460
+ verticalAlignment: "Center"
461
+ },
462
+ textString: ""
463
+ }
464
+ ],
465
+ scaleSymbolsProportionally: !0,
466
+ respectFrame: !0
467
+ },
468
+ // 聚合图标
469
+ {
470
+ type: "CIMPictureMarker",
471
+ enable: !0,
472
+ anchorPoint: {
473
+ x: 0,
474
+ y: 0
475
+ },
476
+ anchorPointUnits: "Relative",
477
+ size: i,
478
+ rotateClockwise: !0,
479
+ textureFilter: "Picture",
480
+ url: "/GisViewerAssets/Images/cross/gis_xhj_blue.png"
481
+ }
482
+ ]
483
+ }
484
+ }
485
+ }
486
+ });
487
+ this.crossLayer.add(n);
488
+ } else
489
+ s.items.forEach((i) => {
490
+ const o = new u({
491
+ geometry: new y({ x: i.x, y: i.y }),
492
+ attributes: {
493
+ ...i,
494
+ ...i.properties,
495
+ type: "clusterPoint",
496
+ id: i.id
497
+ },
498
+ symbol: this.crossGraphicSymbol
499
+ });
500
+ this.crossLayer.add(o);
501
+ });
502
+ });
122
503
  }
123
504
  }
124
505
  export {
125
- l as default
506
+ f as default
126
507
  };
@@ -8,8 +8,8 @@ class f {
8
8
  // private roadLines!: IRoadLine[];
9
9
  constructor(t) {
10
10
  this.view = t;
11
- const i = a.useAppDataStore;
12
- this.mapConfig = JSON.parse(JSON.stringify(i.mapConfig)), this.districtRenderer = new l(t), this.subDistrictRenderer = new d(t), this.signalRenderer = new o(t), this.crossRenderer = new c(t);
11
+ const s = a.useAppDataStore;
12
+ this.mapConfig = JSON.parse(JSON.stringify(s.mapConfig)), this.districtRenderer = new l(t), this.subDistrictRenderer = new d(t), this.signalRenderer = new o(t), this.crossRenderer = new c(t);
13
13
  }
14
14
  /**
15
15
  * 显示所有区控、子区、信号机
@@ -18,15 +18,15 @@ class f {
18
18
  */
19
19
  async showSignalControlArea(t) {
20
20
  await this.clearSignalControlArea(), this.districtRenderer.setVisible(!1), this.subDistrictRenderer.setVisible(!1), this.signalRenderer.setClusterVisible(!1), this.signalRenderer.setPointVisible(!1);
21
- const i = [], s = [];
21
+ const s = [], i = [];
22
22
  for (const e of t.areaList) {
23
23
  const n = new r(
24
24
  e,
25
25
  t.style || ""
26
26
  );
27
- i.push(n), s.push(...n.subDistricts);
27
+ s.push(n), i.push(...n.subDistricts);
28
28
  }
29
- return this.districtRenderer.style = t.style || "", await this.districtRenderer.showDistricts(i), await this.subDistrictRenderer.showSubDistricts(s), this.crossRenderer.showCrosses(i), { status: 0, message: "ok" };
29
+ return this.districtRenderer.style = t.style || "", await this.districtRenderer.showDistricts(s), await this.subDistrictRenderer.showSubDistricts(i), this.crossRenderer.addCrosses(s), { status: 0, message: "ok" };
30
30
  }
31
31
  /**
32
32
  * 显示单个区控
@@ -34,14 +34,14 @@ class f {
34
34
  */
35
35
  async showDistrict(t) {
36
36
  this.setLayerVisibility({ id: "district", visible: !0 }), this.setLayerVisibility({ id: "subDistrict", visible: !0 });
37
- const i = new r(
37
+ const s = new r(
38
38
  t.areaList,
39
39
  t.style || ""
40
40
  );
41
- await this.districtRenderer.showDistricts([i]), await this.subDistrictRenderer.showSubDistricts(
42
- i.subDistricts
41
+ await this.districtRenderer.showDistricts([s]), await this.subDistrictRenderer.showSubDistricts(
42
+ s.subDistricts
43
43
  ), await this.subDistrictRenderer.showRoads({
44
- id: i.id,
44
+ id: s.id,
45
45
  type: "district"
46
46
  });
47
47
  }
@@ -51,12 +51,12 @@ class f {
51
51
  */
52
52
  async showSubDistrict(t) {
53
53
  this.setLayerVisibility({ id: "subDistrict", visible: !0 });
54
- const i = new r(
54
+ const s = new r(
55
55
  t.areaList,
56
56
  t.style || ""
57
57
  );
58
- await this.subDistrictRenderer.showSubDistricts([i]), await this.subDistrictRenderer.showRoads({
59
- id: i.id,
58
+ await this.subDistrictRenderer.showSubDistricts([s]), await this.subDistrictRenderer.showRoads({
59
+ id: s.id,
60
60
  type: "subDistrict"
61
61
  });
62
62
  }
@@ -65,7 +65,7 @@ class f {
65
65
  * @returns
66
66
  */
67
67
  async clearSignalControlArea() {
68
- return await this.districtRenderer.clearDistricts(), await this.subDistrictRenderer.clearSubDistricts(), await this.signalRenderer.clearSignals(), { status: 0, message: "ok" };
68
+ return this.crossRenderer.clearCrosses(), await this.districtRenderer.clearDistricts(), await this.subDistrictRenderer.clearSubDistricts(), await this.signalRenderer.clearSignals(), { status: 0, message: "ok" };
69
69
  }
70
70
  /**
71
71
  * 设置区控、子区、信号机图层可见性
@@ -80,6 +80,12 @@ class f {
80
80
  case "subDistrict":
81
81
  this.subDistrictRenderer.setVisible(t.visible);
82
82
  break;
83
+ case "signal":
84
+ this.crossRenderer.showScatter();
85
+ break;
86
+ case "signalCluster":
87
+ this.crossRenderer.showCluster();
88
+ break;
83
89
  }
84
90
  return { status: 0, message: "ok" };
85
91
  }
@@ -110,12 +116,12 @@ class f {
110
116
  case "district":
111
117
  return await this.districtRenderer.highlightDistrict(t) ? (this.subDistrictRenderer.filter(t), this.signalRenderer.filter(t), await this.subDistrictRenderer.showRoads(t), { status: 0, message: "ok" }) : { status: 1, message: "未找到区控" };
112
118
  case "subDistrict": {
113
- const { count: i, parentId: s } = await this.subDistrictRenderer.highlightSubDistrict(t);
114
- return i > 0 ? (this.districtRenderer.filter(s), this.signalRenderer.filter(t), { status: 0, message: "ok" }) : { status: 1, message: "未找到子区" };
119
+ const { count: s, parentId: i } = await this.subDistrictRenderer.highlightSubDistrict(t);
120
+ return s > 0 ? (this.districtRenderer.filter(i), this.signalRenderer.filter(t), { status: 0, message: "ok" }) : { status: 1, message: "未找到子区" };
115
121
  }
116
122
  case "signal": {
117
- const { districtId: i, subDistrictId: s, count: e } = await this.signalRenderer.highlightSignal(t.id);
118
- return e > 0 ? (this.districtRenderer.filter(i), this.subDistrictRenderer.filter(t), { status: 0, message: "ok" }) : { status: 1, message: "未找到信号机" };
123
+ const { districtId: s, subDistrictId: i, count: e } = await this.signalRenderer.highlightSignal(t.id);
124
+ return e > 0 ? (this.districtRenderer.filter(s), this.subDistrictRenderer.filter(t), { status: 0, message: "ok" }) : { status: 1, message: "未找到信号机" };
119
125
  }
120
126
  default:
121
127
  return { status: 1, message: "未知类型" };
@@ -265,6 +265,11 @@ export interface ISplitOpenDriveLaneParams {
265
265
  start?: number;
266
266
  end?: number;
267
267
  }
268
+ export interface IBlockOpenDriveLaneParams {
269
+ roadsectId: string;
270
+ roadsectBaseId: string;
271
+ laneId: string;
272
+ }
268
273
  export interface IJunctionTableData {
269
274
  id: string;
270
275
  name: string;
@@ -1,6 +1,6 @@
1
1
  import MapView from '@arcgis/core/views/MapView';
2
2
  import SceneView from '@arcgis/core/views/SceneView';
3
- import { IClusterPointParams, IEditSignalControlAreaParams, IFindSignalControlAreaParams, IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowEdpassDeviceParams, IShowGreenWaveBandParams, IShowJurisdictionParams, IShowOpenDriveFromFileParams, IShowSignalControlAreaParams, ISignalCountdownProps, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
3
+ import { IBlockOpenDriveLaneParams, IClusterPointParams, IEditSignalControlAreaParams, IFindSignalControlAreaParams, IFindSumoParams, ILaneNumberParams, ILayerVisibleParams, ILookAtParams, IMaskParam, IOverlayParam, IQueueLengthParams, ISetMapCameraParams, ISetMapCenterParams, IShowEdpassDeviceParams, IShowGreenWaveBandParams, IShowJurisdictionParams, IShowOpenDriveFromFileParams, IShowSignalControlAreaParams, ISignalCountdownProps, ISplitOpenDriveLaneParams, IStartCrossBufferParam, IToggleTrafficInfoParams, IUnselectSumoParams } from '../types';
4
4
  import DbscanCluster from './utils/dbscan-cluster';
5
5
  import EdpassDeviceController from './utils/edpass-device-controller';
6
6
  import GreenWaveBandController from './utils/green-wave-band-controller';
@@ -142,6 +142,14 @@ declare const _sfc_main: import("vue").DefineComponent<{
142
142
  status: number;
143
143
  message: string;
144
144
  }>;
145
+ blockOpenDriveLane: (params: IBlockOpenDriveLaneParams) => Promise<void | {
146
+ status: number;
147
+ message: string;
148
+ }>;
149
+ clearBlockOpenDriveLane: () => void | {
150
+ status: number;
151
+ message: string;
152
+ };
145
153
  showSignalControlArea: (params: IShowSignalControlAreaParams) => Promise<import("../types").IResult>;
146
154
  showDistrictArea: (params: IShowSignalControlAreaParams) => Promise<void>;
147
155
  showSubDistrictArea: (params: IShowSignalControlAreaParams) => Promise<void>;