vue-openlayers-plugin 1.2.0 → 1.2.2

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/lib/{BasemapPanel-d6e4ea88.mjs → BasemapPanel-2a1eff3d.mjs} +1 -1
  2. package/lib/{CoordinateLocationDialog-81d00abc.mjs → CoordinateLocationDialog-3ffa7ef5.mjs} +1 -1
  3. package/lib/{MapPrintDialog-64d46412.mjs → FilterPanel-caa15606.mjs} +1 -1
  4. package/lib/{FilterPanel-7358e3fb.mjs → LayerPanel-c7be314b.mjs} +1 -1
  5. package/lib/{LayerPanel-9bf28955.mjs → MapPrintDialog-1520d417.mjs} +1 -1
  6. package/lib/{MeasurementDialog-4e084192.mjs → MeasurementDialog-1b4b64c7.mjs} +1 -1
  7. package/lib/{MyMarkersDialog-aa44e5bd.mjs → MyMarkersDialog-67ff8e26.mjs} +1 -1
  8. package/lib/{QuadCompareDialog-84a88cf9.mjs → QuadCompareDialog-c1098032.mjs} +1 -1
  9. package/lib/{RegionNavigationDialog-467ad6c0.mjs → RegionNavigationDialog-cc4e392d.mjs} +1 -1
  10. package/lib/{SplitCompareDialog-50410c0b.mjs → SplitCompareDialog-ab540279.mjs} +1 -1
  11. package/lib/{SwipeCompareDialog-c322e2f6.mjs → SwipeCompareDialog-a1aa3ab0.mjs} +1 -1
  12. package/lib/{ViewBookmarksDialog-83cf5ec4.mjs → ViewBookmarksDialog-6b0999f7.mjs} +1 -1
  13. package/lib/{index-58704a25.mjs → index-0c3a5960.mjs} +409 -74
  14. package/lib/{index-ee58f2f8.mjs → index-f34dc985.mjs} +1 -1
  15. package/lib/{index.es-320e524d.mjs → index.es-571daed3.mjs} +1 -1
  16. package/lib/index.esm.js +1 -1
  17. package/lib/index.umd.js +395 -60
  18. package/lib/style.css +61 -19
  19. package/package.json +2 -9
  20. package/types/components/OlControlPanel.vue.d.ts +9 -3
  21. package/types/components/OlControlPanel.vue.d.ts.map +1 -1
  22. package/types/components/OlMap.vue.d.ts +5 -1
  23. package/types/components/OlMap.vue.d.ts.map +1 -1
  24. package/types/core/MapManager.d.ts +5 -0
  25. package/types/core/MapManager.d.ts.map +1 -1
  26. package/types/lowcode-entry.d.ts +10 -0
  27. package/types/lowcode-entry.d.ts.map +1 -1
  28. package/types/types/map.d.ts +37 -0
  29. package/types/types/map.d.ts.map +1 -1
  30. package/lib//346/240/207/345/207/206 +0 -159
  31. package/types/tsconfig.tsbuildinfo +0 -1
@@ -5,11 +5,11 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, normalizeClass, normalizeStyle as normalizeStyle$1, withModifiers, createElementVNode, createBlock, unref, withCtx, createTextVNode, createCommentVNode, renderSlot, nextTick, toDisplayString, onUnmounted, createVNode as createVNode$1, Fragment, renderList, h as h$3, createApp, inject, provide, isRef, resolveDirective, withDirectives, vShow, defineAsyncComponent, reactive, shallowRef, resolveComponent, resolveDynamicComponent, withKeys, useAttrs, useSlots, mergeProps, createSlots, normalizeProps, guardReactiveProps, watchEffect, Teleport } from "vue";
8
- import { MapLocation, Grid as Grid$6, Tools, Location, Guide, Flag, Printer, EditPen, Delete, Switch, DocumentCopy, Search, Loading, Clock, InfoFilled, Plus, Minus, RefreshLeft, RefreshRight, Right, FullScreen, Aim, Menu as Menu$2, View as View$4, Expand, FolderOpened, DataBoard, Setting, Download, Refresh, ZoomIn, ZoomOut, Document as Document$1, Position, Close } from "@element-plus/icons-vue";
8
+ import { MapLocation, Grid as Grid$6, Tools, Location, Guide, Flag, Printer, EditPen, Delete, Switch, DocumentCopy, Search, Loading, Clock, InfoFilled, Plus, Minus, RefreshLeft, RefreshRight, Right, FullScreen, Aim, Menu as Menu$2, View as View$4, Expand, Share, CircleCheck, FolderOpened, DataBoard, Setting, Download, Refresh, ZoomIn, ZoomOut, Document as Document$1, Position, Close } from "@element-plus/icons-vue";
9
9
  import { Feature as Feature$3, Map as Map$4 } from "ol";
10
10
  import proj4 from "proj4";
11
11
  import { TileSuperMapRest, Util as Util$3, GetFeaturesByGeometryParameters as GetFeaturesByGeometryParameters$1, FeatureService } from "@supermapgis/iclient-ol";
