gisviewer-vue3-arcgis 1.0.251 → 1.0.253

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 (31) hide show
  1. package/es/src/gis-map/gis-map.vue.d.ts +5 -1
  2. package/es/src/gis-map/gis-map.vue.mjs +171 -166
  3. package/es/src/gis-map/index.d.ts +3 -0
  4. package/es/src/gis-map/utils/dbscan-cluster/index.d.ts +52 -0
  5. package/es/src/gis-map/utils/dbscan-cluster/index.mjs +260 -0
  6. package/es/src/gis-map/utils/green-wave-band-controller/index.d.ts +1 -0
  7. package/es/src/gis-map/utils/green-wave-band-controller/index.mjs +69 -65
  8. package/es/src/gis-map/utils/overlay.d.ts +3 -8
  9. package/es/src/gis-map/utils/overlay.mjs +48 -52
  10. package/es/src/gis-map/utils/signal-control-area/district-renderer.d.ts +2 -2
  11. package/es/src/gis-map/utils/signal-control-area/district-renderer.mjs +6 -2
  12. package/es/src/gis-map/utils/signal-control-area/show-area.mjs +15 -15
  13. package/es/src/gis-map/utils/signal-control-area/sub-district-renderer.d.ts +1 -1
  14. package/es/src/gis-map/utils/signal-control-area/sub-district-renderer.mjs +6 -2
  15. package/es/src/types/index.d.ts +31 -4
  16. package/lib/src/gis-map/gis-map.vue.d.ts +5 -1
  17. package/lib/src/gis-map/gis-map.vue.js +1 -1
  18. package/lib/src/gis-map/index.d.ts +3 -0
  19. package/lib/src/gis-map/utils/dbscan-cluster/index.d.ts +52 -0
  20. package/lib/src/gis-map/utils/dbscan-cluster/index.js +1 -0
  21. package/lib/src/gis-map/utils/green-wave-band-controller/index.d.ts +1 -0
  22. package/lib/src/gis-map/utils/green-wave-band-controller/index.js +1 -1
  23. package/lib/src/gis-map/utils/overlay.d.ts +3 -8
  24. package/lib/src/gis-map/utils/overlay.js +1 -1
  25. package/lib/src/gis-map/utils/signal-control-area/district-renderer.d.ts +2 -2
  26. package/lib/src/gis-map/utils/signal-control-area/district-renderer.js +1 -1
  27. package/lib/src/gis-map/utils/signal-control-area/show-area.js +1 -1
  28. package/lib/src/gis-map/utils/signal-control-area/sub-district-renderer.d.ts +1 -1
  29. package/lib/src/gis-map/utils/signal-control-area/sub-district-renderer.js +1 -1
  30. package/lib/src/types/index.d.ts +31 -4
  31. package/package.json +1 -1
