vue-openlayers-plugin 1.0.95 → 1.0.96

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,5 +1,5 @@
1
1
  import { defineComponent, inject, computed, ref, watch, onMounted, onUnmounted, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, normalizeClass, toDisplayString } from "vue";
2
- import { l as layerEventBus, X, d as _export_sfc } from "./index-351de771.mjs";
2
+ import { l as layerEventBus, X, d as _export_sfc } from "./index-09c5c4d4.mjs";
3
3
  import "ol";
4
4
  const _hoisted_1 = { class: "basemap-content" };
5
5
  const _hoisted_2 = { class: "basemap-grid" };
@@ -1,5 +1,5 @@
1
- import { defineComponent, inject, computed, ref, reactive, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, createTextVNode, unref } from "vue";
2
- import { i as aim_default, T as TooltipHelper, d as _export_sfc } from "./index-351de771.mjs";
1
+ import { defineComponent, inject, computed, ref, reactive, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode } from "vue";
2
+ import { X, i as aim_default, T as TooltipHelper, d as _export_sfc } from "./index-09c5c4d4.mjs";
3
3
  import "ol";
4
4
  const _hoisted_1 = { class: "coordinate-content" };
5
5
  const _hoisted_2 = { class: "format-selection" };
@@ -167,8 +167,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
167
167
  const _component_InfoFilled = resolveComponent("InfoFilled");
168
168
  const _component_Pointer = resolveComponent("Pointer");
169
169
  const _component_el_button = resolveComponent("el-button");
170
- const _component_EPlusDialog = resolveComponent("EPlusDialog");
171
- return openBlock(), createBlock(_component_EPlusDialog, {
170
+ return openBlock(), createBlock(unref(X), {
172
171
  modelValue: dialogVisible.value,
173
172
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => dialogVisible.value = $event),
174
173
  title: "坐标拾取",
@@ -312,7 +311,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
312
311
  };
313
312
  }
314
313
  });
315
- const CoordinateLocationDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0c70c644"]]);
314
+ const CoordinateLocationDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2ba7b57a"]]);
316
315
  export {
317
316
  CoordinateLocationDialog as default
318
317
  };
@@ -1,4 +1,4 @@
1
- import { a6 as _sfc_main } from "./index-351de771.mjs";
1
+ import { a6 as _sfc_main } from "./index-09c5c4d4.mjs";
2
2
  import "vue";
3
3
  import "ol";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import { e as _sfc_main } from "./index-351de771.mjs";
1
+ import { h as _sfc_main } from "./index-09c5c4d4.mjs";
2
2
  import "vue";
3
3
  import "ol";