12
- import { ElButton, ElInput, ElIcon, ElDialog } from "element-plus";
12
+ import { ElButton, ElInput, ElIcon, ElPopover, ElTooltip, ElCheckbox, ElDialog } from "element-plus";
13
13
  function _mergeNamespaces(n2, m2) {
14
14
  for (var i = 0; i < m2.length; i++) {
15
15
  const e8 = m2[i];
@@ -4183,7 +4183,6 @@ function transformGeom2D(simpleGeometry, transform3, dest) {
4183
4183
  dest
4184
4184
  );
4185
4185
  }
4186
- const SimpleGeometry$1 = SimpleGeometry;
4187
4186
  function linearRing(flatCoordinates, offset2, end3, stride) {
4188
4187
  let twiceArea = 0;
4189
4188
  const x0 = flatCoordinates[end3 - stride];
@@ -4636,7 +4635,7 @@ function quantizeMultiArray(flatCoordinates, offset2, endss, stride, tolerance2,
4636
4635
  }
4637
4636
  return simplifiedOffset;
4638
4637
  }
4639
- let LinearRing$1 = class LinearRing extends SimpleGeometry$1 {
4638
+ let LinearRing$1 = class LinearRing extends SimpleGeometry {
4640
4639
  /**
4641
4640
  * @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
4642
4641
  * For internal use, flat coordinates in combination with `layout` are also accepted.
@@ -4793,7 +4792,7 @@ let LinearRing$1 = class LinearRing extends SimpleGeometry$1 {
4793
4792
  }
4794
4793
  };
4795
4794
  const LinearRing$2 = LinearRing$1;
4796
- let Point$5 = class Point extends SimpleGeometry$1 {
4795
+ let Point$5 = class Point extends SimpleGeometry {
4797
4796
  /**
4798
4797
  * @param {import("../coordinate.js").Coordinate} coordinates Coordinates.
4799
4798
  * @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
@@ -5278,7 +5277,7 @@ function inflateEnds(flatCoordinates, ends) {
5278
5277
  }
5279
5278
  return endss;
5280
5279
  }
5281
- let Polygon$6 = class Polygon extends SimpleGeometry$1 {
5280
+ let Polygon$6 = class Polygon extends SimpleGeometry {
5282
5281
  /**
5283
5282
  * @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
5284
5283
  * Array of linear rings that define the polygon. The first linear ring of the
@@ -18178,7 +18177,7 @@ function lineStringLength(flatCoordinates, offset2, end3, stride) {
18178
18177
  }
18179
18178
  return length2;
18180
18179
  }
18181
- let LineString$1 = class LineString extends SimpleGeometry$1 {
18180
+ let LineString$1 = class LineString extends SimpleGeometry {
18182
18181
  /**
18183
18182
  * @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
18184
18183
  * For internal use, flat coordinates in combination with `layout` are also accepted.
@@ -19776,7 +19775,7 @@ function linearRingss(flatCoordinates, offset2, endss, stride) {
19776
19775
  }
19777
19776
  return flatCenters;
19778
19777
  }
19779
- let Circle$6 = class Circle extends SimpleGeometry$1 {
19778
+ let Circle$6 = class Circle extends SimpleGeometry {
19780
19779
  /**
19781
19780
  * @param {!import("../coordinate.js").Coordinate} center Center.
19782
19781
  * For internal use, flat coordinates in combination with `layout` and no
@@ -20288,7 +20287,7 @@ function cloneGeometries(geometries) {
20288
20287
  return geometries.map((geometry) => geometry.clone());
20289
20288
  }
20290
20289
  const GeometryCollection$1 = GeometryCollection;
20291
- let MultiLineString$1 = class MultiLineString extends SimpleGeometry$1 {
20290
+ let MultiLineString$1 = class MultiLineString extends SimpleGeometry {
20292
20291
  /**
20293
20292
  * @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates
20294
20293
  * Coordinates or LineString geometries. (For internal use, flat coordinates in
@@ -20604,7 +20603,7 @@ let MultiLineString$1 = class MultiLineString extends SimpleGeometry$1 {
20604
20603
  }
20605
20604
  };
20606
20605
  const MultiLineString$2 = MultiLineString$1;
20607
- let MultiPoint$1 = class MultiPoint extends SimpleGeometry$1 {
20606
+ let MultiPoint$1 = class MultiPoint extends SimpleGeometry {
20608
20607
  /**
20609
20608
  * @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
20610
20609
  * For internal use, flat coordinates in combination with `layout` are also accepted.
@@ -20779,7 +20778,7 @@ let MultiPoint$1 = class MultiPoint extends SimpleGeometry$1 {
20779
20778
  }
20780
20779
  };
20781
20780
  const MultiPoint$2 = MultiPoint$1;
20782
- let MultiPolygon$1 = class MultiPolygon extends SimpleGeometry$1 {
20781
+ let MultiPolygon$1 = class MultiPolygon extends SimpleGeometry {
20783
20782
  /**
20784
20783
  * @param {Array<Array<Array<import("../coordinate.js").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.
20785
20784
  * For internal use, flat coordinates in combination with `layout` and `endss` are also accepted.
@@ -54625,7 +54624,6 @@ class FeatureFormat {
54625
54624
  return abstract();
54626
54625
  }
54627
54626
  }
54628
- const FeatureFormat$1 = FeatureFormat;
54629
54627
  function transformGeometryWithOptions(geometry, write3, options) {
54630
54628
  const featureProjection = options ? get$5(options.featureProjection) : null;
54631
54629
  const dataProjection = options ? get$5(options.dataProjection) : null;
@@ -54738,7 +54736,7 @@ function createGeometry(object2, options) {
54738
54736
  options
54739
54737
  );
54740
54738
  }
54741
- class JSONFeature extends FeatureFormat$1 {
54739
+ class JSONFeature extends FeatureFormat {
54742
54740
  constructor() {
54743
54741
  super();
54744
54742
  }
@@ -55675,7 +55673,7 @@ function getDocument() {
55675
55673
  }
55676
55674
  return document_;
55677
55675
  }
55678
- class XMLFeature extends FeatureFormat$1 {
55676
+ class XMLFeature extends FeatureFormat {
55679
55677
  constructor() {
55680
55678
  super();
55681
55679
  this.xmlSerializer_ = getXMLSerializer();
@@ -58181,7 +58179,7 @@ const GML = GML3$1;
58181
58179
  GML.prototype.writeFeatures;
58182
58180
  GML.prototype.writeFeaturesNode;
58183
58181
  const GML$1 = GML;
58184
- class TextFeature extends FeatureFormat$1 {
58182
+ class TextFeature extends FeatureFormat {
58185
58183
  constructor() {
58186
58184
  super();
58187
58185
  }
@@ -61492,7 +61490,7 @@ function writeUtf8(buf, str2, pos) {
61492
61490
  }
61493
61491
  return pos;
61494
61492
  }
61495
- class MVT extends FeatureFormat$1 {
61493
+ class MVT extends FeatureFormat {
61496
61494
  /**
61497
61495
  * @param {Options<FeatureType>} [options] Options.
61498
61496
  */
@@ -334669,24 +334667,24 @@ const _hoisted_7$c = {
334669
334667
  key: 0,
334670
334668
  class: "image-loading"
334671
334669
  };
334672
- const _hoisted_8$b = {
334670
+ const _hoisted_8$c = {
334673
334671
  key: 1,
334674
334672
  class: "image-error"
334675
334673
  };
334676
- const _hoisted_9$b = {
334674
+ const _hoisted_9$c = {
334677
334675
  key: 2,
334678
334676
  class: "image-navigation"
334679
334677
  };
334680
- const _hoisted_10$b = {
334678
+ const _hoisted_10$c = {
334681
334679
  key: 3,
334682
334680
  class: "image-counter"
334683
334681
  };
334684
- const _hoisted_11$9 = {
334682
+ const _hoisted_11$a = {
334685
334683
  key: 2,
334686
334684
  class: "image-thumbnails"
334687
334685
  };
334688
- const _hoisted_12$7 = ["onClick"];
334689
- const _hoisted_13$7 = ["src", "alt"];
334686
+ const _hoisted_12$8 = ["onClick"];
334687
+ const _hoisted_13$8 = ["src", "alt"];
334690
334688
  const _hoisted_14$5 = {
334691
334689
  key: 3,
334692
334690
  class: "slideshow-controls"
@@ -334857,10 +334855,10 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
334857
334855
  createElementVNode("div", { class: "loading-spinner" }, null, -1),
334858
334856
  createElementVNode("span", null, "加载中...", -1)
334859
334857
  ])])) : createCommentVNode("", true),
334860
- imageError.value ? (openBlock(), createElementBlock("div", _hoisted_8$b, [..._cache[5] || (_cache[5] = [
334858
+ imageError.value ? (openBlock(), createElementBlock("div", _hoisted_8$c, [..._cache[5] || (_cache[5] = [
334861
334859
  createElementVNode("span", null, "图片加载失败", -1)
334862
334860
  ])])) : createCommentVNode("", true),
334863
- imageList.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_9$b, [
334861
+ imageList.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_9$c, [
334864
334862
  createVNode$1(unref(ElButton), {
334865
334863
  class: "nav-btn prev-btn",
334866
334864
  disabled: currentIndex.value === 0,
@@ -334886,10 +334884,10 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
334886
334884
  _: 1
334887
334885
  }, 8, ["disabled"])
334888
334886
  ])) : createCommentVNode("", true),
334889
- imageList.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_10$b, toDisplayString(currentIndex.value + 1) + " / " + toDisplayString(imageList.value.length), 1)) : createCommentVNode("", true)
334887
+ imageList.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_10$c, toDisplayString(currentIndex.value + 1) + " / " + toDisplayString(imageList.value.length), 1)) : createCommentVNode("", true)
334890
334888
  ])
334891
334889
  ]),