@@ -0,0 +1,260 @@
1
+ import * as f from "@arcgis/core/core/reactiveUtils";
2
+ import { Point as u } from "@arcgis/core/geometry";
3
+ import m from "@arcgis/core/Graphic";
4
+ import b from "@arcgis/core/layers/GraphicsLayer";
5
+ class M {
6
+ constructor(e) {
7
+ this.maxClusterSymbolSize = 50, this.minClusterSymbolSize = 25, this.zoomWatchHandle = null, this.locations = [], this.clusterMarkUrl = "", this.currentZoom = 0, this.view = e, this.currentZoom = e.zoom, this.clusterLayer = new b(), this.view.map.add(this.clusterLayer);
8
+ }
9
+ /**
10
+ * 将地理位置转换为屏幕坐标
11
+ */
12
+ locationToScreen() {
13
+ this.locations.forEach((e) => {
14
+ const s = this.view.toScreen(
15
+ new u({ x: e.x, y: e.y })
16
+ );
17
+ e.properties.screenX = s.x, e.properties.screenY = s.y;
18
+ });
19
+ }
20
+ /**
21
+ * 添加聚类点到视图
22
+ * @param params
23
+ */
24
+ addClusterPoints(e) {
25
+ var i;
26
+ this.locations = e.points, this.clusterMarkUrl = ((i = e.clusterSymbol) == null ? void 0 : i.url) || "/GisViewerAssets/Images/cross/gis_xhj_blue.png", e.points.forEach((r) => {
27
+ r.symbol || (r.symbol = e.pointSymbol || {
28
+ type: "simple-marker",
29
+ style: "circle",
30
+ color: "#3388ff",
31
+ size: 8,
32
+ outline: {
33
+ color: "#ffffff",
34
+ width: 1
35
+ }
36
+ });
37
+ }), this.zoomWatchHandle || (this.zoomWatchHandle = f.watch(
38
+ () => this.view.zoom,
39
+ () => {
40
+ Math.abs(this.currentZoom - this.view.zoom) >= 1 && (this.currentZoom = this.view.zoom, this.locationToScreen(), this.clusterLayer.removeAll(), this.addClusterPoints(e));
41
+ }
42
+ )), this.locationToScreen(), console.time("cluster");
43
+ const s = this.doPixelCluster(e.points, 120, 3);
44
+ console.timeEnd("cluster"), this.showClusters(s);
45
+ }
46
+ removeAllClusterPoints() {
47
+ var e;
48
+ (e = this.zoomWatchHandle) == null || e.remove(), this.zoomWatchHandle = null, this.clusterLayer.removeAll();
49
+ }
50
+ showClusters(e) {
51
+ let s = Number.MIN_VALUE, i = Number.MAX_VALUE;
52
+ e.forEach((r) => {
53
+ r.count > 1 && (i = Math.min(i, r.count), s = Math.max(s, r.count));
54
+ }), e.forEach((r) => {
55
+ if (r.id !== -1) {
56
+ let t = i === s ? (this.maxClusterSymbolSize + this.minClusterSymbolSize) / 2 : this.minClusterSymbolSize + (r.count - i) / (s - i) * (this.maxClusterSymbolSize - this.minClusterSymbolSize);
57
+ t *= 0.75;
58
+ const o = new m({
59
+ geometry: new u({ x: r.center.x, y: r.center.y }),
60
+ attributes: {
61
+ count: r.count
62
+ },
63
+ symbol: {
64
+ type: "cim",
65
+ data: {
66
+ type: "CIMSymbolReference",
67
+ primitiveOverrides: [
68
+ {
69
+ // 将textGraphic的TextString替换为graphic.attributes.name
70
+ type: "CIMPrimitiveOverride",
71
+ primitiveName: "textGraphic",
72
+ propertyName: "TextString",
73
+ valueExpressionInfo: {
74
+ type: "CIMExpressionInfo",
75
+ title: "Custom",
76
+ expression: "$feature.count",
77
+ returnType: "Default"
78
+ }
79
+ }
80
+ ],
81
+ symbol: {
82
+ type: "CIMPointSymbol",
83
+ symbolLayers: [
84
+ // 聚合数量
85
+ {
86
+ type: "CIMVectorMarker",
87
+ size: t,
88
+ colorLocked: !0,
89
+ anchorPointUnits: "Relative",
90
+ frame: { xmin: -16, ymin: -16, xmax: 16, ymax: 16 },
91
+ markerGraphics: [
92
+ // 数量文本框
93
+ {
94
+ type: "CIMMarkerGraphic",
95
+ geometry: {
96
+ rings: [
97
+ [
98
+ [-15, 40],
99
+ [15, 40],
100
+ [15, 20],
101
+ [-15, 20],
102
+ [-15, 40]
103
+ ]
104
+ ]
105
+ },
106
+ symbol: {
107
+ type: "CIMPolygonSymbol",
108
+ symbolLayers: [
109
+ {
110
+ type: "CIMSolidFill",
111
+ enable: !0,
112
+ color: [2, 72, 200, 255]
113
+ },
114
+ {
115
+ type: "CIMSolidStroke",
116
+ enable: !0,
117
+ width: 5,
118
+ color: [2, 72, 200, 128]
119
+ }
120
+ ]
121
+ }
122
+ },
123
+ // 数量文字
124
+ {
125
+ type: "CIMMarkerGraphic",
126
+ primitiveName: "textGraphic",
127
+ geometry: { x: 0, y: 0 },
128
+ symbol: {
129
+ type: "CIMTextSymbol",
130
+ height: 16,
131
+ horizontalAlignment: "Center",
132
+ offsetX: 0,
133
+ offsetY: 30,
134
+ symbol: {
135
+ type: "CIMPolygonSymbol",
136
+ symbolLayers: [
137
+ {
138
+ type: "CIMSolidFill",
139
+ enable: !0,
140
+ color: [255, 255, 255, 255]
141
+ }
142
+ ]
143
+ },
144
+ verticalAlignment: "Center"
145
+ },
146
+ textString: ""
147
+ }
148
+ ],
149
+ scaleSymbolsProportionally: !0,
150
+ respectFrame: !0
151
+ },
152
+ // 聚合图标
153
+ {
154
+ type: "CIMPictureMarker",
155
+ enable: !0,
156
+ anchorPoint: {
157
+ x: 0,
158
+ y: 0
159
+ },
160
+ anchorPointUnits: "Relative",
161
+ size: t,
162
+ rotateClockwise: !0,
163
+ textureFilter: "Picture",
164
+ url: this.clusterMarkUrl
165
+ }
166
+ ]
167
+ }
168
+ }
169
+ }
170
+ });
171
+ this.clusterLayer.add(o);
172
+ } else
173
+ r.items.forEach((t) => {
174
+ const o = new m({
175
+ geometry: new u({ x: t.x, y: t.y }),
176
+ attributes: t.properties,
177
+ symbol: t.symbol
178
+ });
179
+ this.clusterLayer.add(o);
180
+ });
181
+ });
182
+ }
183
+ /**
184
+ * 获取邻居点
185
+ * @param locations
186
+ * @param index
187
+ * @param eps
188
+ * @returns
189
+ */
190
+ getNeighbors(e, s, i) {
191
+ const r = e[s];
192
+ return e.filter((t) => t.id === r.id || t.visited ? !1 : this.getDistance(r, t) <= i);
193
+ }
194
+ /**
195
+ * 两点间的像素距离
196
+ * @param point1
197
+ * @param point2
198
+ * @returns
199
+ */
200
+ getDistance(e, s) {
201
+ return Math.sqrt(
202
+ Math.pow(e.properties.screenX - s.properties.screenX, 2) + Math.pow(e.properties.screenY - s.properties.screenY, 2)
203
+ );
204
+ }
205
+ /**
206
+ * 从聚类结果中创建聚类对象
207
+ * @param locations
208
+ * @returns
209
+ */
210
+ createClusters(e) {
211
+ const s = {}, i = [];
212
+ for (let t = 0; t < e.length; t++) {
213
+ const o = e[t];
214
+ o.clusterId === void 0 || o.clusterId === -1 ? i.push(o) : (s[o.clusterId] || (s[o.clusterId] = []), s[o.clusterId].push(o));
215
+ }
216
+ const r = Object.keys(s).map((t, o) => {
217
+ const l = s[Number(t)], n = l.length, h = l.reduce((c, a) => c + a.x, 0), y = l.reduce((c, a) => c + a.y, 0), p = h / n, d = y / n;
218
+ return {
219
+ id: Number(t),
220
+ items: l,
221
+ count: n,
222
+ center: {
223
+ x: p,
224
+ y: d
225
+ }
226
+ };
227
+ });
228
+ return i.length > 0 && r.push({
229
+ id: -1,
230
+ items: i,
231
+ count: i.length,
232
+ center: null
233
+ }), r;
234
+ }
235
+ /**
236
+ * 按照像素距离聚类
237
+ * @param locations
238
+ * @param eps
239
+ * @param minPoints
240
+ * @returns
241
+ */
242
+ doPixelCluster(e, s, i) {
243
+ let r = 0;
244
+ e.forEach((t) => t.visited = !1);
245
+ for (let t = 0; t < e.length; t++) {
246
+ const o = e[t];
247
+ if (o.visited)
248
+ continue;
249
+ o.visited = !0;
250
+ const l = this.getNeighbors(e, t, s);
251
+ l.length < i ? o.clusterId = -1 : (l.forEach((n) => {
252
+ n.visited = !0, n.clusterId = r;
253
+ }), o.clusterId = r, r++);
254
+ }
255
+ return this.createClusters(e);
256
+ }
257
+ }
258
+ export {
259
+ M as default
260
+ };
@@ -24,6 +24,7 @@ export default class GreenWaveBandController {
24
24
  addGreenWaveBand(params: IEditSignalControlAreaParams): void;
25
25
  stopAddGreenWaveBand(): void;
26
26
  showGreenWaveBand(params: IShowGreenWaveBandParams): Promise<void>;
27
+ removeGreenWaveBand(bandId: string): void;
27
28
  /**
28
29
  * 显示所有路口,进入待选状态
29
30
  * @param nodeAttributes
@@ -1,15 +1,15 @@
1
1
  import * as y from "@arcgis/core/core/reactiveUtils.js";
2
- import { Polyline as b } from "@arcgis/core/geometry";
2
+ import { Polyline as m } from "@arcgis/core/geometry";
3
3
  import n from "@arcgis/core/Graphic";
4
- import h from "@arcgis/core/layers/GraphicsLayer";
5
- import m from "axios";
4
+ import c from "@arcgis/core/layers/GraphicsLayer";
5
+ import b from "axios";
6
6
  class w {
7
7
  constructor(e) {
8
- this.selectedNodeIds = [], this.nodeScale = 5e3, this.hasGpu = !1, this.hasGpu = localStorage.getItem("gpu") !== "Unknown", this.view = e, this.roadsectLayer = new h({
8
+ this.selectedNodeIds = [], this.nodeScale = 5e3, this.hasGpu = !1, this.hasGpu = localStorage.getItem("gpu") !== "Unknown", this.view = e, this.roadsectLayer = new c({
9
9
  id: "roadsectLayer"
10
- }), this.view.map.add(this.roadsectLayer), this.allNodesLayer = new h({
10
+ }), this.view.map.add(this.roadsectLayer), this.allNodesLayer = new c({
11
11
  id: "allNodesLayer"
12
- }), this.view.map.add(this.allNodesLayer), this.bandLayer = new h({
12
+ }), this.view.map.add(this.allNodesLayer), this.bandLayer = new c({
13
13
  id: "bandLayer"
14
14
  }), this.view.map.add(this.bandLayer);
15
15
  }
@@ -27,23 +27,19 @@ class w {
27
27
  (e = this.viewClickWatcher) == null || e.remove(), this.viewClickWatcher = void 0, this.allNodesLayer.removeAll(), this.selectedNodeIds = [], this.roadsectLayer.removeAll(), this.bandLayer.removeAll();
28
28
  }
29
29
  async showGreenWaveBand(e) {
30
- this.bandLayer.graphics.forEach((t) => {
31
- t.getAttribute("bandId") === e.bandId && this.bandLayer.remove(t);
32
- }), this.roadsectLayer.graphics.forEach((t) => {
33
- t.getAttribute("bandId") === e.bandId && this.roadsectLayer.remove(t);
34
- }), this.scaleWatcher || (this.scaleWatcher = y.watch(
30
+ this.removeGreenWaveBand(e.bandId), this.scaleWatcher || (this.scaleWatcher = y.watch(
35
31
  () => this.view.scale,
36
- (t, r) => {
37
- t > this.nodeScale && r <= this.nodeScale ? this.bandLayer.graphics.forEach((a) => {
32
+ (s, o) => {
33
+ s > this.nodeScale && o <= this.nodeScale ? this.bandLayer.graphics.forEach((a) => {
38
34
  a.geometry.type === "point" && (a.symbol = this.getShowNodeSymbol("marker"));
39
- }) : t <= this.nodeScale && r > this.nodeScale && this.bandLayer.graphics.forEach((a) => {
35
+ }) : s <= this.nodeScale && o > this.nodeScale && this.bandLayer.graphics.forEach((a) => {
40
36
  a.geometry.type === "point" && (a.symbol = this.getShowNodeSymbol("picture"));
41
37
  });
42
38
  }
43
39
  ));
44
- const i = new b({
40
+ const i = new m({
45
41
  paths: [e.coordinates]
46
- }), s = new n({
42
+ }), t = new n({
47
43
  geometry: i,
48
44
  symbol: this.getLineSymbol(!0, e),
49
45
  attributes: {
@@ -52,39 +48,47 @@ class w {
52
48
  id: e.bandId
53
49
  }
54
50
  });
55
- this.roadsectLayer.add(s), await this.view.goTo(s), e.nodeList && e.nodeList.forEach((t) => {
56
- const r = new n({
51
+ this.roadsectLayer.add(t), await this.view.goTo(t), e.nodeList && e.nodeList.forEach((s) => {
52
+ const o = new n({
57
53
  geometry: {
58
54
  type: "point",
59
- x: t.longitude,
60
- y: t.latitude
55
+ x: s.longitude,
56
+ y: s.latitude
61
57
  },
62
58
  symbol: this.getShowNodeSymbol("picture"),
63
59
  attributes: {
64
- ...t,
60
+ ...s,
65
61
  bandId: e.bandId,
66
62
  type: "greenWaveBandNode"
67
63
  }
68
64
  });
69
- this.bandLayer.add(r);
65
+ this.bandLayer.add(o);
70
66
  });
71
67
  }
68
+ removeGreenWaveBand(e) {
69
+ let i = this.bandLayer.graphics.filter(
70
+ (t) => t.getAttribute("bandId") === e
71
+ );
72
+ this.bandLayer.removeMany(i.toArray()), i = this.roadsectLayer.graphics.filter(
73
+ (t) => t.getAttribute("bandId") === e
74
+ ), this.roadsectLayer.removeMany(i.toArray());
75
+ }
72
76
  /**
73
77
  * 显示所有路口,进入待选状态
74
78
  * @param nodeAttributes
75
79
  */
76
80
  showAllNodes(e) {
77
81
  const i = [];
78
- e.forEach((s) => {
82
+ e.forEach((t) => {
79
83
  i.push(
80
84
  new n({
81
85
  geometry: {
82
86
  type: "point",
83
- x: s.longitude,
84
- y: s.latitude
87
+ x: t.longitude,
88
+ y: t.latitude
85
89
  },
86
90
  symbol: this.getEditableNodeSymbol(!1),
87
- attributes: { ...s, selected: !1 }
91
+ attributes: { ...t, selected: !1 }
88
92
  })
89
93
  );
90
94
  }), this.allNodesLayer.addMany(i);
@@ -96,50 +100,50 @@ class w {
96
100
  */
97
101
  async handleViewClick(e) {
98
102
  var a;
99
- const s = (a = (await this.view.hitTest(e, {
103
+ const t = (a = (await this.view.hitTest(e, {
100
104
  include: [this.allNodesLayer]
101
105
  })).results) == null ? void 0 : a.filter(
102
106
  (d) => d.type === "graphic"
103
107
  );
104
- if (s.length === 0)
108
+ if (t.length === 0)
105
109
  return;
106
- const t = s[0].graphic, r = t.getAttribute("id");
107
- if (this.selectedNodeIds.includes(r)) {
108
- const d = this.selectedNodeIds.indexOf(r) + 1;
110
+ const s = t[0].graphic, o = s.getAttribute("id");
111
+ if (this.selectedNodeIds.includes(o)) {
112
+ const d = this.selectedNodeIds.indexOf(o) + 1;
109
113
  if (d === 1)
110
- this.removeAllNodeCallback && this.removeAllNodeCallback(), this.selectedNodeIds = [], this.allNodesLayer.graphics.forEach((o) => {
111
- o.setAttribute("selected", !1), o.symbol = this.getEditableNodeSymbol(!1), o.visible = !0;
114
+ this.removeAllNodeCallback && this.removeAllNodeCallback(), this.selectedNodeIds = [], this.allNodesLayer.graphics.forEach((r) => {
115
+ r.setAttribute("selected", !1), r.symbol = this.getEditableNodeSymbol(!1), r.visible = !0;
112
116
  }), this.roadsectLayer.removeAll();
113
117
  else {
114
- for (let o = d; o < this.selectedNodeIds.length; o++) {
118
+ for (let r = d; r < this.selectedNodeIds.length; r++) {
115
119
  this.removeNodeCallback && this.removeNodeCallback({
116
- id: this.selectedNodeIds[o]
120
+ id: this.selectedNodeIds[r]
117
121
  });
118
122
  for (let l = 0; l < this.roadsectLayer.graphics.length; l++) {
119
- const c = this.roadsectLayer.graphics.getItemAt(l);
120
- (c.getAttribute("id") === this.selectedNodeIds[o] || !c.getAttribute("selected")) && (this.roadsectLayer.remove(c), l--);
123
+ const h = this.roadsectLayer.graphics.getItemAt(l);
124
+ (h.getAttribute("id") === this.selectedNodeIds[r] || !h.getAttribute("selected")) && (this.roadsectLayer.remove(h), l--);
121
125
  }
122
126
  }
123
- this.selectedNodeIds = this.selectedNodeIds.slice(0, d), this.allNodesLayer.graphics.forEach((o) => {
127
+ this.selectedNodeIds = this.selectedNodeIds.slice(0, d), this.allNodesLayer.graphics.forEach((r) => {
124
128
  const l = this.selectedNodeIds.includes(
125
- o.getAttribute("id")
129
+ r.getAttribute("id")
126
130
  );
127
- o.setAttribute("selected", l), o.symbol = this.getEditableNodeSymbol(l), o.visible = l;
128
- }), await this.showDownstreamNodes(r);
131
+ r.setAttribute("selected", l), r.symbol = this.getEditableNodeSymbol(l), r.visible = l;
132
+ }), await this.showDownstreamNodes(o);
129
133
  }
130
134
  } else {
131
- t.setAttribute("selected", !0), t.symbol = this.getEditableNodeSymbol(!0), this.selectedNodeIds.push(r), this.allNodesLayer.graphics.forEach((o) => {
132
- o.visible = o.getAttribute("selected");
135
+ s.setAttribute("selected", !0), s.symbol = this.getEditableNodeSymbol(!0), this.selectedNodeIds.push(o), this.allNodesLayer.graphics.forEach((r) => {
136
+ r.visible = r.getAttribute("selected");
133
137
  });
134
138
  let d = [];
135
- for (let o = 0; o < this.roadsectLayer.graphics.length; o++) {
136
- const l = this.roadsectLayer.graphics.getItemAt(o);
137
- l.getAttribute("id") === r ? (l.symbol = this.getLineSymbol(!0), l.setAttribute("selected", !0), d = l.geometry.paths[0]) : l.getAttribute("selected") || (this.roadsectLayer.remove(l), o--);
139
+ for (let r = 0; r < this.roadsectLayer.graphics.length; r++) {
140
+ const l = this.roadsectLayer.graphics.getItemAt(r);
141
+ l.getAttribute("id") === o ? (l.symbol = this.getLineSymbol(!0), l.setAttribute("selected", !0), d = l.geometry.paths[0]) : l.getAttribute("selected") || (this.roadsectLayer.remove(l), r--);
138
142
  }
139
143
  this.addNodeCallback && this.addNodeCallback({
140
- ...t.attributes,
144
+ ...s.attributes,
141
145
  roadsect: d
142
- }), await this.showDownstreamNodes(r);
146
+ }), await this.showDownstreamNodes(o);
143
147
  }
144
148
  }
145
149
  /**
@@ -148,7 +152,7 @@ class w {
148
152
  */
149
153
  async showDownstreamNodes(e) {
150
154
  this.view.container.style.cursor = "progress";
151
- const i = await m.get(
155
+ const i = await b.get(
152
156
  `http://${this.openDriveServer}/api/computable/getDownstreamNodes`,
153
157
  { params: { nodeId: e } }
154
158
  );
@@ -156,16 +160,16 @@ class w {
156
160
  this.view.container.style.cursor = "default";
157
161
  return;
158
162
  }
159
- i.data.result.forEach((t) => {
160
- this.allNodesLayer.graphics.forEach((r) => {
161
- if (r.getAttribute("nodeId") === t.id && r.getAttribute("selected") === !1 && (r.visible = !0, t.coordinates)) {
163
+ i.data.result.forEach((s) => {
164
+ this.allNodesLayer.graphics.forEach((o) => {
165
+ if (o.getAttribute("nodeId") === s.id && o.getAttribute("selected") === !1 && (o.visible = !0, s.coordinates)) {
162
166
  const a = new n({
163
167
  geometry: {
164
168
  type: "polyline",
165
- paths: [t.coordinates]
169
+ paths: [s.coordinates]
166
170
  },
167
171
  symbol: this.getLineSymbol(!1),
168
- attributes: { ...t, selected: !1 }
172
+ attributes: { ...s, selected: !1 }
169
173
  });
170
174
  this.roadsectLayer.add(a);
171
175
  }
@@ -174,8 +178,8 @@ class w {
174
178
  }
175
179
  getLineSymbol(e, i) {
176
180
  if (e) {
177
- const s = (i == null ? void 0 : i.lineWidth) || 4, t = (i == null ? void 0 : i.lineColor) || [55, 125, 34, 255], r = (i == null ? void 0 : i.arrowColor) || [255, 255, 255, 255];
178
- return Array.isArray(t) && t.length === 3 && t.push(255), Array.isArray(r) && r.length === 3 && r.push(255), {
181
+ const t = (i == null ? void 0 : i.lineWidth) || 4, s = (i == null ? void 0 : i.lineColor) || [55, 125, 34, 255], o = (i == null ? void 0 : i.arrowColor) || [255, 255, 255, 255];
182
+ return Array.isArray(s) && s.length === 3 && s.push(255), Array.isArray(o) && o.length === 3 && o.push(255), {
179
183
  type: "cim",
180
184
  data: {
181
185
  type: "CIMSymbolReference",
@@ -204,14 +208,14 @@ class w {
204
208
  geometry: {
205
209
  paths: [
206
210
  [
207
- [s, -s],
208
- [3 * s, 0],
209
- [s, s]
211
+ [t, -t],
212
+ [3 * t, 0],
213
+ [t, t]
210
214
  ],
211
215
  [
212
- [-s, s],
213
- [-3 * s, 0],
214
- [-s, -s]
216
+ [-t, t],
217
+ [-3 * t, 0],
218
+ [-t, -t]
215
219
  ]
216
220
  ]
217
221
  },
@@ -222,7 +226,7 @@ class w {
222
226
  type: "CIMSolidStroke",
223
227
  enable: !0,
224
228
  width: 1.5,
225
- color: r
229
+ color: o
226
230
  }
227
231
  ]
228
232
  }
@@ -232,8 +236,8 @@ class w {
232
236
  {
233
237
  type: "CIMSolidStroke",
234
238
  enable: !0,
235
- width: s,
236
- color: t
239
+ width: t,
240
+ color: s
237
241
  }
238
242
  ]
239
243
  }
@@ -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 { IMaskParam, IOverlay, IOverlayParam, IPointSymbol, IResult } from '../../types';
5
+ import { IClusterPointParams, IMaskParam, IOverlayParam, IResult } from '../../types';
6
6
  interface IOverlayOptions {
7
7
  id: string;
8
8
  }
@@ -73,13 +73,8 @@ export default class Overlay {
73
73
  * @memberof Overlay
74
74
  */
75
75
  showLayer(): void;
76
- /**
77
- * 添加点覆盖物
78
- * @param overlay
79
- * @param symbol
80
- * @param properties
81
- */
82
- addPoint(overlay: IOverlay, symbol: IPointSymbol, properties: any, visible?: boolean): IResult;
83
76
  private addOverlay;
77
+ private clusterLayer;
78
+ addClusterPoint(params: IClusterPointParams): void;
84
79
  }
85
80
  export {};