gisviewer-vue3-arcgis 1.0.142 → 1.0.143

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,15 +1,15 @@
1
- import d from "@arcgis/core/layers/GraphicsLayer";
2
- import L from "@arcgis/core/widgets/Sketch/SketchViewModel";
3
- import b from "@arcgis/core/widgets/Sketch";
4
- import * as y from "@arcgis/core/geometry/support/webMercatorUtils.js";
5
- import * as G from "@arcgis/core/geometry/geometryEngine.js";
1
+ import * as L from "@arcgis/core/geometry/geometryEngine.js";
2
+ import * as g from "@arcgis/core/geometry/support/webMercatorUtils.js";
6
3
  import l from "@arcgis/core/Graphic";
7
- import { v4 as P } from "uuid";
8
- import k from "@arcgis/core/geometry/Polygon.js";
9
- import x from "@arcgis/core/geometry/Polyline.js";
10
- import A from "@turf/intersect";
11
- import * as m from "@turf/helpers";
12
- function w(c, e = []) {
4
+ import f from "@arcgis/core/layers/GraphicsLayer";
5
+ import G from "@arcgis/core/widgets/Sketch";
6
+ import P from "@arcgis/core/widgets/Sketch/SketchViewModel";
7
+ import b from "@arcgis/core/geometry/Polygon.js";
8
+ import k from "@arcgis/core/geometry/Polyline.js";
9
+ import * as d from "@turf/helpers";
10
+ import S from "@turf/intersect";
11
+ import { v4 as M } from "uuid";
12
+ function u(c, t = []) {
13
13
  if (c === null || typeof c != "object")
14
14
  return c;
15
15
  if (Object.prototype.toString.call(c) === "[object Date]")
@@ -18,29 +18,29 @@ function w(c, e = []) {
18
18
  return new RegExp(c);
19
19
  if (Object.prototype.toString.call(c) === "[object Error]")
20
20
  return new Error(c);
21
- const t = e.filter((s) => s.original === c)[0];
22
- if (t)
23
- return t.copy;
21
+ const e = t.filter((s) => s.original === c)[0];
22
+ if (e)
23
+ return e.copy;
24
24
  const i = Array.isArray(c) ? [] : {};
25
- return e.push({
25
+ return t.push({
26
26
  original: c,
27
27
  copy: i
28
28
  }), Object.keys(c).forEach((s) => {
29
- i[s] = w(c[s], e);
29
+ i[s] = u(c[s], t);
30
30
  }), i;
31
31
  }
32
- const S = {
32
+ const x = {
33
33
  maxAllowedGraphics: 0,
34
34
  GraphicsLayer: {},
35
- sketchvisibleElements: {},
35
+ sketchVisibleElements: {},
36
36
  sketchPosition: "top-left",
37
- defaultsketchVisible: !0,
37
+ defaultSketchVisible: !0,
38
38
  sketchViewModelItemSymbol: {}
39
- }, u = {
39
+ }, m = {
40
40
  type: "simple-line",
41
41
  color: "#556DEA",
42
42
  width: 2
43
- }, f = {
43
+ }, y = {
44
44
  type: "simple-fill",
45
45
  // autocasts as new SimpleFillSymbol()
46
46
  color: [227, 139, 79, 0.4],
@@ -50,37 +50,37 @@ const S = {
50
50
  width: 1
51
51
  }
52
52
  };
53
- class C {
54
- constructor(e, t) {
55
- this.viewer = e, this.options = {
56
- ...S,
57
- ...t
58
- }, this.graphicsLayer = new d({ ...this.options.GraphicsLayer }), this.TextgraphicsLayer = new d(), this.viewer.map.layers.add(this.graphicsLayer), this.viewer.map.layers.add(this.TextgraphicsLayer), this.init();
53
+ class R {
54
+ constructor(t, e) {
55
+ this.viewer = t, this.options = {
56
+ ...x,
57
+ ...e
58
+ }, this.graphicsLayer = new f({ ...this.options.GraphicsLayer }), this.TextGraphicsLayer = new f(), this.viewer.map.layers.add(this.graphicsLayer), this.viewer.map.layers.add(this.TextGraphicsLayer), this.init();
59
59
  }
60
60
  init() {
61
- this.sketchViewModel = new L({
61
+ this.sketchViewModel = new P({
62
62
  layer: this.graphicsLayer,
63
63
  view: this.viewer,
64
64
  updateOnGraphicClick: !0,
65
- polylineSymbol: u,
66
- polygonSymbol: f,
65
+ polylineSymbol: m,
66
+ polygonSymbol: y,
67
67
  ...this.options.sketchViewModelItemSymbol
68
68
  });
69
- const e = this.findLayerById("TrafficMarkings"), t = [];
70
- e && t.push({ layer: e, enabled: !0 }), this.sketch = new b({
69
+ const t = this.findLayerById("TrafficMarkings"), e = [];
70
+ t && e.push({ layer: t, enabled: !0 }), this.sketch = new G({
71
71
  view: this.viewer,
72
72
  viewModel: this.sketchViewModel,
73
73
  layer: this.graphicsLayer,
74
- visible: this.options.defaultsketchVisible,
74
+ visible: this.options.defaultSketchVisible,
75
75
  snappingOptions: {
76
76
  // autocasts to SnappingOptions()
77
77
  enabled: !0,
78
78
  // global snapping is turned on
79
79
  // assigns a collection of FeatureSnappingLayerSource() and enables feature snapping on this layer
80
- featureSources: t
80
+ featureSources: e
81
81
  }
82
82
  }), this.sketch.visibleElements = {
83
- ...this.options.sketchvisibleElements
83
+ ...this.options.sketchVisibleElements
84
84
  }, this.viewer.ui.add(this.sketch, this.options.sketchPosition);
85
85
  }
86
86
  /**
@@ -92,16 +92,16 @@ class C {
92
92
  * @returns
93
93
  * @memberof SketchView
94
94
  */
95
- initPoint(e, t = "all", i = !1) {
96
- if (!e)
95
+ initPoint(t, e = "all", i = !1) {
96
+ if (!t)
97
97
  return;
98
- const { crossArea: s, sectionArea: r } = e;
99
- if (s && (t == "crossArea" || t == "all")) {
98
+ const { crossArea: s, sectionArea: r } = t;
99
+ if (s && (e == "crossArea" || e == "all")) {
100
100
  const o = this.initCrossArea(s);
101
101
  this.graphicsLayer.add(o);
102
102
  }
103
- if (r && (t == "sectionArea" || t == "all")) {
104
- const o = this.inintSectionArea(r, i);
103
+ if (r && (e == "sectionArea" || e == "all")) {
104
+ const o = this.initSectionArea(r, i);
105
105
  this.graphicsLayer.addMany(o);
106
106
  }
107
107
  }
@@ -111,15 +111,14 @@ class C {
111
111
  * @param {any[]} data
112
112
  * @memberof SketchView
113
113
  */
114
- initEntranceFusionZone(e) {
115
- const t = [], i = f;
116
- e.map((s) => {
117
- t.push(this.createPolygonGraphic(s, i, {}));
118
- }), this.graphicsLayer.addMany(t);
114
+ initEntranceFusionZone(t) {
115
+ const e = [];
116
+ t.map((i) => {
117
+ e.push(this.createPolygonGraphic(i, y, {}));
118
+ }), this.graphicsLayer.addMany(e);
119
119
  }
120
- initCrossArea(e) {
121
- const t = f;
122
- return this.createPolygonGraphic(e, t, {});
120
+ initCrossArea(t) {
121
+ return this.createPolygonGraphic(t, y, {});
123
122
  }
124
123
  /**
125
124
  * 初始进出口道计算区域
@@ -129,79 +128,83 @@ class C {
129
128
  * @returns
130
129
  * @memberof SketchView
131
130
  */
132
- inintSectionArea(e, t = !1) {
133
- const i = [], s = u, r = {
131
+ initSectionArea(t, e = !1) {
132
+ const i = [], s = {
134
133
  type: "simple-line",
135
134
  color: [0, 0, 255],
136
135
  width: 2
137
136
  };
138
- return Object.keys(e).map((o) => {
139
- const a = e[o][0], n = e[o][1];
140
- t && (a.reverse(), n.reverse());
141
- const h = P(), p = this.createPolylineGraphic(a, s, {
142
- type: "draw",
143
- id: h
144
- }), g = this.createPolylineGraphic(n, r, {
137
+ return Object.keys(t).map((r) => {
138
+ const o = t[r][0], a = t[r][1];
139
+ e && (o.reverse(), a.reverse());
140
+ const n = M(), h = this.createPolylineGraphic(
141
+ o,
142
+ m,
143
+ {
144
+ type: "draw",
145
+ id: n
146
+ }
147
+ ), p = this.createPolylineGraphic(a, s, {
145
148
  type: "shiftLine",
146
- id: h
149
+ id: n
147
150
  });
148
- i.push(p, g);
151
+ i.push(h, p);
149
152
  }), i;
150
153
  }
151
- createPolylineGraphic(e, t, i) {
152
- const s = new x({
153
- paths: e
154
- }), r = y.geographicToWebMercator(s);
154
+ createPolylineGraphic(t, e, i) {
155
+ const s = new k({
156
+ paths: t
157
+ }), r = g.geographicToWebMercator(s);
155
158
  return new l({
156
159
  geometry: r,
157
160
  // Add the geometry created in step 3
158
- symbol: t,
161
+ symbol: e,
159
162
  // Add the symbol created in step 4
160
163
  attributes: i
161
164
  });
162
165
  }
163
- createPolygonGraphic(e, t, i) {
164
- const s = new k({
165
- rings: e
166
- }), r = y.geographicToWebMercator(s);
166
+ createPolygonGraphic(t, e, i) {
167
+ const s = new b({
168
+ rings: t
169
+ }), r = g.geographicToWebMercator(s);
167
170
  return new l({
168
171
  geometry: r,
169
172
  // Add the geometry created in step 3
170
- symbol: t,
173
+ symbol: e,
171
174
  // Add the symbol created in step 4
172
175
  attributes: i
173
176
  });
174
177
  }
175
- on(e) {
176
- const t = this;
178
+ on(t) {
179
+ const e = this;
177
180
  this.sketchViewModel.on("create", function(i) {
178
181
  var r, o, a;
179
- const s = t.graphicsLayer.graphics;
180
- if ((r = t.options) != null && r.maxAllowedGraphics && s.length > ((o = t.options) == null ? void 0 : o.maxAllowedGraphics)) {
181
- t.graphicsLayer.remove(i.graphic), console.log("已达到最大图形数量,无法继续绘制!");
182
+ const s = e.graphicsLayer.graphics;
183
+ if ((r = e.options) != null && r.maxAllowedGraphics && s.length > ((o = e.options) == null ? void 0 : o.maxAllowedGraphics)) {
184
+ e.graphicsLayer.remove(i.graphic), console.log("已达到最大图形数量,无法继续绘制!");
182
185
  return;
183
186
  }
184
187
  if (i.state === "complete" && ((a = i.graphic) != null && a.geometry)) {
185
188
  console.log(i.graphic);
186
189
  const n = i.graphic.geometry;
187
190
  i.graphic.setAttribute("type", "draw"), i.graphic.setAttribute("id", new Date().getTime());
188
- const h = t.getGraphicPoint(n);
189
- e && e("create", h, i);
191
+ const h = e.getGraphicPoint(n);
192
+ t && t("create", h, i);
190
193
  }
191
194
  }), this.sketchViewModel.on("update", function(i) {
192
195
  if (console.log("update", i), i.aborted) {
193
196
  const s = i.graphics[0];
194
- t.graphicsLayer.remove(s);
197
+ e.graphicsLayer.remove(s);
195
198
  return;
196
199
  }
197
200
  if (i.state === "complete" && i.graphics.length > 0) {
198
- const r = i.graphics[0].geometry, o = t.getGraphicPoint(r);
199
- e && e("update", o, i);
201
+ const r = i.graphics[0].geometry, o = e.getGraphicPoint(r);
202
+ t && t("update", o, i);
200
203
  }
201
204
  }), this.sketchViewModel.on("delete", function(i) {
202
- if (console.log("delete", i, t.graphicsLayer.graphics), i.graphics.length > 0) {
203
- const r = i.graphics[0].geometry, o = t.getGraphicPoint(r);
204
- e && e("delete", o, i);
205
+ if (console.log("delete", i, e.graphicsLayer.graphics), i.graphics.length > 0) {
206
+ const r = i.graphics[0].geometry, o = e.getGraphicPoint(r);
207
+ t && t("delete", o, i);
205
208
  }
206
209
  });
207
210
  }
@@ -210,16 +213,16 @@ class C {
210
213
  * @returns
211
214
  */
212
215
  graphicPoint() {
213
- const e = [];
214
- return this.graphicsLayer.graphics.map((t) => {
216
+ const t = [];
217
+ return this.graphicsLayer.graphics.map((e) => {
215
218
  var r;
216
- const i = t.geometry, s = this.getGraphicPoint(i);
217
- e.push({
219
+ const i = e.geometry, s = this.getGraphicPoint(i);
220
+ t.push({
218
221
  point: s,
219
- type: (r = t.attributes) == null ? void 0 : r.type,
220
- attributes: t.attributes
222
+ type: (r = e.attributes) == null ? void 0 : r.type,
223
+ attributes: e.attributes
221
224
  });
222
- }), e;
225
+ }), t;
223
226
  }
224
227
  /**
225
228
  * 获取进口道区域
@@ -227,15 +230,15 @@ class C {
227
230
  * @memberof SketchView
228
231
  */
229
232
  getEntranceRoad() {
230
- const e = {}, t = this.graphicPoint().filter(
233
+ const t = {}, e = this.graphicPoint().filter(
231
234
  (n) => n.point.type === "polyline"
232
235
  );
233
236
  if (console.log(
234
237
  "🚀 ~ file: sketchView.ts:378 ~ SketchView ~ getEntranceRoad ~ graphics:",
235
- t
236
- ), !t.length)
238
+ e
239
+ ), !e.length)
237
240
  return !1;
238
- const i = t.filter((n) => n.type == "draw"), s = t.filter((n) => n.type == "shiftLine");
241
+ const i = e.filter((n) => n.type == "draw"), s = e.filter((n) => n.type == "shiftLine");
239
242
  if (s.length == 0)
240
243
  throw "未绘制平移!";
241
244
  if (i.length != s.length)
@@ -246,7 +249,7 @@ class C {
246
249
  ...r.slice(0, o).reverse()
247
250
  ].map((n, h) => {
248
251
  const p = s.find(
249
- (g) => g.attributes.id == n.attributes.id
252
+ (w) => w.attributes.id == n.attributes.id
250
253
  );
251
254
  if (!p)
252
255
  throw "绘制的线和平移的线不匹配!";
@@ -254,14 +257,14 @@ class C {
254
257
  "🚀 ~ file: sketchView.ts:393 ~ SketchView ~ getEntranceRoad ~ m:",
255
258
  n,
256
259
  p
257
- ), e[h + 1] = {
260
+ ), t[h + 1] = {
258
261
  0: [n.point.paths[0], n.point.paths[n.point.paths.length - 1]],
259
262
  1: [
260
263
  p.point.paths[0],
261
264
  p.point.paths[p.point.paths.length - 1]
262
265
  ]
263
266
  };
264
- }), e;
267
+ }), t;
265
268
  }
266
269
  /**
267
270
  * 获进口道融合区
@@ -271,38 +274,38 @@ class C {
271
274
  * @returns
272
275
  * @memberof SketchView
273
276
  */
274
- getEntranceFusionZone(e) {
275
- const t = [], i = {};
277
+ getEntranceFusionZone(t) {
278
+ const e = [], i = {};
276
279
  this.graphicsLayer.graphics.map((r) => {
277
280
  var n;
278
281
  const o = r.geometry, a = this.getGraphicPoint(o, !1);
279
- t.push({
282
+ e.push({
280
283
  point: a,
281
284
  type: (n = r.attributes) == null ? void 0 : n.type,
282
285
  attributes: r.attributes
283
286
  });
284
287
  });
285
- const s = t;
286
- return e.map((r, o) => {
287
- i[r] = t[o];
288
- }), { graphics: i, rawdata: s };
288
+ const s = e;
289
+ return t.map((r, o) => {
290
+ i[r] = e[o];
291
+ }), { graphics: i, rawData: s };
289
292
  }
290
293
  /**
291
294
  * 获取进口道所在的进口道编号
292
295
  *
293
296
  * @param {armData} armData 进口道编号区域
294
- * @param {*} graphicPpolygon 绘制的区域
297
+ * @param {*} graphicPolygon 绘制的区域
295
298
  * @returns
296
299
  * @memberof SketchView
297
300
  */
298
- getIntersectionArea(e, t) {
299
- const i = Object.keys(e);
301
+ getIntersectionArea(t, e) {
302
+ const i = Object.keys(t);
300
303
  let s = !1;
301
304
  for (let r = 0; r < i.length; r++) {
302
- const o = i[r], a = e[o];
303
- if (A(
304
- m.polygon(t),
305
- m.polygon(a)
305
+ const o = i[r], a = t[o];
306
+ if (S(
307
+ d.polygon(e),
308
+ d.polygon(a)
306
309
  )) {
307
310
  s = o;
308
311
  break;
@@ -310,35 +313,36 @@ class C {
310
313
  }
311
314
  return s;
312
315
  }
313
- filterData(e) {
314
- const t = w(e);
315
- return t.length > 0 && t[0][0] === t[t.length - 1][0] && t[0][1] === t[t.length - 1][1] && t.pop(), t;
316
+ filterData(t) {
317
+ const e = u(t);
318
+ return e.length > 0 && e[0][0] === e[e.length - 1][0] && e[0][1] === e[e.length - 1][1] && e.pop(), e;
316
319
  }
317
320
  /**
318
321
  *
319
322
  *
320
323
  * @private
321
324
  * @param {*} geometry
322
- * @param {boolean} [isfilterData=true] 是否过滤首尾相同点数据
325
+ * @param {boolean} [isFilterData=true] 是否过滤首尾相同点数据
323
326
  * @returns
324
327
  * @memberof SketchView
325
328
  */
326
- getGraphicPoint(e, t = !0) {
327
- const i = y.webMercatorToGeographic(e);
329
+ getGraphicPoint(t, e = !0) {
330
+ let i = t;
331
+ this.viewer.spatialReference.isWebMercator && (i = g.webMercatorToGeographic(t));
328
332
  let s;
329
- if (e.type === "point")
333
+ if (t.type === "point")
330
334
  s = {
331
- type: e.type,
335
+ type: t.type,
332
336
  x: i.x,
333
337
  y: i.y
334
338
  };
335
- else if (e.type === "polyline") {
339
+ else if (t.type === "polyline") {
336
340
  s = {
337
- type: e.type,
341
+ type: t.type,
338
342
  paths: []
339
343
  }, i.paths.forEach((n) => {
340
344
  let h = n;
341
- t && (h = this.filterData(n)), h.forEach((p) => {
345
+ e && (h = this.filterData(n)), h.forEach((p) => {
342
346
  s.paths.push(p);
343
347
  });
344
348
  });
@@ -351,12 +355,12 @@ class C {
351
355
  }, a = this.getAngle(r, o);
352
356
  s.angle = a;
353
357
  } else
354
- e.type === "polygon" && (s = {
355
- type: e.type,
358
+ t.type === "polygon" && (s = {
359
+ type: t.type,
356
360
  rings: []
357
361
  }, i.rings.forEach((r) => {
358
362
  let o = r;
359
- t && (o = this.filterData(r)), o.forEach((a) => {
363
+ e && (o = this.filterData(r)), o.forEach((a) => {
360
364
  s.rings.push(a);
361
365
  });
362
366
  }));
@@ -379,8 +383,8 @@ class C {
379
383
  * @returns
380
384
  * @memberof SketchView
381
385
  */
382
- getAngle(e, t) {
383
- const i = t.x - e.x, s = t.y - e.y;
386
+ getAngle(t, e) {
387
+ const i = e.x - t.x, s = e.y - t.y;
384
388
  return Math.atan2(s, i) * 180 / Math.PI;
385
389
  }
386
390
  /**
@@ -392,9 +396,9 @@ class C {
392
396
  * @returns
393
397
  * @memberof SketchView
394
398
  */
395
- getshiftLine(e, t, i = "meters") {
396
- const s = e, r = -t;
397
- return G.offset(
399
+ getShiftLine(t, e, i = "meters") {
400
+ const s = t, r = -e;
401
+ return L.offset(
398
402
  s,
399
403
  r,
400
404
  i
@@ -408,7 +412,7 @@ class C {
408
412
  * @param {*} symbol 线的样式
409
413
  * @memberof SketchView
410
414
  */
411
- setshiftLine(e, t = "meters", i) {
415
+ setShiftLine(t, e = "meters", i) {
412
416
  i || (i = {
413
417
  type: "simple-line",
414
418
  color: [0, 0, 255],
@@ -416,10 +420,10 @@ class C {
416
420
  }), this.removeShiftLine(), this.graphicsLayer.graphics.map((s) => {
417
421
  const r = s.geometry, o = s.attributes;
418
422
  if ((r == null ? void 0 : r.type) === "polyline" && (o == null ? void 0 : o.type) === "draw") {
419
- const a = o.id, n = this.getshiftLine(
423
+ const a = o.id, n = this.getShiftLine(
420
424
  r,
421
- e,
422
- t
425
+ t,
426
+ e
423
427
  ), h = new l({
424
428
  geometry: n,
425
429
  symbol: i,
@@ -435,32 +439,32 @@ class C {
435
439
  * @memberof SketchView
436
440
  */
437
441
  removeShiftLine() {
438
- const e = [];
439
- this.graphicsLayer.graphics.map((t) => {
440
- const i = t.attributes;
441
- (i == null ? void 0 : i.type) === "shiftLine" && e.push(t);
442
- }), this.graphicsLayer.removeMany(e);
442
+ const t = [];
443
+ this.graphicsLayer.graphics.map((e) => {
444
+ const i = e.attributes;
445
+ (i == null ? void 0 : i.type) === "shiftLine" && t.push(e);
446
+ }), this.graphicsLayer.removeMany(t);
443
447
  }
444
448
  /**
445
449
  * 移除绘制的线
446
450
  *
447
451
  * @memberof SketchView
448
452
  */
449
- removedraw() {
450
- const e = [];
451
- this.graphicsLayer.graphics.map((t) => {
452
- const i = t.attributes;
453
- (i == null ? void 0 : i.type) === "draw" && e.push(t);
454
- }), this.graphicsLayer.removeMany(e);
455
- }
456
- addGraphic(e, t = {
453
+ removeDraw() {
454
+ const t = [];
455
+ this.graphicsLayer.graphics.map((e) => {
456
+ const i = e.attributes;
457
+ (i == null ? void 0 : i.type) === "draw" && t.push(e);
458
+ }), this.graphicsLayer.removeMany(t);
459
+ }
460
+ addGraphic(t, e = {
457
461
  type: "simple-line",
458
462
  color: [0, 0, 255],
459
463
  width: 2
460
464
  }, i) {
461
465
  const s = new l({
462
- geometry: e,
463
- symbol: t,
466
+ geometry: t,
467
+ symbol: e,
464
468
  attributes: i
465
469
  });
466
470
  this.graphicsLayer.add(s);
@@ -473,12 +477,12 @@ class C {
473
477
  * @returns
474
478
  * @memberof SketchView
475
479
  */
476
- getDirection(e, t) {
477
- const i = t.x - e.x, s = t.y - e.y, o = Math.atan2(s, i) * 180 / Math.PI;
480
+ getDirection(t, e) {
481
+ const i = e.x - t.x, s = e.y - t.y, o = Math.atan2(s, i) * 180 / Math.PI;
478
482
  return o >= -45 && o <= 45 ? 0 : o > 45 && o <= 135 ? 1 : o > 135 || o <= -135 ? 2 : 3;
479
483
  }
480
- findLayerById(e) {
481
- return this.viewer.map.findLayerById(e);
484
+ findLayerById(t) {
485
+ return this.viewer.map.findLayerById(t);
482
486
  }
483
487
  /**
484
488
  * 根据id查找平移线graphic
@@ -487,30 +491,30 @@ class C {
487
491
  * @returns
488
492
  * @memberof SketchView
489
493
  */
490
- findShiftLineGraphicsById(e) {
491
- return this.graphicsLayer.graphics.find((i) => i.attributes.id === e && i.attributes.type === "shiftLine");
494
+ findShiftLineGraphicsById(t) {
495
+ return this.graphicsLayer.graphics.find((i) => i.attributes.id === t && i.attributes.type === "shiftLine");
492
496
  }
493
497
  /**
494
498
  * 删除指定的图形
495
499
  * @param graphic 删除指定的图形
496
500
  */
497
- remove(e) {
498
- this.graphicsLayer.remove(e);
501
+ remove(t) {
502
+ this.graphicsLayer.remove(t);
499
503
  }
500
504
  /**
501
505
  * 设置最大允许绘制的图形数量
502
506
  * @param num 数量
503
507
  */
504
- setmaxAllowedGraphics(e) {
505
- this.options.maxAllowedGraphics = e === 0 ? void 0 : e;
508
+ setMaxAllowedGraphics(t) {
509
+ this.options.maxAllowedGraphics = t === 0 ? void 0 : t;
506
510
  }
507
- deepClone(e) {
511
+ deepClone(t) {
508
512
  }
509
513
  destroy() {
510
- var e, t;
511
- this.viewer.map.remove(this.graphicsLayer), this.viewer.map.remove(this.TextgraphicsLayer), (e = this.sketch) == null || e.destroy(), (t = this.sketchViewModel) == null || t.destroy();
514
+ var t, e;
515
+ this.viewer.map.remove(this.graphicsLayer), this.viewer.map.remove(this.TextGraphicsLayer), (t = this.sketch) == null || t.destroy(), (e = this.sketchViewModel) == null || e.destroy();
512
516
  }
513
517
  }
514
518
  export {
515
- C as default
519
+ R as default
516
520
  };