4
4
  export {
@@ -1,4 +1,4 @@
1
- import { h as _sfc_main } from "./index-351de771.mjs";
1
+ import { e as _sfc_main } from "./index-09c5c4d4.mjs";
2
2
  import "vue";
3
3
  import "ol";
4
4
  export {
@@ -1,9 +1,35 @@
1
1
  import { defineComponent, inject, computed, ref, watch, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList, normalizeClass } from "vue";
2
- import { X, f as formatMeasurementResult, g as getUnitByType, d as _export_sfc } from "./index-351de771.mjs";
2
+ import { X, f as formatMeasurementResult, g as getUnitByType, d as _export_sfc } from "./index-09c5c4d4.mjs";
3
3
  import "ol";
4
+ const encodeBase64 = (value) => {
5
+ const btoaFn = globalThis == null ? void 0 : globalThis.btoa;
6
+ if (typeof btoaFn === "function") {
7
+ try {
8
+ return btoaFn(unescape(encodeURIComponent(value)));
9
+ } catch {
10
+ try {
11
+ return btoaFn(value);
12
+ } catch {
13
+ return null;
14
+ }
15
+ }
16
+ }
17
+ const BufferCtor = globalThis == null ? void 0 : globalThis.Buffer;
18
+ if (BufferCtor == null ? void 0 : BufferCtor.from) {
19
+ try {
20
+ return BufferCtor.from(value, "utf-8").toString("base64");
21
+ } catch {
22
+ return null;
23
+ }
24
+ }
25
+ return null;
26
+ };
4
27
  const createSvgIcon = (content, viewBox = "0 0 24 24", fill = "currentColor", stroke = "none", strokeWidth = "0") => {
5
28
  const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBox}" width="24" height="24" fill="${fill}" stroke="${stroke}" stroke-width="${strokeWidth}" stroke-linecap="round" stroke-linejoin="round">${content}</svg>`;
6
- return `data:image/svg+xml;base64,${btoa(svg)}`;
29
+ const base64 = encodeBase64(svg);
30
+ if (base64)
31
+ return `data:image/svg+xml;base64,${base64}`;
32
+ return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg)}`;
7
33
  };
8
34
  const svgPaths = {
9
35
  // 空间距离 - 尺子图标
@@ -415,7 +441,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
415
441
  };
416
442
  }
417
443
  });
418
- const MeasurementDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-88b16326"]]);
444
+ const MeasurementDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8b594ab8"]]);
419
445
  export {
420
446
  MeasurementDialog as default
421
447
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent, inject, computed, ref, reactive, onUnmounted, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, withCtx, createElementVNode, unref, normalizeClass, createTextVNode, toDisplayString, renderList, createBlock, withModifiers, mergeProps } from "vue";
2
- import { j as plus_default, k as folder_opened_default, m as download_default, n as delete_default, s as search_default, o as location_filled_default, q as edit_default, M as MarkerDrawingAdapter, t as fromLonLat, u as toLonLat } from "./index-351de771.mjs";
3
- import { E as ElMessageBox } from "./index-6f05b5ce.mjs";
1
+ import { defineComponent, inject, computed, ref, reactive, onUnmounted, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, unref, withCtx, createElementVNode, normalizeClass, createTextVNode, toDisplayString, renderList, createBlock, withModifiers, mergeProps } from "vue";
2
+ import { X, j as plus_default, k as folder_opened_default, m as download_default, n as delete_default, s as search_default, o as location_filled_default, q as edit_default, M as MarkerDrawingAdapter, t as fromLonLat, u as toLonLat } from "./index-09c5c4d4.mjs";
3
+ import { E as ElMessageBox } from "./index-ab1630d8.mjs";
4
4
  import "ol";
5
5
  const _hoisted_1 = { class: "markers-content" };
6
6
  const _hoisted_2 = { class: "toolbar" };
@@ -379,11 +379,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
379
379
  const _component_el_icon = resolveComponent("el-icon");
380
380
  const _component_el_table_column = resolveComponent("el-table-column");
381
381
  const _component_el_table = resolveComponent("el-table");
382
- const _component_EPlusDialog = resolveComponent("EPlusDialog");
383
382
  const _component_el_form_item = resolveComponent("el-form-item");
384
383
  const _component_el_form = resolveComponent("el-form");
385
384
  return openBlock(), createElementBlock(Fragment, null, [
386
- createVNode(_component_EPlusDialog, {
385
+ createVNode(unref(X), {
387
386
  modelValue: dialogVisible.value,
388
387
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => dialogVisible.value = $event),
389
388
  title: "我的标记",
@@ -560,7 +559,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
560
559
  ]),
561
560
  _: 1
562
561
  }, 8, ["modelValue"]),
563
- createVNode(_component_EPlusDialog, mergeProps({
562
+ createVNode(unref(X), mergeProps({
564
563
  modelValue: showAddDialog.value,
565
564
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => showAddDialog.value = $event),
566
565
  title: "添加标记",
@@ -1,4 +1,6 @@
1
- import { defineComponent, computed, ref, reactive, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, normalizeClass } from "vue";
1
+ import { defineComponent, computed, ref, reactive, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, normalizeClass } from "vue";
2
+ import { X } from "./index-09c5c4d4.mjs";
3
+ import "ol";
2
4
  const _hoisted_1 = { class: "region-content" };
3
5
  const _hoisted_2 = {
4
6
  key: 0,
@@ -1110,8 +1112,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1110
1112
  const _component_el_button = resolveComponent("el-button");
1111
1113
  const _component_el_tab_pane = resolveComponent("el-tab-pane");
1112
1114
  const _component_el_tabs = resolveComponent("el-tabs");
1113
- const _component_EPlusDialog = resolveComponent("EPlusDialog");
1114
- return openBlock(), createBlock(_component_EPlusDialog, {
1115
+ return openBlock(), createBlock(unref(X), {
1115
1116
  modelValue: dialogVisible.value,
1116
1117
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialogVisible.value = $event),
1117
1118
  title: "地区导航",
@@ -1,6 +1,6 @@
1
- import { defineComponent, inject, computed, ref, reactive, resolveComponent, openBlock, createBlock, withCtx, createElementVNode, createVNode, createTextVNode, unref, createElementBlock, Fragment, renderList, withModifiers, toDisplayString, createCommentVNode } from "vue";
2
- import { j as plus_default, k as folder_opened_default, m as download_default, n as delete_default, s as search_default, v as camera_default, w as view_default, q as edit_default, x as location_default, z as zoom_in_default, u as toLonLat, t as fromLonLat, E as ElMessage, y as getUid } from "./index-351de771.mjs";
3
- import { E as ElMessageBox } from "./index-6f05b5ce.mjs";
1
+ import { defineComponent, inject, computed, ref, reactive, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, createElementBlock, Fragment, renderList, withModifiers, toDisplayString, createCommentVNode } from "vue";
2
+ import { X, j as plus_default, k as folder_opened_default, m as download_default, n as delete_default, s as search_default, v as camera_default, w as view_default, q as edit_default, x as location_default, z as zoom_in_default, u as toLonLat, t as fromLonLat, E as ElMessage, y as getUid } from "./index-09c5c4d4.mjs";
3
+ import { E as ElMessageBox } from "./index-ab1630d8.mjs";
4
4
  import "ol";
5
5
  const _hoisted_1 = { class: "bookmarks-content" };
6
6
  const _hoisted_2 = { class: "toolbar" };
@@ -436,8 +436,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
436
436
  const _component_el_form_item = resolveComponent("el-form-item");
437
437
  const _component_el_checkbox = resolveComponent("el-checkbox");
438
438
  const _component_el_form = resolveComponent("el-form");
439
- const _component_EPlusDialog = resolveComponent("EPlusDialog");
440
- return openBlock(), createBlock(_component_EPlusDialog, {
439
+ return openBlock(), createBlock(unref(X), {
441
440
  modelValue: dialogVisible.value,
442
441
  "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => dialogVisible.value = $event),
443
442
  title: "视角书签",
@@ -718,7 +717,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
718
717
  })
719
718
  ])) : createCommentVNode("", true)
720
719
  ]),
721
- createVNode(_component_EPlusDialog, {
720
+ createVNode(unref(X), {
722
721
  modelValue: showBookmarkForm.value,
723
722
  "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => showBookmarkForm.value = $event),
724
723
  title: editingIndex.value >= 0 ? "编辑书签" : "保存视角书签",
@@ -62145,6 +62145,14 @@ class MeasurementTool {
62145
62145
  this.loadMeasurements();
62146
62146
  this.initModify();
62147
62147
  }
62148
+ getGeodesicLength(geometry2) {
62149
+ const projectionCode = this.map.getView().getProjection().getCode();
62150
+ return getLength(geometry2, { projection: projectionCode });
62151
+ }
62152
+ getGeodesicArea(geometry2) {
62153
+ const projectionCode = this.map.getView().getProjection().getCode();
62154
+ return getArea$1(geometry2, { projection: projectionCode });
62155
+ }
62148
62156
  // 清除特定要素的测量结果标注
62149
62157
  clearFeatureTooltips(feature2) {
62150
62158
  const featureId2 = feature2.getId && feature2.getId() || feature2.ol_uid || feature2.get("id");
@@ -62205,7 +62213,7 @@ class MeasurementTool {
62205
62213
  let newResult = null;
62206
62214
  const newTooltips = [];
62207
62215
  if (measurementType === "distance" && geometry2 instanceof LineString$5) {
62208
- const length2 = getLength(geometry2);
62216
+ const length2 = this.getGeodesicLength(geometry2);
62209
62217
  const formatted = formatMeasurementResult(
62210
62218
  length2,
62211
62219
  "length",
@@ -62226,7 +62234,7 @@ class MeasurementTool {
62226
62234
  const coordinates2 = geometry2.getCoordinates();
62227
62235
  this.addNodeMarkers(coordinates2, feature2);
62228
62236
  } else if (measurementType === "area" && geometry2 instanceof Polygon$9) {
62229
- const area2 = getArea$1(geometry2);
62237
+ const area2 = this.getGeodesicArea(geometry2);
62230
62238
  const formatted = formatMeasurementResult(area2, "area", this.currentUnit);
62231
62239
  newResult = {
62232
62240
  id: measurementId,
@@ -62285,7 +62293,7 @@ class MeasurementTool {
62285
62293
  }
62286
62294
  // 更新面积标注
62287
62295
  updatePolygonTooltip(feature2, geometry2, tooltips) {
62288
- const area2 = getArea$1(geometry2);
62296
+ const area2 = this.getGeodesicArea(geometry2);
62289
62297
  const center2 = geometry2.getInteriorPoint().getCoordinates();
62290
62298
  const result = formatMeasurementResult(area2, "area", this.currentUnit);
62291
62299
  const areaText = `面积: ${result.formatted}`;
@@ -62817,7 +62825,7 @@ class MeasurementTool {
62817
62825
  let output;
62818
62826
  let helpText;
62819
62827
  if (geom instanceof Polygon$9) {
62820
- const area2 = getArea$1(geom);
62828
+ const area2 = this.getGeodesicArea(geom);
62821
62829
  output = this.formatArea(area2);
62822
62830
  tooltipCoord = geom.getInteriorPoint().getCoordinates();
62823
62831
  const coordinates2 = geom.getCoordinates()[0];
@@ -62868,7 +62876,7 @@ class MeasurementTool {
62868
62876
  unit: ""
62869
62877
  };
62870
62878
  if (geom instanceof Polygon$9) {
62871
- const area2 = getArea$1(geom);
62879
+ const area2 = this.getGeodesicArea(geom);
62872
62880
  const formattedResult = formatMeasurementResult(
62873
62881
  area2,
62874
62882
  "area",
@@ -62880,7 +62888,7 @@ class MeasurementTool {
62880
62888
  result.area = formattedResult.formatted;
62881
62889
  result.coordinates = geom.getCoordinates();
62882
62890
  } else if (geom instanceof LineString$5) {
62883
- const length2 = getLength(geom);
62891
+ const length2 = this.getGeodesicLength(geom);
62884
62892
  const formattedResult = formatMeasurementResult(
62885
62893
  length2,
62886
62894
  "length",
@@ -63018,7 +63026,7 @@ class MeasurementTool {
63018
63026
  });
63019
63027
  }
63020
63028
  formatLength(line2) {
63021
- const length2 = getLength(line2);
63029
+ const length2 = this.getGeodesicLength(line2);
63022
63030
  const result = formatMeasurementResult(length2, "length", this.currentUnit);
63023
63031
  return result.formatted;
63024
63032
  }
@@ -63084,7 +63092,7 @@ class MeasurementTool {
63084
63092
  if (i === 0) {
63085
63093
  text2 = "起点";
63086
63094
  } else {
63087
- const segmentDistance = getLength(
63095
+ const segmentDistance = this.getGeodesicLength(
63088
63096
  new LineString$5([coordinates2[i - 1], coord])
63089
63097
  );
63090
63098
  totalDistance += segmentDistance;
@@ -469419,16 +469427,16 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
469419
469427
  }
469420
469428
  });
469421
469429
  const defaultComponents = {
469422
- measurement: () => import("./MeasurementDialog-a3b58205.mjs"),
469423
- basemap: () => import("./BasemapPanel-b2f3c233.mjs"),
469424
- print: () => import("./MapPrintDialog-289cbd66.mjs"),
469425
- "layer-panel": () => import("./LayerPanel-a95b2745.mjs"),
469426
- coordinate: () => import("./CoordinateLocationDialog-2b78790d.mjs"),
469427
- "region-navigation": () => import("./RegionNavigationDialog-b0b6f86b.mjs"),
469428
- "my-markers": () => import("./MyMarkersDialog-4f5f6125.mjs"),
469429
- "view-bookmarks": () => import("./ViewBookmarksDialog-d7727543.mjs"),
469430
- "map-drawing": () => import("./index-86518558.mjs"),
469431
- "filter-panel": () => import("./FilterPanel-76134c1a.mjs")
469430
+ measurement: () => import("./MeasurementDialog-25b82c2f.mjs"),
469431
+ basemap: () => import("./BasemapPanel-da74ca3f.mjs"),
469432
+ print: () => import("./MapPrintDialog-74537e68.mjs"),
469433
+ "layer-panel": () => import("./LayerPanel-ec7ffab0.mjs"),
469434
+ coordinate: () => import("./CoordinateLocationDialog-360b1eb4.mjs"),
469435
+ "region-navigation": () => import("./RegionNavigationDialog-6c59ecf3.mjs"),
469436
+ "my-markers": () => import("./MyMarkersDialog-3dd0c4d4.mjs"),
469437
+ "view-bookmarks": () => import("./ViewBookmarksDialog-f45396f7.mjs"),
469438
+ "map-drawing": () => import("./index-bf4b15aa.mjs"),
469439
+ "filter-panel": () => import("./FilterPanel-20122101.mjs")
469432
469440
  };
469433
469441
  const _DialogRegistry = class _DialogRegistry {
469434
469442
  constructor() {
@@ -475653,8 +475661,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
475653
475661
  const _component_el_button_group = resolveComponent("el-button-group");
475654
475662
  const _component_el_card = resolveComponent("el-card");
475655
475663
  const _component_el_row = resolveComponent("el-row");
475656
- const _component_EPlusDialog = resolveComponent("EPlusDialog");
475657
- return openBlock(), createBlock(_component_EPlusDialog, {
475664
+ return openBlock(), createBlock(unref(X$1), {
475658
475665
  modelValue: dialogVisible.value,
475659
475666
  "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => dialogVisible.value = $event),
475660
475667
  title: "地图打印",
@@ -490104,7 +490111,7 @@ function(t3) {
490104
490111
  */
490105
490112
  function(t3) {
490106
490113
  function e8() {
490107
- return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-bd2c0792.mjs")).catch(function(t4) {
490114
+ return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-19eef7b1.mjs")).catch(function(t4) {
490108
490115
  return Promise.reject(new Error("Could not load canvg: " + t4));
490109
490116
  }).then(function(t4) {
490110
490117
  return t4.default ? t4.default : t4;
@@ -1,5 +1,5 @@
1
1
  import { nextTick, defineComponent, computed, ref, reactive, markRaw, watch, onMounted, onBeforeUnmount, toRefs, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createElementVNode, normalizeClass, normalizeStyle, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, toDisplayString, withKeys, renderSlot, vShow, createTextVNode, isVNode, render } from "vue";
2
- import { A as componentSizes, B as obtainAllFocusableElements, C as getEventCode, D as EVENT_CODE, F as ElButton, G as ElFocusTrap, H as ElInput, I as ElOverlay, J as ElIcon, K as TypeComponents, L as useGlobalComponentSettings, N as loading_default, O as TypeComponentsMap, P as useId, Q as useDraggable, S as isFunction, U as isString, V as useLockscreen, W as _export_sfc, Y as useSameTarget, Z as isClient, $ as hasOwn, a0 as isObject, a1 as isUndefined, a2 as isElement, a3 as debugWarn } from "./index-351de771.mjs";
2
+ import { A as componentSizes, B as obtainAllFocusableElements, C as getEventCode, D as EVENT_CODE, F as ElButton, G as ElFocusTrap, H as ElInput, I as ElOverlay, J as ElIcon, K as TypeComponents, L as useGlobalComponentSettings, N as loading_default, O as TypeComponentsMap, P as useId, Q as useDraggable, S as isFunction, U as isString, V as useLockscreen, W as _export_sfc, Y as useSameTarget, Z as isClient, $ as hasOwn, a0 as isObject, a1 as isUndefined, a2 as isElement, a3 as debugWarn } from "./index-09c5c4d4.mjs";
3
3
  const isValidComponentSize = (val) => ["", ...componentSizes].includes(val);
4
4
  const FOCUSABLE_CHILDREN = "_trap-focus-children";
5
5
  const FOCUS_STACK = [];
@@ -1,5 +1,5 @@
1
1
  import { inject, computed, ref, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, unref, createTextVNode, createCommentVNode, createBlock } from "vue";
2
- import { d as _export_sfc, a4 as DrawingManager, a5 as close_default } from "./index-351de771.mjs";
2
+ import { d as _export_sfc, a4 as DrawingManager, a5 as close_default, X } from "./index-09c5c4d4.mjs";
3
3
  import "ol";
4
4
  const icons = {
5
5
  pointMarker: "/icons/point.png",
@@ -736,8 +736,7 @@ const _sfc_main = {
736
736
  const _component_el_tooltip = resolveComponent("el-tooltip");
737
737
  const _component_el_tab_pane = resolveComponent("el-tab-pane");
738
738
  const _component_el_tabs = resolveComponent("el-tabs");
739
- const _component_EPlusDialog = resolveComponent("EPlusDialog");
740
- return openBlock(), createBlock(_component_EPlusDialog, {
739
+ return openBlock(), createBlock(unref(X), {
741
740
  modelValue: visible.value,
742
741
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => visible.value = $event),
743
742
  title: "图上标绘",
@@ -830,7 +829,7 @@ const _sfc_main = {
830
829
  };
831
830
  }
832
831
  };
833
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-57937348"]]);
832
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5fdba4df"]]);
834
833
  export {
835
834
  index as default
836
835
  };
@@ -1,4 +1,4 @@
1
- import { c as commonjsGlobal, R as RGBColor, r as requestAnimationFrame, _ as _asyncToGenerator, a as _, p as processCanvasRGBA, b as _defineProperty } from "./index-351de771.mjs";
1
+ import { c as commonjsGlobal, R as RGBColor, r as requestAnimationFrame, _ as _asyncToGenerator, a as _, p as processCanvasRGBA, b as _defineProperty } from "./index-09c5c4d4.mjs";
2
2
  import "vue";
3
3
  import "ol";
4
4
  var check = function(it) {
package/lib/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aB, ap, af, a7, as, a4, aY, ax, aA, b1, b0, aI, aJ, aU, aV, am, aK, aL, a$, aZ, ao, an, aW, aX, aS, aT, aQ, aR, aO, aP, ae, aa, a9, ad, a7 as a72, a8, ab, ac, aC, aD, aG, aH, aM, aN, b2, ag, aE, aF, ak, az, aq, at, aw, ai, f, al, ay, au, g, ar, a_, ah, av, l, aj } from "./index-351de771.mjs";
1
+ import { aB, ap, af, a7, as, a4, aY, ax, aA, b1, b0, aI, aJ, aU, aV, am, aK, aL, a$, aZ, ao, an, aW, aX, aS, aT, aQ, aR, aO, aP, ae, aa, a9, ad, a7 as a72, a8, ab, ac, aC, aD, aG, aH, aM, aN, b2, ag, aE, aF, ak, az, aq, at, aw, ai, f, al, ay, au, g, ar, a_, ah, av, l, aj } from "./index-09c5c4d4.mjs";
2
2
  import "vue";
3
3
  import "ol";
4
4
  export {
package/lib/index.umd.js CHANGED
@@ -62664,6 +62664,14 @@ ${this.attributes_.map(
62664
62664
  this.loadMeasurements();
62665
62665
  this.initModify();
62666
62666
  }
62667
+ getGeodesicLength(geometry2) {
62668
+ const projectionCode = this.map.getView().getProjection().getCode();
62669
+ return getLength(geometry2, { projection: projectionCode });
62670
+ }
62671
+ getGeodesicArea(geometry2) {
62672
+ const projectionCode = this.map.getView().getProjection().getCode();
62673
+ return getArea$1(geometry2, { projection: projectionCode });
62674
+ }
62667
62675
  // 清除特定要素的测量结果标注
62668
62676
  clearFeatureTooltips(feature2) {
62669
62677
  const featureId2 = feature2.getId && feature2.getId() || feature2.ol_uid || feature2.get("id");
@@ -62724,7 +62732,7 @@ ${this.attributes_.map(
62724
62732
  let newResult = null;
62725
62733
  const newTooltips = [];
62726
62734
  if (measurementType === "distance" && geometry2 instanceof LineString$5) {
62727
- const length2 = getLength(geometry2);
62735
+ const length2 = this.getGeodesicLength(geometry2);
62728
62736
  const formatted = formatMeasurementResult(
62729
62737
  length2,
62730
62738
  "length",
@@ -62745,7 +62753,7 @@ ${this.attributes_.map(
62745
62753
  const coordinates2 = geometry2.getCoordinates();
62746
62754
  this.addNodeMarkers(coordinates2, feature2);
62747
62755
  } else if (measurementType === "area" && geometry2 instanceof Polygon$9) {
62748
- const area2 = getArea$1(geometry2);
62756
+ const area2 = this.getGeodesicArea(geometry2);
62749
62757
  const formatted = formatMeasurementResult(area2, "area", this.currentUnit);
62750
62758
  newResult = {
62751
62759
  id: measurementId,
@@ -62804,7 +62812,7 @@ ${this.attributes_.map(
62804
62812
  }
62805
62813
  // 更新面积标注
62806
62814
  updatePolygonTooltip(feature2, geometry2, tooltips) {
62807
- const area2 = getArea$1(geometry2);
62815
+ const area2 = this.getGeodesicArea(geometry2);
62808
62816
  const center2 = geometry2.getInteriorPoint().getCoordinates();
62809
62817
  const result = formatMeasurementResult(area2, "area", this.currentUnit);
62810
62818
  const areaText = `面积: ${result.formatted}`;
@@ -63336,7 +63344,7 @@ ${this.attributes_.map(
63336
63344
  let output;
63337
63345
  let helpText;
63338
63346
  if (geom instanceof Polygon$9) {
63339
- const area2 = getArea$1(geom);
63347
+ const area2 = this.getGeodesicArea(geom);
63340
63348
  output = this.formatArea(area2);
63341
63349
  tooltipCoord = geom.getInteriorPoint().getCoordinates();
63342
63350
  const coordinates2 = geom.getCoordinates()[0];
@@ -63387,7 +63395,7 @@ ${this.attributes_.map(
63387
63395
  unit: ""
63388
63396
  };
63389
63397
  if (geom instanceof Polygon$9) {
63390
- const area2 = getArea$1(geom);
63398
+ const area2 = this.getGeodesicArea(geom);
63391
63399
  const formattedResult = formatMeasurementResult(
63392
63400
  area2,
63393
63401
  "area",
@@ -63399,7 +63407,7 @@ ${this.attributes_.map(
63399
63407
  result.area = formattedResult.formatted;
63400
63408
  result.coordinates = geom.getCoordinates();
63401
63409
  } else if (geom instanceof LineString$5) {
63402
- const length2 = getLength(geom);
63410
+ const length2 = this.getGeodesicLength(geom);
63403
63411
  const formattedResult = formatMeasurementResult(
63404
63412
  length2,
63405
63413
  "length",
@@ -63537,7 +63545,7 @@ ${this.attributes_.map(
63537
63545
  });
63538
63546
  }
63539
63547
  formatLength(line2) {
63540
- const length2 = getLength(line2);
63548
+ const length2 = this.getGeodesicLength(line2);
63541
63549
  const result = formatMeasurementResult(length2, "length", this.currentUnit);
63542
63550
  return result.formatted;
63543
63551
  }
@@ -63603,7 +63611,7 @@ ${this.attributes_.map(
63603
63611
  if (i2 === 0) {
63604
63612
  text2 = "起点";
63605
63613
  } else {
63606
- const segmentDistance = getLength(
63614
+ const segmentDistance = this.getGeodesicLength(
63607
63615
  new LineString$5([coordinates2[i2 - 1], coord])
63608
63616
  );
63609
63617
  totalDistance += segmentDistance;
@@ -145281,7 +145289,7 @@ ${publicKeyStr}
145281
145289
  }
145282
145290
  return res.join(" ");
145283
145291
  }
145284
- var encodeBase64 = function() {
145292
+ var encodeBase64$1 = function() {
145285
145293
  if (env$1.hasGlobalWindow && isFunction$4(window.btoa)) {
145286
145294
  return function(str2) {
145287
145295
  return window.btoa(unescape(encodeURIComponent(str2)));
@@ -171798,7 +171806,7 @@ ${publicKeyStr}
171798
171806
  var str2 = this.renderToString();
171799
171807
  var prefix = "data:image/svg+xml;";
171800
171808
  if (base642) {
171801
- str2 = encodeBase64(str2);
171809
+ str2 = encodeBase64$1(str2);
171802
171810
  return str2 && prefix + "base64," + str2;
171803
171811
  }
171804
171812
  return prefix + "charset=UTF-8," + encodeURIComponent(str2);
@@ -477197,8 +477205,7 @@ ${this.attributes_.map(
477197
477205
  const _component_el_button_group = vue.resolveComponent("el-button-group");
477198
477206
  const _component_el_card = vue.resolveComponent("el-card");
477199
477207
  const _component_el_row = vue.resolveComponent("el-row");
477200
- const _component_EPlusDialog = vue.resolveComponent("EPlusDialog");
477201
- return vue.openBlock(), vue.createBlock(_component_EPlusDialog, {
477208
+ return vue.openBlock(), vue.createBlock(vue.unref(X$1), {
477202
477209
  modelValue: dialogVisible.value,
477203
477210
  "onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => dialogVisible.value = $event),
477204
477211
  title: "地图打印",
@@ -501347,9 +501354,35 @@ ${this.attributes_.map(
501347
501354
  __proto__: null,
501348
501355
  default: gifler$1
501349
501356
  }, [gifler$1]);
501357
+ const encodeBase64 = (value) => {
501358
+ const btoaFn = globalThis == null ? void 0 : globalThis.btoa;
501359
+ if (typeof btoaFn === "function") {
501360
+ try {
501361
+ return btoaFn(unescape(encodeURIComponent(value)));
501362
+ } catch {
501363
+ try {
501364
+ return btoaFn(value);
501365
+ } catch {
501366
+ return null;
501367
+ }
501368
+ }
501369
+ }
501370
+ const BufferCtor = globalThis == null ? void 0 : globalThis.Buffer;
501371
+ if (BufferCtor == null ? void 0 : BufferCtor.from) {
501372
+ try {
501373
+ return BufferCtor.from(value, "utf-8").toString("base64");
501374
+ } catch {
501375
+ return null;
501376
+ }
501377
+ }
501378
+ return null;
501379
+ };
501350
501380
  const createSvgIcon = (content2, viewBox = "0 0 24 24", fill2 = "currentColor", stroke = "none", strokeWidth = "0") => {
501351
501381
  const svg2 = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${viewBox}" width="24" height="24" fill="${fill2}" stroke="${stroke}" stroke-width="${strokeWidth}" stroke-linecap="round" stroke-linejoin="round">${content2}</svg>`;