334892
- _ctx.config.showThumbnails && imageList.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_11$9, [
334890
+ _ctx.config.showThumbnails && imageList.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_11$a, [
334893
334891
  (openBlock(true), createElementBlock(Fragment, null, renderList(imageList.value, (image2, index2) => {
334894
334892
  return openBlock(), createElementBlock("div", {
334895
334893
  key: index2,
@@ -334899,8 +334897,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
334899
334897
  createElementVNode("img", {
334900
334898
  src: image2,
334901
334899
  alt: `缩略图 ${index2 + 1}`
334902
- }, null, 8, _hoisted_13$7)
334903
- ], 10, _hoisted_12$7);
334900
+ }, null, 8, _hoisted_13$8)
334901
+ ], 10, _hoisted_12$8);
334904
334902
  }), 128))
334905
334903
  ])) : createCommentVNode("", true),
334906
334904
  _ctx.config.slideshow && imageList.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_14$5, [
@@ -334972,18 +334970,18 @@ const _hoisted_6$c = {
334972
334970
  class: "data-stats"
334973
334971
  };
334974
334972
  const _hoisted_7$b = { key: 0 };
334975
- const _hoisted_8$a = {
334973
+ const _hoisted_8$b = {
334976
334974
  key: 5,
334977
334975
  class: "table-view"
334978
334976
  };
334979
- const _hoisted_9$a = { class: "table-container" };
334980
- const _hoisted_10$a = { class: "data-table" };
334981
- const _hoisted_11$8 = ["onClick"];
334982
- const _hoisted_12$6 = {
334977
+ const _hoisted_9$b = { class: "table-container" };
334978
+ const _hoisted_10$b = { class: "data-table" };
334979
+ const _hoisted_11$9 = ["onClick"];
334980
+ const _hoisted_12$7 = {
334983
334981
  key: 0,
334984
334982
  class: "sort-indicator"
334985
334983
  };
334986
- const _hoisted_13$6 = ["onClick"];
334984
+ const _hoisted_13$7 = ["onClick"];
334987
334985
  const _hoisted_14$4 = { key: 0 };
334988
334986
  const _hoisted_15$3 = ["src", "alt"];
334989
334987
  const _hoisted_16$3 = { key: 1 };
@@ -335240,9 +335238,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
335240
335238
  createElementVNode("span", null, "共 " + toDisplayString(filteredData.value.length) + " 条记录", 1),
335241
335239
  searchQuery.value ? (openBlock(), createElementBlock("span", _hoisted_7$b, "(已过滤 " + toDisplayString(arrayData.value.length - filteredData.value.length) + " 条)", 1)) : createCommentVNode("", true)
335242
335240
  ])) : createCommentVNode("", true),
335243
- currentView.value === "table" ? (openBlock(), createElementBlock("div", _hoisted_8$a, [
335244
- createElementVNode("div", _hoisted_9$a, [
335245
- createElementVNode("table", _hoisted_10$a, [
335241
+ currentView.value === "table" ? (openBlock(), createElementBlock("div", _hoisted_8$b, [
335242
+ createElementVNode("div", _hoisted_9$b, [
335243
+ createElementVNode("table", _hoisted_10$b, [
335246
335244
  createElementVNode("thead", null, [
335247
335245
  createElementVNode("tr", null, [
335248
335246
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayFields.value, (field) => {
@@ -335252,8 +335250,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
335252
335250
  onClick: ($event) => handleSort(field.key)
335253
335251
  }, [
335254
335252
  createTextVNode(toDisplayString(field.label) + " ", 1),
335255
- field.sortable && sortField.value === field.key ? (openBlock(), createElementBlock("span", _hoisted_12$6, toDisplayString(sortOrder.value === "asc" ? "↑" : "↓"), 1)) : createCommentVNode("", true)
335256
- ], 10, _hoisted_11$8);
335253
+ field.sortable && sortField.value === field.key ? (openBlock(), createElementBlock("span", _hoisted_12$7, toDisplayString(sortOrder.value === "asc" ? "↑" : "↓"), 1)) : createCommentVNode("", true)
335254
+ ], 10, _hoisted_11$9);
335257
335255
  }), 128))
335258
335256
  ])
335259
335257
  ]),
@@ -335282,7 +335280,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
335282
335280
  ])) : field.type === "date" ? (openBlock(), createElementBlock("span", _hoisted_18$3, toDisplayString(formatDate(getFieldValue(item, field.key || field.name))), 1)) : field.type === "number" ? (openBlock(), createElementBlock("span", _hoisted_19$3, toDisplayString(formatNumber2(getFieldValue(item, field.key || field.name))), 1)) : (openBlock(), createElementBlock("span", _hoisted_20$2, toDisplayString(getFieldValue(item, field.key || field.name)), 1))
335283
335281
  ]);
335284
335282
  }), 128))
335285
- ], 8, _hoisted_13$6);
335283
+ ], 8, _hoisted_13$7);
335286
335284
  }), 128))
335287
335285
  ])
335288
335286
  ])
@@ -335990,15 +335988,34 @@ class MapManager {
335990
335988
  __publicField(this, "drawingManager", null);
335991
335989
  __publicField(this, "featureHighlightManager", null);
335992
335990
  __publicField(this, "popupManager", null);
335991
+ __publicField(this, "drawingEndListener", null);
335993
335992
  // 状态管理
335994
335993
  __publicField(this, "isCoordinatePicking", false);
335995
335994
  __publicField(this, "coordinatePickCallback", null);
335996
335995
  __publicField(this, "measurementType", null);
335997
335996
  __publicField(this, "contextMenuCoordinate", [0, 0]);
335997
+ __publicField(this, "ignoreMapClickUntil", 0);
335998
335998
  this.config = config;
335999
335999
  this.eventBus = eventBus;
336000
336000
  this.storage = storage2;
336001
336001
  }
