gisviewer-vue3-arcgis 1.0.266 → 1.0.267

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.
@@ -1,12 +1,12 @@
1
1
  import L from "@arcgis/core/Basemap";
2
2
  import v from "@arcgis/core/config";
3
3
  import * as M from "@arcgis/core/core/reactiveUtils";
4
- import { Multipoint as z, Polygon as k, Polyline as W, Point as T } from "@arcgis/core/geometry";
4
+ import { Multipoint as W, Polygon as k, Polyline as I, Point as T } from "@arcgis/core/geometry";
5
5
  import * as b from "@arcgis/core/geometry/support/webMercatorUtils";
6
- import { webMercatorToGeographic as I } from "@arcgis/core/geometry/support/webMercatorUtils";
6
+ import { webMercatorToGeographic as G } from "@arcgis/core/geometry/support/webMercatorUtils";
7
7
  import C from "@arcgis/core/Graphic";
8
- import G from "@arcgis/core/layers/FeatureLayer";
9
- import x from "@arcgis/core/layers/GeoJSONLayer";
8
+ import x from "@arcgis/core/layers/FeatureLayer";
9
+ import P from "@arcgis/core/layers/GeoJSONLayer";
10
10
  import S from "@arcgis/core/layers/GroupLayer";
11
11
  import H from "@arcgis/core/layers/IntegratedMesh3DTilesLayer";
12
12
  import B from "@arcgis/core/layers/MapImageLayer";
@@ -15,9 +15,9 @@ import R from "@arcgis/core/layers/WebTileLayer";
15
15
  import E from "@arcgis/core/layers/WMSLayer";
16
16
  import N from "@arcgis/core/Map";
17
17
  import A from "@arcgis/core/views/MapView";
18
- import U from "@arcgis/core/views/SceneView";
19
- import V from "@turf/destination";
20
- import * as j from "@turf/helpers";
18
+ import j from "@arcgis/core/views/SceneView";
19
+ import U from "@turf/destination";
20
+ import * as V from "@turf/helpers";
21
21
  import D from "@arcgis/core/layers/GraphicsLayer";
22
22
  import J from "./custom-layer/custom-wmts-layer.mjs";