501352
- return `data:image/svg+xml;base64,${btoa(svg2)}`;
501382
+ const base642 = encodeBase64(svg2);
501383
+ if (base642)
501384
+ return `data:image/svg+xml;base64,${base642}`;
501385
+ return `data:image/svg+xml;charset=utf-8,${encodeURIComponent(svg2)}`;
501353
501386
  };
501354
501387
  const svgPaths = {
501355
501388
  // 空间距离 - 尺子图标
@@ -501761,8 +501794,8 @@ ${this.attributes_.map(
501761
501794
  };
501762
501795
  }
501763
501796
  });
501764
- const MeasurementDialog_vue_vue_type_style_index_0_scoped_88b16326_lang = "";
501765
- const MeasurementDialog = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-88b16326"]]);
501797
+ const MeasurementDialog_vue_vue_type_style_index_0_scoped_8b594ab8_lang = "";
501798
+ const MeasurementDialog = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-8b594ab8"]]);
501766
501799
  const MeasurementDialog$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
501767
501800
  __proto__: null,
501768
501801
  default: MeasurementDialog
@@ -502259,8 +502292,7 @@ ${this.attributes_.map(
502259
502292
  const _component_InfoFilled = vue.resolveComponent("InfoFilled");
502260
502293
  const _component_Pointer = vue.resolveComponent("Pointer");
502261
502294
  const _component_el_button = vue.resolveComponent("el-button");
502262
- const _component_EPlusDialog = vue.resolveComponent("EPlusDialog");
502263
- return vue.openBlock(), vue.createBlock(_component_EPlusDialog, {
502295
+ return vue.openBlock(), vue.createBlock(vue.unref(X$1), {
502264
502296
  modelValue: dialogVisible.value,
502265
502297
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => dialogVisible.value = $event),
502266
502298
  title: "坐标拾取",
@@ -502404,8 +502436,8 @@ ${this.attributes_.map(
502404
502436
  };
502405
502437
  }
502406
502438
  });
502407
- const CoordinateLocationDialog_vue_vue_type_style_index_0_scoped_0c70c644_lang = "";
502408
- const CoordinateLocationDialog = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-0c70c644"]]);
502439
+ const CoordinateLocationDialog_vue_vue_type_style_index_0_scoped_2ba7b57a_lang = "";
502440
+ const CoordinateLocationDialog = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-2ba7b57a"]]);
502409
502441
  const CoordinateLocationDialog$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
502410
502442
  __proto__: null,
502411
502443
  default: CoordinateLocationDialog
@@ -503521,8 +503553,7 @@ ${this.attributes_.map(
503521
503553
  const _component_el_button = vue.resolveComponent("el-button");
503522
503554
  const _component_el_tab_pane = vue.resolveComponent("el-tab-pane");
503523
503555
  const _component_el_tabs = vue.resolveComponent("el-tabs");
503524
- const _component_EPlusDialog = vue.resolveComponent("EPlusDialog");
503525
- return vue.openBlock(), vue.createBlock(_component_EPlusDialog, {
503556
+ return vue.openBlock(), vue.createBlock(vue.unref(X$1), {
503526
503557
  modelValue: dialogVisible.value,
503527
503558
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => dialogVisible.value = $event),
503528
503559
  title: "地区导航",
@@ -504112,11 +504143,10 @@ ${this.attributes_.map(
504112
504143
  const _component_el_icon = vue.resolveComponent("el-icon");
504113
504144
  const _component_el_table_column = vue.resolveComponent("el-table-column");
504114
504145
  const _component_el_table = vue.resolveComponent("el-table");
504115
- const _component_EPlusDialog = vue.resolveComponent("EPlusDialog");
504116
504146
  const _component_el_form_item = vue.resolveComponent("el-form-item");
504117
504147
  const _component_el_form = vue.resolveComponent("el-form");
504118
504148
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
504119
- vue.createVNode(_component_EPlusDialog, {
504149
+ vue.createVNode(vue.unref(X$1), {
504120
504150
  modelValue: dialogVisible.value,
504121
504151
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => dialogVisible.value = $event),
504122
504152
  title: "我的标记",
@@ -504293,7 +504323,7 @@ ${this.attributes_.map(
504293
504323
  ]),
504294
504324
  _: 1
504295
504325
  }, 8, ["modelValue"]),
504296
- vue.createVNode(_component_EPlusDialog, vue.mergeProps({
504326
+ vue.createVNode(vue.unref(X$1), vue.mergeProps({
504297
504327
  modelValue: showAddDialog.value,
504298
504328
  "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => showAddDialog.value = $event),
504299
504329
  title: "添加标记",
@@ -504827,8 +504857,7 @@ ${this.attributes_.map(
504827
504857
  const _component_el_form_item = vue.resolveComponent("el-form-item");
504828
504858
  const _component_el_checkbox = vue.resolveComponent("el-checkbox");
504829
504859
  const _component_el_form = vue.resolveComponent("el-form");
504830
- const _component_EPlusDialog = vue.resolveComponent("EPlusDialog");
504831
- return vue.openBlock(), vue.createBlock(_component_EPlusDialog, {
504860
+ return vue.openBlock(), vue.createBlock(vue.unref(X$1), {
504832
504861
  modelValue: dialogVisible.value,
504833
504862
  "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => dialogVisible.value = $event),
504834
504863
  title: "视角书签",
@@ -505109,7 +505138,7 @@ ${this.attributes_.map(
505109
505138
  })
505110
505139
  ])) : vue.createCommentVNode("", true)
505111
505140
  ]),
505112
- vue.createVNode(_component_EPlusDialog, {
505141
+ vue.createVNode(vue.unref(X$1), {
505113
505142
  modelValue: showBookmarkForm.value,
505114
505143
  "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => showBookmarkForm.value = $event),
505115
505144
  title: editingIndex.value >= 0 ? "编辑书签" : "保存视角书签",
@@ -505957,7 +505986,7 @@ ${this.attributes_.map(
505957
505986
  }
505958
505987
  };
505959
505988
  const ListTab = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-7222689f"]]);
505960
- const index_vue_vue_type_style_index_0_scoped_57937348_lang = "";
505989
+ const index_vue_vue_type_style_index_0_scoped_5fdba4df_lang = "";
505961
505990
  const _hoisted_1 = { class: "dialog-content" };
505962
505991
  const _hoisted_2 = { class: "toolbar" };
505963
505992
  const _hoisted_3 = { class: "toolbar-left" };
@@ -506012,8 +506041,7 @@ ${this.attributes_.map(
506012
506041
  const _component_el_tooltip = vue.resolveComponent("el-tooltip");
506013
506042
  const _component_el_tab_pane = vue.resolveComponent("el-tab-pane");
506014
506043
  const _component_el_tabs = vue.resolveComponent("el-tabs");
506015
- const _component_EPlusDialog = vue.resolveComponent("EPlusDialog");
506016
- return vue.openBlock(), vue.createBlock(_component_EPlusDialog, {
506044
+ return vue.openBlock(), vue.createBlock(vue.unref(X$1), {
506017
506045
  modelValue: visible.value,
506018
506046
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => visible.value = $event),
506019
506047
  title: "图上标绘",
@@ -506106,7 +506134,7 @@ ${this.attributes_.map(
506106
506134
  };
506107
506135
  }
506108
506136
  };
506109
- const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-57937348"]]);
506137
+ const index$1 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5fdba4df"]]);
506110
506138
  const index$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
506111
506139
  __proto__: null,
506112
506140
  default: index$1