336002
+ markDrawingEndIgnoreWindow() {
336003
+ this.ignoreMapClickUntil = Date.now() + 300;
336004
+ }
336005
+ shouldIgnoreMapClick() {
336006
+ return Date.now() < this.ignoreMapClickUntil;
336007
+ }
336008
+ bindDrawingManagerEvents() {
336009
+ if (!this.drawingManager)
336010
+ return;
336011
+ if (this.drawingEndListener) {
336012
+ this.drawingManager.off("drawing-end", this.drawingEndListener);
336013
+ }
336014
+ this.drawingEndListener = () => {
336015
+ this.markDrawingEndIgnoreWindow();
336016
+ };
336017
+ this.drawingManager.on("drawing-end", this.drawingEndListener);
336018
+ }
336002
336019
  /**
336003
336020
  * 处理要素点击的popup显示
336004
336021
  */
@@ -336293,6 +336310,7 @@ class MapManager {
336293
336310
  this.featureHighlightManager = new FeatureHighlightManager(this.map);
336294
336311
  this.markerAdapter = new MarkerDrawingAdapter(this.map);
336295
336312
  this.drawingManager = new DrawingManager({ map: this.map });
336313
+ this.bindDrawingManagerEvents();
336296
336314
  this.measurementTool = new MeasurementTool(this.map, this.storage);
336297
336315
  const initialCenter = this.config.center || [116.404, 39.915];
336298
336316
  const initialZoom = this.config.zoom || 10;
@@ -336388,6 +336406,9 @@ class MapManager {
336388
336406
  }
336389
336407
  return;
336390
336408
  }
336409
+ if (this.shouldIgnoreMapClick()) {
336410
+ return;
336411
+ }
336391
336412
  const featuresAtPixel = [];
336392
336413
  this.map.forEachFeatureAtPixel(pixel, (feature, layer2) => {
336393
336414
  if (layer2 && feature) {
@@ -336878,6 +336899,9 @@ class MapManager {
336878
336899
  const view = this.map.getView();
336879
336900
  const projection2 = view.getProjection().getCode();
336880
336901
  const lonLatCoordinate = projection2 === "EPSG:4326" || projection2 === "EPSG:4490" ? coordinate : toLonLat(coordinate);
336902
+ if (this.shouldIgnoreMapClick()) {
336903
+ return;
336904
+ }
336881
336905
  const features2 = this.map.getFeaturesAtPixel(pixel);
336882
336906
  if (features2 && features2.length > 0) {
336883
336907
  features2.sort((a3, b10) => {
@@ -337158,6 +337182,9 @@ class MapManager {
337158
337182
  * 销毁地图管理器
337159
337183
  */
337160
337184
  destroy() {
337185
+ if (this.drawingManager && this.drawingEndListener) {
337186
+ this.drawingManager.off("drawing-end", this.drawingEndListener);
337187
+ }
337161
337188
  if (this.map) {
337162
337189
  this.map.setTarget(void 0);
337163
337190
  }
@@ -337168,6 +337195,7 @@ class MapManager {
337168
337195
  this.measurementTool = null;
337169
337196
  this.mapOperationTool = null;
337170
337197
  this.drawingManager = null;
337198
+ this.drawingEndListener = null;
337171
337199
  this.eventCallbacks = {};
337172
337200
  this.map = null;
337173
337201
  }
@@ -337397,19 +337425,19 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
337397
337425
  }
337398
337426
  });
337399
337427
  const defaultComponents = {
337400
- measurement: () => import("./MeasurementDialog-4e084192.mjs"),
337401
- basemap: () => import("./BasemapPanel-d6e4ea88.mjs"),
337402
- print: () => import("./MapPrintDialog-64d46412.mjs"),
337403
- "layer-panel": () => import("./LayerPanel-9bf28955.mjs"),
337404
- coordinate: () => import("./CoordinateLocationDialog-81d00abc.mjs"),
337405
- "region-navigation": () => import("./RegionNavigationDialog-467ad6c0.mjs"),
337406
- "my-markers": () => import("./MyMarkersDialog-aa44e5bd.mjs"),
337407
- "view-bookmarks": () => import("./ViewBookmarksDialog-83cf5ec4.mjs"),
337408
- "map-drawing": () => import("./index-ee58f2f8.mjs"),
337409
- "filter-panel": () => import("./FilterPanel-7358e3fb.mjs"),
337410
- "swipe-compare": () => import("./SwipeCompareDialog-c322e2f6.mjs"),
337411
- "split-compare": () => import("./SplitCompareDialog-50410c0b.mjs"),
337412
- "quad-compare": () => import("./QuadCompareDialog-84a88cf9.mjs")
337428
+ measurement: () => import("./MeasurementDialog-1b4b64c7.mjs"),
337429
+ basemap: () => import("./BasemapPanel-2a1eff3d.mjs"),
337430
+ print: () => import("./MapPrintDialog-1520d417.mjs"),
337431
+ "layer-panel": () => import("./LayerPanel-c7be314b.mjs"),
337432
+ coordinate: () => import("./CoordinateLocationDialog-3ffa7ef5.mjs"),
337433
+ "region-navigation": () => import("./RegionNavigationDialog-cc4e392d.mjs"),
337434
+ "my-markers": () => import("./MyMarkersDialog-67ff8e26.mjs"),
337435
+ "view-bookmarks": () => import("./ViewBookmarksDialog-6b0999f7.mjs"),
337436
+ "map-drawing": () => import("./index-f34dc985.mjs"),
337437
+ "filter-panel": () => import("./FilterPanel-caa15606.mjs"),
337438
+ "swipe-compare": () => import("./SwipeCompareDialog-a1aa3ab0.mjs"),
337439
+ "split-compare": () => import("./SplitCompareDialog-ab540279.mjs"),
337440
+ "quad-compare": () => import("./QuadCompareDialog-c1098032.mjs")
337413
337441
  };
337414
337442
  const _DialogRegistry = class _DialogRegistry {
337415
337443
  constructor() {
@@ -338747,18 +338775,18 @@ const _hoisted_4$h = { class: "section-title" };
338747
338775
  const _hoisted_5$f = ["onClick"];
338748
338776
  const _hoisted_6$b = { class: "item-content" };
338749
338777
  const _hoisted_7$a = { class: "item-name" };
338750
- const _hoisted_8$9 = { class: "item-address" };
338751
- const _hoisted_9$9 = {
338778
+ const _hoisted_8$a = { class: "item-address" };
338779
+ const _hoisted_9$a = {
338752
338780
  key: 1,
338753
338781
  class: "search-section"
338754
338782
  };
338755
- const _hoisted_10$9 = {
338783
+ const _hoisted_10$a = {
338756
338784
  key: 0,
338757
338785
  class: "section-title"
338758
338786
  };
338759
- const _hoisted_11$7 = { class: "result-count" };
338760
- const _hoisted_12$5 = ["onClick"];
338761
- const _hoisted_13$5 = { class: "item-content" };
338787
+ const _hoisted_11$8 = { class: "result-count" };
338788
+ const _hoisted_12$6 = ["onClick"];
338789
+ const _hoisted_13$6 = { class: "item-content" };
338762
338790
  const _hoisted_14$3 = ["innerHTML"];
338763
338791
  const _hoisted_15$2 = ["innerHTML"];
338764
338792
  const _hoisted_16$2 = {
@@ -339248,20 +339276,20 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
339248
339276
  }),
339249
339277
  createElementVNode("div", _hoisted_6$b, [
339250
339278
  createElementVNode("div", _hoisted_7$a, toDisplayString(item.name), 1),
339251
- createElementVNode("div", _hoisted_8$9, toDisplayString(item.address), 1)
339279
+ createElementVNode("div", _hoisted_8$a, toDisplayString(item.address), 1)
339252
339280
  ])
339253
339281
  ], 10, _hoisted_5$f)
339254
339282
  ]);
339255
339283
  }), 128))
339256
339284
  ])) : createCommentVNode("", true),