23
23
  class me {
@@ -35,7 +35,7 @@ class me {
35
35
  async initialize(e) {
36
36
  var p, u, g, f;
37
37
  this.mapConfig = e.mapConfig;
38
- const { container: i, markerClickCallback: s, mapClickCallback: a } = e;
38
+ const { container: i, markerClickCallback: s, mapClickCallback: r } = e;
39
39
  v.assetsPath = `${this.mapConfig.assetsRoot}/ArcgisAssets`, v.fontsUrl = `${this.mapConfig.assetsRoot}/fonts`, v.apiKey = "AAPKf5a3e1044d7a4faeb3b1ec7060f5c68equIrP2KbRyL-t_b40Kk4GTWUQ1BFCyttvyQPQnWpFmBd7kp9gkrVihjfmcKBwxjW";
40
40
  const o = new N();
41
41
  ((p = this.mapConfig) == null ? void 0 : p.mapOptions.mode.toLowerCase()) === "2d" ? (this.view = new A({
@@ -44,7 +44,7 @@ class me {
44
44
  ...this.mapConfig.mapOptions
45
45
  }), this.view.on("drag", (t) => {
46
46
  t.button === 2 && t.stopPropagation();
47
- })) : this.view = new U({
47
+ })) : this.view = new j({
48
48
  map: o,
49
49
  container: i,
50
50
  environment: {
@@ -64,46 +64,46 @@ class me {
64
64
  breakpoint: !1
65
65
  }, this.view.on("click", async (t) => {
66
66
  var h, y;
67
- if (a) {
68
- let n = t.mapPoint;
69
- n.spatialReference.isWebMercator && (n = b.webMercatorToGeographic(
70
- n
71
- )), a(
72
- [n.x, n.y],
67
+ if (r) {
68
+ let c = t.mapPoint;
69
+ c.spatialReference.isWebMercator && (c = b.webMercatorToGeographic(
70
+ c
71
+ )), r(
72
+ [c.x, c.y],
73
73
  [t.screenPoint.x, t.screenPoint.y],
74
74
  t
75
75
  );
76
76
  }
77
77
  if (this.view.type === "3d") {
78
- const n = this.view.camera;
78
+ const c = this.view.camera;
79
79
  if (this.view.spatialReference.isWebMercator) {
80
80
  const w = b.webMercatorToGeographic(
81
- n.position
81
+ c.position
82
82
  ), d = {
83
- heading: n.heading,
84
- tilt: n.tilt,
83
+ heading: c.heading,
84
+ tilt: c.tilt,
85
85
  position: w.toJSON()
86
86
  };
87
87
  console.log(d), (h = navigator.clipboard) == null || h.writeText(JSON.stringify(d));
88
88
  } else
89
- console.log(n.toJSON());
89
+ console.log(c.toJSON());
90
90
  console.log(this.view.zoom, this.view.scale);
91
91
  } else {
92
- let n = this.view.center;
93
- this.view.spatialReference.isWebMercator && (n = b.webMercatorToGeographic(
94
- n
92
+ let c = this.view.center;
93
+ this.view.spatialReference.isWebMercator && (c = b.webMercatorToGeographic(
94
+ c
95
95
  )), console.log({
96
- center: n.toJSON(),
96
+ center: c.toJSON(),
97
97
  zoom: this.view.zoom,
98
98
  scale: this.view.scale
99
99
  });
100
100
  }
101
- const c = (y = (await this.view.hitTest(t)).results) == null ? void 0 : y.filter(
102
- (n) => n.type === "graphic"
101
+ const n = (y = (await this.view.hitTest(t)).results) == null ? void 0 : y.filter(
102
+ (c) => c.type === "graphic"
103
103
  );
104
- c.length > 0 && c.forEach((n) => {
104
+ n.length > 0 && n.forEach((c) => {
105
105
  var d;
106
- const w = n.graphic;
106
+ const w = c.graphic;
107
107
  (d = w.attributes) != null && d.type && s && s(
108
108
  w.attributes.type,
109
109
  w.attributes.id,
@@ -113,19 +113,19 @@ class me {
113
113
  });
114
114
  });
115
115
  {
116
- let t = 0, r = !1;
117
- this.view.on("pointer-move", async (c) => {
116
+ let t = 0, a = !1;
117
+ this.view.on("pointer-move", async (n) => {
118
118
  var y;
119
119
  const h = performance.now();
120
- if (!(r || h - t < 100)) {
121
- t = h, r = !0;
120
+ if (!(a || h - t < 100)) {
121
+ t = h, a = !0;
122
122
  try {
123
- const w = (y = (await this.view.hitTest(c)).results) == null ? void 0 : y.some(
124
- (P) => P.type === "graphic"
123
+ const w = (y = (await this.view.hitTest(n)).results) == null ? void 0 : y.some(
124
+ (z) => z.type === "graphic"
125
125
  ), d = this.view.container;
126
126
  d && (d.style.cursor = w ? "pointer" : "default");
127
127
  } finally {
128
- r = !1;
128
+ a = !1;
129
129
  }
130
130
  }
131
131
  });
@@ -134,33 +134,33 @@ class me {
134
134
  const t = this.view.container;
135
135
  t && (t.style.cursor = "default");
136
136
  }), (g = this.mapConfig) != null && g.baseLayers ? this.mapConfig.baseLayers.forEach((t) => {
137
- const r = this.processUrl(t.url);
138
- let c = null;
137
+ const a = this.processUrl(t.url);
138
+ let n = null;
139
139
  switch (t.type.toLowerCase()) {
140
140
  case "webTile".toLowerCase(): {
141
- c = new R({
142
- urlTemplate: r,
141
+ n = new R({
142
+ urlTemplate: a,
143
143
  ...t.options
144
144
  });
145
145
  break;
146
146
  }
147
147
  case "tile": {
148
- c = new O({
149
- url: r,
148
+ n = new O({
149
+ url: a,
150
150
  ...t.options
151
151
  });
152
152
  break;
153
153
  }
154
154
  case "customwmts".toLowerCase(): {
155
- c = new J({
156
- urlTemplate: r,
155
+ n = new J({
156
+ urlTemplate: a,
157
157
  ...t.options
158
158
  });
159
159
  break;
160
160
  }
161
161
  case "mapimage".toLowerCase(): {
162
- c = new B({
163
- url: r,
162
+ n = new B({
163
+ url: a,
164
164
  ...t.options
165
165
  });
166
166
  break;
@@ -171,36 +171,43 @@ class me {
171
171
  break;
172
172
  }
173
173
  case "feature": {
174
- c = new G({ url: r, ...t.options });
174
+ n = new x({ url: a, ...t.options });
175
175
  break;
176
176
  }
177
177
  case "3dtiles": {
178
- c = new H({
179
- url: r,
178
+ n = new H({
179
+ url: a,
180
180
  ...t.options
181
181
  });
182
182
  break;
183
183
  }
184
184
  case "wms": {
185
- c = new E({
186
- url: r,
185
+ n = new E({
186
+ url: a,
187
+ ...t.options
188
+ });
189
+ break;
190
+ }
191
+ case "geojson": {
192
+ n = new P({
193
+ url: a,
187
194
  ...t.options
188
195
  });
189
196
  break;
190
197
  }
191
198
  }
192
- if (c)
199
+ if (n)
193
200
  if (t.group) {
194
201
  let h = o.findLayerById(t.group);
195
- h && h.type === "group" ? h.add(c) : (h = new S({
202
+ h && h.type === "group" ? h.add(n) : (h = new S({
196
203
  id: t.group,
197
204
  title: t.groupTitle,
198
205
  visibilityMode: "inherited",
199
- layers: [c],
206
+ layers: [n],
200
207
  visible: t.groupVisible !== !1
201
208
  }), o.add(h));
202
209
  } else
203
- o.add(c);
210
+ o.add(n);
204
211
  }) : o.basemap = new L({
205
212
  style: {
206
213
  id: "arcgis/light-gray",
@@ -208,12 +215,12 @@ class me {
208
215
  }
209
216
  }), (f = this.mapConfig) != null && f.hdLayers) {
210
217
  const t = this.mapConfig.hdLayers.map(
211
- (r) => (
218
+ (a) => (
212
219
  // 图层文件为GeoJson格式, renderer和symbol使用autocast配置
213
- new x({
214
- url: this.processUrl(r.url),
215
- ...r.options,
216
- title: r.options.id
220
+ new P({
221
+ url: this.processUrl(a.url),
222
+ ...a.options,
223
+ title: a.options.id
217
224
  })
218
225
  )
219
226
  );
@@ -244,8 +251,8 @@ class me {
244
251
  if (i === "shanghai_district")
245
252
  return !this.detachmentLayerLoaded && e.visible ? await this.loadDetachmentLayer() : this.detachmentLayer && (this.detachmentLayer.visible = s), { status: 0, message: "ok" };
246
253
  {
247
- const a = this.view.map.findLayerById(i);
248
- return a ? (a.visible = s, { status: 0, message: "ok" }) : { status: -1, message: "未找到图层" };
254
+ const r = this.view.map.findLayerById(i);
255
+ return r ? (r.visible = s, { status: 0, message: "ok" }) : { status: -1, message: "未找到图层" };
249
256
  }
250
257
  }
251
258
  /**
@@ -263,13 +270,13 @@ class me {
263
270
  e.target = new T(e.target);
264
271
  break;
265
272
  case "polyline":
266
- e.target = new W(e.target);
273
+ e.target = new I(e.target);
267
274
  break;
268
275
  case "polygon":
269
276
  e.target = new k(e.target);
270
277
  break;
271
278
  case "multipoint":
272
- e.target = new z(e.target);
279
+ e.target = new W(e.target);
273
280
  break;
274
281
  }
275
282
  await this.view.goTo(e, { duration: (e.duration || 0) * 1e3 });
@@ -300,9 +307,9 @@ class me {
300
307
  { duration: (e.duration || 2) * 1e3 }
301
308
  );
302
309
  else {
303
- const a = Math.tan(i * Math.PI / 180) * e.height, o = V(
304
- j.point(e.center),
305
- a,
310
+ const r = Math.tan(i * Math.PI / 180) * e.height, o = U(
311
+ V.point(e.center),
312
+ r,
306
313
  s + 180,
307
314
  {
308
315
  units: "meters"
@@ -325,10 +332,10 @@ class me {
325
332
  async setMapCamera(e) {
326
333
  if (!this.view)
327
334
  return { status: -1, message: "未初始化" };
328
- const { name: i, duration: s = 0 } = e, { camera: a } = this.mapConfig;
329
- if (!a)
335
+ const { name: i, duration: s = 0 } = e, { camera: r } = this.mapConfig;
336
+ if (!r)
330
337
  return { status: -1, message: "未配置camera" };
331
- const o = a[i];
338
+ const o = r[i];
332
339
  return o ? (await this.view.goTo(o, { duration: s * 1e3 }), { status: 0, message: "成功" }) : { status: -1, message: "未配置camera" };
333
340
  }
334
341
  /**
@@ -350,8 +357,8 @@ class me {
350
357
  const s = new T({
351
358
  x: i[0],
352
359
  y: i[1]
353
- }), a = this.view.toScreen(s);
354
- return [a.x, a.y];
360
+ }), r = this.view.toScreen(s);
361
+ return [r.x, r.y];
355
362
  });
356
363
  }
357
364
  /**
@@ -368,8 +375,8 @@ class me {
368
375
  const { min: i, max: s } = e;
369
376
  !i && !s || (this.zoomWatchHandle && this.zoomWatchHandle.remove(), this.zoomWatchHandle = M.watch(
370
377
  () => this.view.zoom,
371
- (a) => {
372
- i && a <= i && (this.view.zoom = i), s && a >= s && (this.view.zoom = s);
378
+ (r) => {
379
+ i && r <= i && (this.view.zoom = i), s && r >= s && (this.view.zoom = s);
373
380
  }
374
381
  ));
375
382
  }
@@ -392,16 +399,16 @@ class me {
392
399
  );
393
400
  if (i)
394
401
  try {
395
- const a = await (await fetch(
402
+ const r = await (await fetch(
396
403
  "/GisViewerAssets/ShangHai/Layers/district.json"
397
404
  )).json(), o = [], { renderer: l, labelingInfo: m } = i.options;
398
- a.features.forEach((p) => {
405
+ r.features.forEach((p) => {
399
406
  const u = p.attributes.ZD_NAME;
400
407
  if (u !== "高架支队") {
401
408
  let g = new k({
402
409
  rings: p.geometry.rings
403
410
  });
404
- g = I(g);
411
+ g = G(g);
405
412
  const f = new C({
406
413
  geometry: g,
407
414
  attributes: p.attributes
@@ -410,10 +417,10 @@ class me {
410
417
  if (l.type === "simple")
411
418
  f.symbol = l.symbol;
412
419
  else if (l.type === "unique-value") {
413
- const t = f.getAttribute("OBJECTID"), r = l.uniqueValueInfos.find(
414
- (c) => c.value == t
420
+ const t = f.getAttribute("OBJECTID"), a = l.uniqueValueInfos.find(
421
+ (n) => n.value == t
415
422
  );
416
- f.symbol = r ? r.symbol : l.defaultSymbol;
423
+ f.symbol = a ? a.symbol : l.defaultSymbol;
417
424
  }
418
425
  } else
419
426
  f.symbol = {
@@ -1,7 +1,7 @@
1
1
  import { Point as h } from "@arcgis/core/geometry";
2
2
  import u from "@arcgis/core/Graphic";
3
- import d from "@arcgis/core/layers/GraphicsLayer";
4
- class C {
3
+ import p from "@arcgis/core/layers/GraphicsLayer";
4
+ class x {
5
5
  constructor(e) {
6
6
  this.crossGraphicSymbol = {
7
7
  type: "cim",
@@ -85,26 +85,28 @@ class C {
85
85
  ]
86
86
  }
87
87
  }
88
- }, this.locations = [], this.clusteredLocations = [], this.filteredLocations = [], this.currentShowMode = "scatter", this.symbolScale = 5e3, this.oldScale = 0, this.clusterRadius = 120, this.minClusterPoints = 2, this.maxClusterSymbolSize = 50, this.minClusterSymbolSize = 25, this.view = e, this.crossLayer = new d(), this.view.map.add(this.crossLayer), this.oldScale = e.scale;
88
+ }, this.locations = [], this.clusteredLocations = [], this.filteredLocations = [], this.currentShowMode = "scatter", this.symbolScale = 5e3, this.oldScale = 0, this.clusterRadius = 120, this.minClusterPoints = 2, this.maxClusterSymbolSize = 50, this.minClusterSymbolSize = 25, this.view = e, this.crossLayer = new p(), this.view.map.add(this.crossLayer), this.oldScale = e.scale;
89
89
  }
90
90
  async addCrosses(e) {
91
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,
92
+ t.signals.forEach((i) => {
93
+ i.longitude && i.latitude && !isNaN(i.longitude) && !isNaN(i.latitude) && this.locations.push({
94
+ id: i.id,
95
+ x: i.longitude,
96
+ y: i.latitude,
97
97
  visited: !1,
98
98
  filtered: !1,
99
99
  clusterId: void 0,
100
100
  properties: {
101
- ...r,
101
+ ...i,
102
102
  districtId: t.id,
103
- subDistrictId: ""
103
+ districtName: t.name,
104
+ subDistrictId: "",
105
+ subDistrictName: ""
104
106
  }
105
107
  });
106
- }), t.subDistricts.forEach((r) => {
107
- r.signals.forEach((s) => {
108
+ }), t.subDistricts.forEach((i) => {
109
+ i.signals.forEach((s) => {
108
110
  s.longitude && s.latitude && !isNaN(s.longitude) && !isNaN(s.latitude) && this.locations.push({
109
111
  id: s.id,
110
112
  x: s.longitude,
@@ -115,7 +117,9 @@ class C {
115
117
  properties: {
116
118
  ...s,
117
119
  districtId: t.id,
118
- subDistrictId: r.id
120
+ districtName: t.name,
121
+ subDistrictId: i.id,
122
+ subDistrictName: i.name
119
123
  }
120
124
  });
121
125
  });
@@ -137,7 +141,7 @@ class C {
137
141
  */
138
142
  clearCrosses() {
139
143
  var e;
140
- console.log("Clearing crosses"), this.crossLayer.removeAll(), this.locations = [], this.clusteredLocations = [], (e = this.zoomWatchHandle) == null || e.remove();
144
+ this.crossLayer.removeAll(), this.locations = [], this.clusteredLocations = [], (e = this.zoomWatchHandle) == null || e.remove();
141
145
  }
142
146
  /**
143
147
  * 更新散点符号
@@ -174,16 +178,42 @@ class C {
174
178
  const e = [];
175
179
  this.locations.forEach((t) => {
176
180
  if (!t.filtered) {
177
- const r = new u({
181
+ const i = new u({
178
182
  geometry: {
179
183
  type: "point",
180
184
  longitude: t.x,
181
185
  latitude: t.y
182
186
  },
183
187
  symbol: this.getCrossSymbol(t.properties),
184
- attributes: t.properties
188
+ attributes: t.properties,
189
+ popupTemplate: {
190
+ title: "{name}信号机",
191
+ content: [
192
+ {
193
+ type: "fields",
194
+ fieldInfos: [
195
+ {
196
+ fieldName: "signalId",
197
+ label: "信号机编号"
198
+ },
199
+ {
200
+ fieldName: "nodeId",
201
+ label: "路口编号"
202
+ },
203
+ {
204
+ fieldName: "districtName",
205
+ label: "区控名称"
206
+ },
207
+ {
208
+ fieldName: "subDistrictName",
209
+ label: "子区名称"
210
+ }
211
+ ]
212
+ }
213
+ ]
214
+ }
185
215
  });
186
- e.push(r);
216
+ e.push(i);
187
217
  }
188
218
  }), this.crossLayer.addMany(e);
189
219
  }
@@ -196,17 +226,17 @@ class C {
196
226
  filter(e) {
197
227
  this.locations.forEach((t) => {
198
228
  if (e.type === "district")
199
- t.filtered = t.properties.districtId === e.id;
229
+ t.filtered = t.properties.districtId !== e.id;
200
230
  else if (e.type === "subDistrict")
201
- t.filtered = t.properties.subDistrictId === e.id;
202
- else if (e.type === "signal" && (t.filtered = t.id === e.id, t.filtered))
231
+ t.filtered = t.properties.subDistrictId !== e.id;
232
+ else if (e.type === "signal" && (t.filtered = t.id !== e.id, t.filtered))
203
233
  return t.properties;
204
234
  });
205
235
  }
206
236
  resetFilter() {
207
237
  this.locations.forEach((e) => {
208
238
  e.filtered = !1;
209
- });
239
+ }), this.currentShowMode === "scatter" ? this.showScatter() : this.currentShowMode === "cluster" && this.showCluster();
210
240
  }
211
241
  /**
212
242
  * 根据当前比例尺更新路口符号
@@ -330,7 +360,7 @@ class C {
330
360
  * @returns
331
361
  */
332
362
  getNeighbors(e, t) {
333
- return this.clusteredLocations.filter((r) => r.id === e.id || r.visited ? !1 : this.getDistance(e, r) <= t);
363
+ return this.clusteredLocations.filter((i) => i.id === e.id || i.visited ? !1 : this.getDistance(e, i) <= t);
334
364
  }
335
365
  /**
336
366
  * 两点间的像素距离
@@ -352,24 +382,24 @@ class C {
352
382
  const e = {}, t = [];
353
383
  for (const s of this.clusteredLocations)
354
384
  s.clusterId === void 0 || s.clusterId === -1 ? t.push(s) : (e[s.clusterId] || (e[s.clusterId] = []), e[s.clusterId].push(s));
355
- const r = Object.keys(e).map((s, i) => {
356
- const o = e[Number(s)], a = o.length, l = o.reduce((n, y) => n + y.x, 0), c = o.reduce((n, y) => n + y.y, 0), m = l / a, p = c / a;
385
+ const i = Object.keys(e).map((s, r) => {
386
+ const o = e[Number(s)], a = o.length, l = o.reduce((n, m) => n + m.x, 0), c = o.reduce((n, m) => n + m.y, 0), y = l / a, d = c / a;
357
387
  return {
358
388
  id: Number(s),
359
389
  items: o,
360
390
  count: a,
361
391
  center: {
362
- x: m,
363
- y: p
392
+ x: y,
393
+ y: d
364
394
  }
365
395
  };
366
396
  });
367
- return t.length > 0 && r.push({
397
+ return t.length > 0 && i.push({
368
398
  id: -1,
369
399
  items: t,
370
400
  count: t.length,
371
401
  center: null
372
- }), r;
402
+ }), i;
373
403
  }
374
404
  /**
375
405
  * 按照像素距离聚类
@@ -380,13 +410,13 @@ class C {
380
410
  */
381
411
  doPixelCluster(e) {
382
412
  let t = 0;
383
- for (let r = 0; r < this.clusteredLocations.length; r++) {
384
- const s = this.clusteredLocations[r];
413
+ for (let i = 0; i < this.clusteredLocations.length; i++) {
414
+ const s = this.clusteredLocations[i];
385
415
  if (s.visited)
386
416
  continue;
387
417
  s.visited = !0;
388
- const i = this.getNeighbors(s, e);
389
- i.length < this.minClusterPoints ? s.clusterId = -1 : (i.forEach((o) => {
418
+ const r = this.getNeighbors(s, e);
419
+ r.length < this.minClusterPoints ? s.clusterId = -1 : (r.forEach((o) => {
390
420
  o.visited = !0, o.clusterId = t;
391
421
  }), s.clusterId = t, t++);
392
422
  }
@@ -394,13 +424,13 @@ class C {
394
424
  }
395
425
  showClusterResult(e) {
396
426
  this.crossLayer.removeAll();
397
- let t = Number.MIN_VALUE, r = Number.MAX_VALUE;
427
+ let t = Number.MIN_VALUE, i = Number.MAX_VALUE;
398
428
  e.forEach((s) => {
399
- s.count > 1 && (r = Math.min(r, s.count), t = Math.max(t, s.count));
429
+ s.count > 1 && (i = Math.min(i, s.count), t = Math.max(t, s.count));
400
430
  }), e.forEach((s) => {
401
431
  if (s.id !== -1) {
402
- let i = r === t ? (this.maxClusterSymbolSize + this.minClusterSymbolSize) / 2 : this.minClusterSymbolSize + (s.count - r) / (t - r) * (this.maxClusterSymbolSize - this.minClusterSymbolSize);
403
- i *= 0.75;
432
+ let r = i === t ? (this.maxClusterSymbolSize + this.minClusterSymbolSize) / 2 : this.minClusterSymbolSize + (s.count - i) / (t - i) * (this.maxClusterSymbolSize - this.minClusterSymbolSize);
433
+ r *= 0.75;
404
434
  const l = (s.count.toString().length * 8 + 6) / 2, c = new u({
405
435
  geometry: new h({ x: s.center.x, y: s.center.y }),
406
436
  attributes: {
@@ -430,7 +460,7 @@ class C {
430
460
  // 聚合数量
431
461
  {
432
462
  type: "CIMVectorMarker",
433
- size: i,
463
+ size: r,
434
464
  colorLocked: !0,
435
465
  anchorPointUnits: "Relative",
436
466
  frame: { xmin: -16, ymin: -16, xmax: 16, ymax: 16 },
@@ -504,7 +534,7 @@ class C {
504
534
  y: 0
505
535
  },
506
536
  anchorPointUnits: "Relative",
507
- size: i,
537
+ size: r,
508
538
  rotateClockwise: !0,
509
539
  textureFilter: "Picture",
510
540
  url: "/GisViewerAssets/Images/cross/gis_xhj_blue.png"
@@ -516,16 +546,42 @@ class C {
516
546
  });
517
547
  this.crossLayer.add(c);
518
548
  } else
519
- s.items.forEach((i) => {
549
+ s.items.forEach((r) => {
520
550
  const o = new u({
521
- geometry: new h({ x: i.x, y: i.y }),
551
+ geometry: new h({ x: r.x, y: r.y }),
522
552
  attributes: {
523
- ...i,
524
- ...i.properties,
553
+ ...r,
554
+ ...r.properties,
525
555
  type: "clusterPoint",
526
- id: i.id
556
+ id: r.id
527
557
  },
528
- symbol: this.crossGraphicSymbol
558
+ symbol: this.crossGraphicSymbol,
559
+ popupTemplate: {
560
+ title: "{name}信号机",
561
+ content: [
562
+ {
563
+ type: "fields",
564
+ fieldInfos: [
565
+ {
566
+ fieldName: "signalId",
567
+ label: "信号机编号"
568
+ },
569
+ {
570
+ fieldName: "nodeId",
571
+ label: "路口编号"
572
+ },
573
+ {
574
+ fieldName: "districtName",
575
+ label: "区控名称"
576
+ },
577
+ {
578
+ fieldName: "subDistrictName",
579
+ label: "子区名称"
580
+ }
581
+ ]
582
+ }
583
+ ]
584
+ }
529
585
  });
530
586
  this.crossLayer.add(o);
531
587
  });
@@ -533,5 +589,5 @@ class C {
533
589
  }
534
590
  }
535
591
  export {
536
- C as default
592
+ x as default
537
593
  };
@@ -1,3 +1,6 @@
1
+ /**
2
+ * 信控区域
3
+ */
1
4
  import { IFindSignalControlAreaParams, ILayerVisibleParams, IResult, IShowSignalControlAreaParams } from '../../../types';
2
5
  export default class SignalControlAreaController1 {
3
6
  private view;