339257
- searchResults.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9$9, [
339285
+ searchResults.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_9$a, [
339258
339286
  renderSlot(_ctx.$slots, "results-title", {
339259
339287
  searchQuery: searchQuery.value,
339260
339288
  resultsCount: searchResults.value.length
339261
339289
  }, () => [
339262
- searchQuery.value ? (openBlock(), createElementBlock("div", _hoisted_10$9, [
339290
+ searchQuery.value ? (openBlock(), createElementBlock("div", _hoisted_10$a, [
339263
339291
  createElementVNode("span", null, toDisplayString(resultsTitleText.value), 1),
339264
- createElementVNode("span", _hoisted_11$7, "(" + toDisplayString(searchResults.value.length) + ")", 1)
339292
+ createElementVNode("span", _hoisted_11$8, "(" + toDisplayString(searchResults.value.length) + ")", 1)
339265
339293
  ])) : createCommentVNode("", true)
339266
339294
  ]),
339267
339295
  (openBlock(true), createElementBlock(Fragment, null, renderList(displayResults.value, (result, index2) => {
@@ -339286,7 +339314,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
339286
339314
  ]),
339287
339315
  _: 1
339288
339316
  }),
339289
- createElementVNode("div", _hoisted_13$5, [
339317
+ createElementVNode("div", _hoisted_13$6, [
339290
339318
  createElementVNode("div", {
339291
339319
  class: "item-name",
339292
339320
  innerHTML: highlightText(result.name, searchQuery.value)
@@ -339298,7 +339326,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
339298
339326
  result.type ? (openBlock(), createElementBlock("div", _hoisted_16$2, toDisplayString(result.type), 1)) : createCommentVNode("", true)
339299
339327
  ]),
339300
339328
  result.confidence ? (openBlock(), createElementBlock("div", _hoisted_17$2, toDisplayString(Math.round(result.confidence * 100)) + "% ", 1)) : createCommentVNode("", true)
339301
- ], 10, _hoisted_12$5)
339329
+ ], 10, _hoisted_12$6)
339302
339330
  ]);
339303
339331
  }), 128))
339304
339332
  ])) : createCommentVNode("", true),
@@ -339474,6 +339502,24 @@ const _hoisted_7$9 = {
339474
339502
  key: 6,
339475
339503
  class: "control-section"
339476
339504
  };
339505
+ const _hoisted_8$9 = { class: "drawing-menu-panel-content" };
339506
+ const _hoisted_9$9 = { class: "drawing-tool-list" };
339507
+ const _hoisted_10$9 = {
339508
+ key: 0,
339509
+ class: "drawing-menu-divider"
339510
+ };
339511
+ const _hoisted_11$7 = {
339512
+ key: 1,
339513
+ class: "drawing-toggle-row"
339514
+ };
339515
+ const _hoisted_12$5 = {
339516
+ key: 7,
339517
+ class: "control-divider"
339518
+ };
339519
+ const _hoisted_13$5 = {
339520
+ key: 8,
339521
+ class: "control-section"
339522
+ };
339477
339523
  const _sfc_main$k = /* @__PURE__ */ defineComponent({
339478
339524
  __name: "OlControlPanel",
339479
339525
  props: {
@@ -339486,8 +339532,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
339486
339532
  bottomOffset: {},
339487
339533
  viewBookmarks: {}
339488
339534
  },
339489
- setup(__props, { expose: __expose }) {
339535
+ emits: ["drawing-complete", "drawing-clear"],
339536
+ setup(__props, { expose: __expose, emit: __emit }) {
339490
339537
  const props = __props;
339538
+ const emit = __emit;
339491
339539
  const map2 = inject("map");
339492
339540
  const mapManager = inject("mapManager");
339493
339541
  const overviewMapUtil = createOverviewMapUtil();
@@ -339497,7 +339545,37 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
339497
339545
  const currentZoom = ref(10);
339498
339546
  const minZoom = ref(3);
339499
339547
  const maxZoom = ref(18);
339548
+ const isDrawingMenuOpen = ref(false);
339549
+ const continuousDrawing = ref(false);
339550
+ const activeDrawingMode = ref("none");
339551
+ const DEFAULT_DRAWING_TOOLS = [
339552
+ "rectangle",
339553
+ "polygon",
339554
+ "circle",
339555
+ "line",
339556
+ "point"
339557
+ ];
339558
+ const drawingToolLabels = {
339559
+ point: "绘制点",
339560
+ line: "绘制线",
339561
+ polygon: "绘制多边形",
339562
+ circle: "绘制圆形",
339563
+ rectangle: "绘制矩形"
339564
+ };
339565
+ const geoJsonFormat = new GeoJSON$2();
339566
+ let boundDrawingManager = null;
339567
+ let boundDrawingEndHandler = null;
339568
+ let boundModeChangeHandler = null;
339500
339569
  const currentMap = computed(() => map2 == null ? void 0 : map2.value);
339570
+ const popoverPlacement = computed(() => {
339571
+ const isRight = props.position.includes("right");
339572
+ const isBottom = props.position.includes("bottom");
339573
+ if (props.direction === "vertical") {
339574
+ return isRight ? "left" : "right";
339575
+ } else {
339576
+ return isBottom ? "top" : "bottom";
339577
+ }
339578
+ });
339501
339579
  const positionClasses = computed(() => {
339502
339580
  const basePositions = {
339503
339581
  "top-left": "top-4 left-4",
@@ -339581,10 +339659,55 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
339581
339659
  const tools = props.config.tools;
339582
339660
  return !!((tools == null ? void 0 : tools.viewBookmarks) || props.config.viewBookmarks);
339583
339661
  });
339662
+ const drawingControlConfig = computed(() => {
339663
+ var _a2;
339664
+ const rawConfig = ((_a2 = props.config.tools) == null ? void 0 : _a2.drawing) ?? props.config.drawing;
339665
+ if (rawConfig === false) {
339666
+ return {
339667
+ enabled: false,
339668
+ trigger: "hover",
339669
+ continuous: false,
339670
+ showContinuousToggle: true,
339671
+ tools: DEFAULT_DRAWING_TOOLS,
339672
+ onDrawEnd: void 0
339673
+ };
339674
+ }
339675
+ if (rawConfig === true || rawConfig === void 0) {
339676
+ return {
339677
+ enabled: rawConfig === true,
339678
+ trigger: "hover",
339679
+ continuous: false,
339680
+ showContinuousToggle: true,
339681
+ tools: DEFAULT_DRAWING_TOOLS,
339682
+ onDrawEnd: void 0
339683
+ };
339684
+ }
339685
+ const config = rawConfig;
339686
+ const tools = (config.tools || DEFAULT_DRAWING_TOOLS).filter(
339687
+ (tool) => DEFAULT_DRAWING_TOOLS.includes(tool)
339688
+ );
339689
+ return {
339690
+ enabled: config.enabled !== false,
339691
+ trigger: config.trigger || "hover",
339692
+ continuous: config.continuous ?? false,
339693
+ showContinuousToggle: config.showContinuousToggle !== false,
339694
+ tools: tools.length > 0 ? Array.from(new Set(tools)) : DEFAULT_DRAWING_TOOLS,
339695
+ onDrawEnd: config.onDrawEnd
339696
+ };
339697
+ });
339698
+ const isDrawingEnabled = computed(() => drawingControlConfig.value.enabled);
339699
+ const isDrawingActive = computed(() => activeDrawingMode.value !== "none");
339584
339700
  const hasOtherTools = computed(() => {
339585
339701
  const tools = props.config.tools;
339586
339702
  return !!((tools == null ? void 0 : tools.fullScreen) || props.config.fullScreen || (tools == null ? void 0 : tools.location) || props.config.location || isLayerPanelEnabled.value || isViewBookmarksEnabled.value || (tools == null ? void 0 : tools.overviewMap) || props.config.overviewMap || (tools == null ? void 0 : tools.zoomToExtent) || props.config.zoomToExtent);
339587
339703
  });
339704
+ watch(
339705
+ drawingControlConfig,
339706
+ (config) => {
339707
+ continuousDrawing.value = config.continuous;
339708
+ },
339709
+ { immediate: true }
339710
+ );
339588
339711
  const initOverviewMap = () => {
339589
339712
  const tools = props.config.tools || {};
339590
339713
  const rawConfig = tools.overviewMap ?? props.config.overviewMap;
@@ -339752,7 +339875,89 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
339752
339875
  const clearAllDrawnContent = () => {
339753
339876
  if (mapManager == null ? void 0 : mapManager.value) {
339754
339877
  mapManager.value.clearAll();
339878
+ emit("drawing-clear", {
339879
+ source: "controls",
339880
+ cleared: true,
339881
+ timestamp: Date.now()
339882
+ });
339883
+ }
339884
+ };
339885
+ const buildDrawingResult = (drawing) => {
339886
+ const drawingJson = drawing.toJSON();
339887
+ const feature = drawing.getFeature();
339888
+ let geojson = null;
339889
+ if (feature && currentMap.value) {
339890
+ try {
339891
+ geojson = geoJsonFormat.writeFeatureObject(feature, {
339892
+ featureProjection: currentMap.value.getView().getProjection(),
339893
+ dataProjection: "EPSG:4326"
339894
+ });
339895
+ } catch (error2) {
339896
+ console.warn("绘制结果转 GeoJSON 失败:", error2);
339897
+ }
339755
339898
  }
339899
+ return {
339900
+ id: drawing.getId(),
339901
+ type: drawing.getType(),
339902
+ name: drawing.getName(),
339903
+ coordinates: drawingJson.coordinates,
339904
+ properties: drawingJson.properties || {},
339905
+ style: drawingJson.style || {},
339906
+ config: drawingJson.config || {},
339907
+ geojson,
339908
+ drawing,
339909
+ feature,
339910
+ source: "controls"
339911
+ };
339912
+ };
339913
+ const cleanupDrawingListeners = () => {
339914
+ if (boundDrawingManager && boundDrawingEndHandler && boundModeChangeHandler) {
339915
+ boundDrawingManager.off("drawing-end", boundDrawingEndHandler);
339916
+ boundDrawingManager.off("mode-change", boundModeChangeHandler);
339917
+ }
339918
+ boundDrawingManager = null;
339919
+ boundDrawingEndHandler = null;
339920
+ boundModeChangeHandler = null;
339921
+ activeDrawingMode.value = "none";
339922
+ };
339923
+ const bindDrawingListeners = (drawingManager) => {
339924
+ cleanupDrawingListeners();
339925
+ if (!drawingManager)
339926
+ return;
339927
+ boundDrawingManager = drawingManager;
339928
+ activeDrawingMode.value = drawingManager.getMode();
339929
+ boundDrawingEndHandler = (drawing) => {
339930
+ var _a2, _b2;
339931
+ const result = buildDrawingResult(drawing);
339932
+ (_b2 = (_a2 = drawingControlConfig.value).onDrawEnd) == null ? void 0 : _b2.call(_a2, result);
339933
+ emit("drawing-complete", result);
339934
+ };
339935
+ boundModeChangeHandler = (mode) => {
339936
+ activeDrawingMode.value = mode;
339937
+ };
339938
+ drawingManager.on("drawing-end", boundDrawingEndHandler);
339939
+ drawingManager.on("mode-change", boundModeChangeHandler);
339940
+ };
339941
+ const startQuickDrawing = (tool) => {
339942
+ var _a2;
339943
+ const drawingManager = (_a2 = mapManager == null ? void 0 : mapManager.value) == null ? void 0 : _a2.getDrawingManager();
339944
+ if (!drawingManager) {
339945
+ console.warn("DrawingManager not found");
339946
+ return;
339947
+ }
339948
+ drawingManager.setContinuousDrawing(continuousDrawing.value);
339949
+ drawingManager.setMode(tool, {
339950
+ allowContinuousDrawing: continuousDrawing.value
339951
+ });
339952
+ isDrawingMenuOpen.value = false;
339953
+ };
339954
+ const stopQuickDrawing = () => {
339955
+ var _a2;
339956
+ const drawingManager = (_a2 = mapManager == null ? void 0 : mapManager.value) == null ? void 0 : _a2.getDrawingManager();
339957
+ if (!drawingManager)
339958
+ return;
339959
+ drawingManager.setMode("none");
339960
+ isDrawingMenuOpen.value = false;
339756
339961
  };
339757
339962
  const zoomToExtent = () => {
339758
339963
  var _a2;
@@ -339797,6 +340002,16 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
339797
340002
  },
339798
340003
  { immediate: true }
339799
340004
  );
340005
+ watch(
340006
+ () => {
340007
+ var _a2;
340008
+ return ((_a2 = mapManager == null ? void 0 : mapManager.value) == null ? void 0 : _a2.getDrawingManager()) || null;
340009
+ },
340010
+ (drawingManager) => {
340011
+ bindDrawingListeners(drawingManager);
340012
+ },
340013
+ { immediate: true }
340014
+ );
339800
340015
  const handleFullscreenChange = () => {
339801
340016
  isFullscreen.value = !!document.fullscreenElement;
339802
340017
  };
@@ -339808,6 +340023,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
339808
340023
  var _a2;
339809
340024
  document.removeEventListener("fullscreenchange", handleFullscreenChange);
339810
340025
  overviewMapUtil.destroy();
340026
+ cleanupDrawingListeners();
339811
340027
  if (currentMap.value) {
339812
340028
  currentMap.value.un("moveend", updateScale);
339813
340029
  (_a2 = currentMap.value.getTargetElement()) == null ? void 0 : _a2.removeEventListener("mousemove", updateMousePosition);
@@ -339838,7 +340054,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
339838
340054
  isMinZoom
339839
340055
  });
339840
340056
  return (_ctx, _cache) => {
339841
- var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i2, _j, _k, _l, _m, _n2, _o2, _p;
340057
+ var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i2, _j, _k, _l, _m, _n2, _o2, _p, _q, _r2;
339842
340058
  const _component_el_slider = resolveComponent("el-slider");
339843
340059
  return openBlock(), createElementBlock("div", {
339844
340060
  class: normalizeClass(["mapcontrols absolute z-1 pointer-events-none select-none animate-fade-in", positionClasses.value]),
@@ -340077,8 +340293,119 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
340077
340293
  _: 1
340078
340294
  }, 8, ["title"])) : createCommentVNode("", true)
340079
340295
  ])) : createCommentVNode("", true),
340080
- (((_m = _ctx.config.tools) == null ? void 0 : _m.clearAll) || _ctx.config.clearAll) && (hasOtherTools.value || ((_n2 = _ctx.config.tools) == null ? void 0 : _n2.zoom) || _ctx.config.zoom || ((_o2 = _ctx.config.tools) == null ? void 0 : _o2.rotate) || _ctx.config.rotate) ? (openBlock(), createElementBlock("div", _hoisted_6$a)) : createCommentVNode("", true),
340081
- ((_p = _ctx.config.tools) == null ? void 0 : _p.clearAll) || _ctx.config.clearAll ? (openBlock(), createElementBlock("div", _hoisted_7$9, [
340296
+ isDrawingEnabled.value && (hasOtherTools.value || ((_m = _ctx.config.tools) == null ? void 0 : _m.zoom) || _ctx.config.zoom || ((_n2 = _ctx.config.tools) == null ? void 0 : _n2.rotate) || _ctx.config.rotate) ? (openBlock(), createElementBlock("div", _hoisted_6$a)) : createCommentVNode("", true),
340297
+ isDrawingEnabled.value ? (openBlock(), createElementBlock("div", _hoisted_7$9, [
340298
+ createVNode$1(unref(ElPopover), {
340299
+ placement: popoverPlacement.value,
340300
+ trigger: drawingControlConfig.value.trigger === "hover" ? "hover" : "click",
340301
+ visible: isDrawingMenuOpen.value,
340302
+ "onUpdate:visible": _cache[2] || (_cache[2] = ($event) => isDrawingMenuOpen.value = $event),
340303
+ width: 180,
340304
+ "popper-class": "drawing-menu-popover",
340305
+ disabled: !isDrawingEnabled.value
340306
+ }, {
340307
+ reference: withCtx(() => [
340308
+ createVNode$1(unref(ElButton), {
340309
+ class: normalizeClass(["control-btn", { "is-active": isDrawingMenuOpen.value || isDrawingActive.value }]),
340310
+ title: "快捷绘制",
340311
+ size: "small",
340312
+ text: ""
340313
+ }, {
340314
+ default: withCtx(() => [
340315
+ createVNode$1(unref(ElIcon), null, {
340316
+ default: withCtx(() => [
340317
+ createVNode$1(unref(EditPen))
340318
+ ]),
340319
+ _: 1
340320
+ })
340321
+ ]),
340322
+ _: 1
340323
+ }, 8, ["class"])
340324
+ ]),
340325
+ default: withCtx(() => [
340326
+ createElementVNode("div", _hoisted_8$9, [
340327
+ _cache[5] || (_cache[5] = createElementVNode("div", { class: "drawing-menu-title" }, "快捷绘制", -1)),
340328
+ createElementVNode("div", _hoisted_9$9, [
340329
+ (openBlock(true), createElementBlock(Fragment, null, renderList(drawingControlConfig.value.tools, (tool) => {
340330
+ return openBlock(), createBlock(unref(ElTooltip), {
340331
+ key: tool,
340332
+ content: drawingToolLabels[tool],
340333
+ placement: "top",
340334
+ "show-after": 200
340335
+ }, {
340336
+ default: withCtx(() => [
340337
+ createVNode$1(unref(ElButton), {
340338
+ size: "small",
340339
+ text: "",
340340
+ class: normalizeClass(["drawing-tool-btn", { "is-active": activeDrawingMode.value === tool }]),
340341
+ onClick: ($event) => startQuickDrawing(tool)
340342
+ }, {
340343
+ default: withCtx(() => [
340344
+ tool === "point" ? (openBlock(), createBlock(unref(ElIcon), { key: 0 }, {
340345
+ default: withCtx(() => [
340346
+ createVNode$1(unref(Location))
340347
+ ]),
340348
+ _: 1
340349
+ })) : tool === "line" ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
340350
+ default: withCtx(() => [
340351
+ createVNode$1(unref(Minus))
340352
+ ]),
340353
+ _: 1
340354
+ })) : tool === "polygon" ? (openBlock(), createBlock(unref(ElIcon), { key: 2 }, {
340355
+ default: withCtx(() => [
340356
+ createVNode$1(unref(Share))
340357
+ ]),
340358
+ _: 1
340359
+ })) : tool === "circle" ? (openBlock(), createBlock(unref(ElIcon), { key: 3 }, {
340360
+ default: withCtx(() => [
340361
+ createVNode$1(unref(CircleCheck))
340362
+ ]),
340363
+ _: 1
340364
+ })) : tool === "rectangle" ? (openBlock(), createBlock(unref(ElIcon), { key: 4 }, {
340365
+ default: withCtx(() => [
340366
+ createVNode$1(unref(FullScreen))
340367
+ ]),
340368
+ _: 1
340369
+ })) : createCommentVNode("", true)
340370
+ ]),
340371
+ _: 2
340372
+ }, 1032, ["class", "onClick"])
340373
+ ]),
340374
+ _: 2
340375
+ }, 1032, ["content"]);
340376
+ }), 128))
340377
+ ]),
340378
+ drawingControlConfig.value.showContinuousToggle || isDrawingActive.value ? (openBlock(), createElementBlock("div", _hoisted_10$9)) : createCommentVNode("", true),
340379
+ drawingControlConfig.value.showContinuousToggle ? (openBlock(), createElementBlock("div", _hoisted_11$7, [
340380
+ createVNode$1(unref(ElCheckbox), {
340381
+ modelValue: continuousDrawing.value,
340382
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => continuousDrawing.value = $event)
340383
+ }, {
340384
+ default: withCtx(() => [..._cache[3] || (_cache[3] = [
340385
+ createTextVNode(" 是否连续绘制 ", -1)
340386
+ ])]),
340387
+ _: 1
340388
+ }, 8, ["modelValue"])
340389
+ ])) : createCommentVNode("", true),
340390
+ isDrawingActive.value ? (openBlock(), createBlock(unref(ElButton), {
340391
+ key: 2,
340392
+ size: "small",
340393
+ text: "",
340394
+ class: "drawing-stop-btn",
340395
+ onClick: stopQuickDrawing
340396
+ }, {
340397
+ default: withCtx(() => [..._cache[4] || (_cache[4] = [
340398
+ createTextVNode(" 停止绘制 ", -1)
340399
+ ])]),
340400
+ _: 1
340401
+ })) : createCommentVNode("", true)
340402
+ ])
340403
+ ]),
340404
+ _: 1
340405
+ }, 8, ["placement", "trigger", "visible", "disabled"])
340406
+ ])) : createCommentVNode("", true),
340407
+ (((_o2 = _ctx.config.tools) == null ? void 0 : _o2.clearAll) || _ctx.config.clearAll) && (hasOtherTools.value || isDrawingEnabled.value || ((_p = _ctx.config.tools) == null ? void 0 : _p.zoom) || _ctx.config.zoom || ((_q = _ctx.config.tools) == null ? void 0 : _q.rotate) || _ctx.config.rotate) ? (openBlock(), createElementBlock("div", _hoisted_12$5)) : createCommentVNode("", true),
340408
+ ((_r2 = _ctx.config.tools) == null ? void 0 : _r2.clearAll) || _ctx.config.clearAll ? (openBlock(), createElementBlock("div", _hoisted_13$5, [
340082
340409
  createVNode$1(unref(ElButton), {
340083
340410
  class: "control-btn",
340084
340411
  title: "清空绘制内容",
@@ -340102,7 +340429,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
340102
340429
  };
340103
340430
  }
340104
340431
  });
340105
- const OlControlPanel = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-fdbbb5b4"]]);
340432
+ const OlControlPanel = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-2ee216d4"]]);
340106
340433
  const _hoisted_1$i = {
340107
340434
  key: 0,
340108
340435
  class: "ol-legend-header"
@@ -352703,7 +353030,7 @@ function(t3) {
352703
353030
  */
352704
353031
  function(t3) {
352705
353032
  function e8() {
352706
- return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-320e524d.mjs")).catch(function(t4) {
353033
+ return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-571daed3.mjs")).catch(function(t4) {
352707
353034
  return Promise.reject(new Error("Could not load canvg: " + t4));
352708
353035
  }).then(function(t4) {
352709
353036
  return t4.default ? t4.default : t4;
@@ -365392,7 +365719,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
365392
365719
  popupConfig: {},
365393
365720
  enableGeolocation: { type: Boolean, default: true }
365394
365721
  },
365395
- emits: ["map-ready", "map-click", "map-dblclick", "map-contextmenu", "map-move", "zoom-change", "feature-click", "tooltip-show", "tooltip-hide", "layer-change", "measurement-change", "measurement-start", "measurement-end", "measurement-result", "context-menu", "bookmark-action", "marker-action", "tool-action", "search", "search-select", "search-clear", "popup-show", "popup-hide", "popup-close"],
365722
+ emits: ["map-ready", "map-click", "map-dblclick", "map-contextmenu", "map-move", "zoom-change", "feature-click", "tooltip-show", "tooltip-hide", "layer-change", "measurement-change", "measurement-start", "measurement-end", "measurement-result", "context-menu", "bookmark-action", "marker-action", "tool-action", "drawing-complete", "drawing-clear", "search", "search-select", "search-clear", "popup-show", "popup-hide", "popup-close"],
365396
365723
  setup(__props, { expose: __expose, emit: __emit }) {
365397
365724
  const currentLegends = ref([]);
365398
365725
  const currentLayers = ref([]);
@@ -366254,6 +366581,12 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
366254
366581
  break;
366255
366582
  }
366256
366583
  };
366584
+ const onDrawingComplete = (result) => {
366585
+ emit("drawing-complete", result);
366586
+ };
366587
+ const onDrawingClear = (event) => {
366588
+ emit("drawing-clear", event);
366589
+ };
366257
366590
  const onPrintAction = (data) => {
366258
366591
  console.log("打印操作:", data);
366259
366592
  switch (data.action) {
@@ -366940,7 +367273,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
366940
367273
  "right-offset": finalControlsConfig.value.rightOffset,
366941
367274
  "top-offset": finalControlsConfig.value.topOffset,
366942
367275
  "bottom-offset": finalControlsConfig.value.bottomOffset,
366943
- "view-bookmarks": props.viewBookmarks
367276
+ "view-bookmarks": props.viewBookmarks,
367277
+ onDrawingComplete,
367278
+ onDrawingClear
366944
367279
  }, {
366945
367280
  custom: withCtx(({ controls }) => [
366946
367281
  renderSlot(_ctx.$slots, "controls", {
@@ -367077,7 +367412,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
367077
367412
  };
367078
367413
  }
367079
367414
  });
367080
- const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-888f37cb"]]);
367415
+ const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-88e42f18"]]);
367081
367416
  const Property = {
367082
367417
  ACCURACY: "accuracy",
367083
367418
  ACCURACY_GEOMETRY: "accuracyGeometry",