vue-openlayers-plugin 1.0.98 → 1.1.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 (26) hide show
  1. package/lib/{BasemapPanel-6030a4a6.mjs → BasemapPanel-93acd292.mjs} +2 -2
  2. package/lib/{CoordinateLocationDialog-ad411c69.mjs → CoordinateLocationDialog-d7da1dee.mjs} +2 -2
  3. package/lib/{MapPrintDialog-ded74095.mjs → FilterPanel-966e0fc5.mjs} +2 -2
  4. package/lib/{FilterPanel-a23dccbb.mjs → LayerPanel-c9e3687b.mjs} +2 -2
  5. package/lib/{LayerPanel-457b2eda.mjs → MapPrintDialog-b84a005c.mjs} +2 -2
  6. package/lib/{MeasurementDialog-e682de16.mjs → MeasurementDialog-09489e89.mjs} +2 -2
  7. package/lib/{MyMarkersDialog-75707eb5.mjs → MyMarkersDialog-5eb2be16.mjs} +1 -1
  8. package/lib/{RegionNavigationDialog-e3e5b418.mjs → RegionNavigationDialog-fd27dd77.mjs} +2 -2
  9. package/lib/{ViewBookmarksDialog-f7c42678.mjs → ViewBookmarksDialog-5d544c1e.mjs} +1 -1
  10. package/lib/{index-6f52fd83.mjs → index-73f9be38.mjs} +2 -2
  11. package/lib/{index-da052bda.mjs → index-f331a9c2.mjs} +110 -26
  12. package/lib/{index.es-d8a69c3e.mjs → index.es-6e8fed8c.mjs} +2 -2
  13. package/lib/index.esm.js +2 -2
  14. package/lib/index.umd.js +104 -20
  15. package/lib/style.css +52 -52
  16. package/package.json +1 -1
  17. package/types/components/OlControlPanel.vue.d.ts.map +1 -1
  18. package/types/components/OlMapContainer.vue.d.ts +4 -0
  19. package/types/components/OlMapContainer.vue.d.ts.map +1 -1
  20. package/types/core/MapManager.d.ts +8 -0
  21. package/types/core/MapManager.d.ts.map +1 -1
  22. package/types/core/layers/TileSuperMapRestHandler.d.ts +0 -1
  23. package/types/core/layers/TileSuperMapRestHandler.d.ts.map +1 -1
  24. package/types/tsconfig.tsbuildinfo +1 -0
  25. package/types/types/map.d.ts +2 -0
  26. package/types/types/map.d.ts.map +1 -1
@@ -1,9 +1,9 @@
1
1
  import { defineComponent, inject, computed, ref, watch, onMounted, onUnmounted, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, normalizeClass, toDisplayString } from "vue";
2
- import { r as resolveBasemapThumbnail, l as layerEventBus, X, d as _export_sfc } from "./index-da052bda.mjs";
2
+ import { r as resolveBasemapThumbnail, l as layerEventBus, X, d as _export_sfc } from "./index-f331a9c2.mjs";
3
3
  import "@element-plus/icons-vue";
4
4
  import "ol";
5
- import "proj4";
6
5
  import "element-plus";
6
+ import "proj4";
7
7
  import "@supermapgis/iclient-ol";
8
8
  const _hoisted_1 = { class: "basemap-content" };
9
9
  const _hoisted_2 = { class: "basemap-grid" };
@@ -1,9 +1,9 @@
1
1
  import { defineComponent, inject, computed, ref, reactive, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode } from "vue";
2
2
  import { Aim } from "@element-plus/icons-vue";
3
- import { X, T as TooltipHelper, d as _export_sfc } from "./index-da052bda.mjs";
3
+ import { X, T as TooltipHelper, d as _export_sfc } from "./index-f331a9c2.mjs";
4
4
  import "ol";
5
- import "proj4";
6
5
  import "element-plus";
6
+ import "proj4";
7
7
  import "@supermapgis/iclient-ol";
8
8
  const _hoisted_1 = { class: "coordinate-content" };
9
9
  const _hoisted_2 = { class: "format-selection" };
@@ -1,9 +1,9 @@
1
- import { e as _sfc_main } from "./index-da052bda.mjs";
1
+ import { k as _sfc_main } from "./index-f331a9c2.mjs";
2
2
  import "vue";
3
3
  import "@element-plus/icons-vue";
4
4
  import "ol";
5
- import "proj4";
6
5
  import "element-plus";
6
+ import "proj4";
7
7
  import "@supermapgis/iclient-ol";
8
8
  export {
9
9
  _sfc_main as default
@@ -1,9 +1,9 @@
1
- import { k as _sfc_main } from "./index-da052bda.mjs";
1
+ import { h as _sfc_main } from "./index-f331a9c2.mjs";
2
2
  import "vue";
3
3
  import "@element-plus/icons-vue";
4
4
  import "ol";
5
- import "proj4";
6
5
  import "element-plus";
6
+ import "proj4";
7
7
  import "@supermapgis/iclient-ol";
8
8
  export {
9
9
  _sfc_main as default
@@ -1,9 +1,9 @@
1
- import { h as _sfc_main } from "./index-da052bda.mjs";
1
+ import { e as _sfc_main } from "./index-f331a9c2.mjs";
2
2
  import "vue";
3
3
  import "@element-plus/icons-vue";
4
4
  import "ol";
5
- import "proj4";
6
5
  import "element-plus";
6
+ import "proj4";
7
7
  import "@supermapgis/iclient-ol";
8
8
  export {
9
9
  _sfc_main as default
@@ -1,9 +1,9 @@
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, b as getUnitByType, d as _export_sfc } from "./index-da052bda.mjs";
2
+ import { X, f as formatMeasurementResult, b as getUnitByType, d as _export_sfc } from "./index-f331a9c2.mjs";
3
3
  import "@element-plus/icons-vue";
4
4
  import "ol";
5
- import "proj4";
6
5
  import "element-plus";
6
+ import "proj4";
7
7
  import "@supermapgis/iclient-ol";
8
8
  const encodeBase64 = (value) => {
9
9
  const btoaFn = globalThis == null ? void 0 : globalThis.btoa;
@@ -1,7 +1,7 @@
1
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
2
  import { Plus, FolderOpened, Download, Delete, Search, LocationFilled, Edit } from "@element-plus/icons-vue";
3
3
  import { ElMessageBox } from "element-plus";
4
- import { X, M as MarkerDrawingAdapter, i as fromLonLat, t as toLonLat } from "./index-da052bda.mjs";
4
+ import { X, M as MarkerDrawingAdapter, i as fromLonLat, t as toLonLat } from "./index-f331a9c2.mjs";
5
5
  import "ol";
6
6
  import "proj4";
7
7
  import "@supermapgis/iclient-ol";
@@ -1,9 +1,9 @@
1
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-da052bda.mjs";
2
+ import { X } from "./index-f331a9c2.mjs";
3
3
  import "@element-plus/icons-vue";
4
4
  import "ol";
5
- import "proj4";
6
5
  import "element-plus";
6
+ import "proj4";
7
7
  import "@supermapgis/iclient-ol";
8
8
  const _hoisted_1 = { class: "region-content" };
9
9
  const _hoisted_2 = {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, inject, computed, ref, reactive, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, createElementBlock, Fragment, renderList, withModifiers, toDisplayString, createCommentVNode } from "vue";
2
2
  import { Plus, FolderOpened, Download, Delete, Search, Camera, View, Edit, Location, ZoomIn } from "@element-plus/icons-vue";
3
3
  import { ElMessage, ElMessageBox } from "element-plus";
4
- import { X, t as toLonLat, i as fromLonLat, j as getUid } from "./index-da052bda.mjs";
4
+ import { X, t as toLonLat, i as fromLonLat, j as getUid } from "./index-f331a9c2.mjs";
5
5
  import "ol";
6
6
  import "proj4";
7
7
  import "@supermapgis/iclient-ol";
@@ -1,9 +1,9 @@
1
1
  import { inject, computed, ref, onMounted, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, Fragment, renderList, createElementVNode, normalizeClass, toDisplayString, unref, createTextVNode, createCommentVNode, createBlock } from "vue";
2
2
  import { Close } from "@element-plus/icons-vue";
3
- import { d as _export_sfc, D as DrawingManager, X } from "./index-da052bda.mjs";
3
+ import { d as _export_sfc, D as DrawingManager, X } from "./index-f331a9c2.mjs";
4
4
  import "ol";
5
- import "proj4";
6
5
  import "element-plus";
6
+ import "proj4";
7
7
  import "@supermapgis/iclient-ol";
8
8
  const icons = {
9
9
  pointMarker: "/icons/point.png",
@@ -7,8 +7,8 @@ var __publicField = (obj, key, value) => {
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
8
  import { MapLocation, Grid as Grid$6, Tools, Location, Guide, Flag, View as View$4, Printer, EditPen, Delete, Switch, Search, Loading, Clock, InfoFilled, Plus, Minus, RefreshLeft, RefreshRight, Right, FullScreen, Aim, Expand, FolderOpened, DataBoard, Setting, Download, Refresh, ZoomIn, ZoomOut, Document as Document$1, Position, DocumentCopy, Close } from "@element-plus/icons-vue";
9
9
  import { Feature as Feature$3, Map as Map$4 } from "ol";
10
- import proj4 from "proj4";
11
10
  import { ElMessage, ElButton, ElInput, ElIcon, ElDialog } from "element-plus";
11
+ import proj4 from "proj4";
12
12
  import { TileSuperMapRest, Util as Util$3, GetFeaturesByGeometryParameters as GetFeaturesByGeometryParameters$1, FeatureService } from "@supermapgis/iclient-ol";
13
13
  function _mergeNamespaces(n2, m2) {
14
14
  for (var i = 0; i < m2.length; i++) {
@@ -331137,7 +331137,7 @@ class TileSuperMapRestHandler extends BaseLayer2 {
331137
331137
  spatialQueryMode: "INTERSECT"
331138
331138
  });
331139
331139
  return new Promise((resolve, reject) => {
331140
- new FeatureService(serviceUrl).getFeaturesByBuffer(
331140
+ new FeatureService(finalServiceUrl).getFeaturesByBuffer(
331141
331141
  bufferParams,
331142
331142
  (serviceResult) => {
331143
331143
  var _a2, _b2;
@@ -331201,10 +331201,6 @@ class TileSuperMapRestHandler extends BaseLayer2 {
331201
331201
  const workspaceName = mapServiceMatch[1];
331202
331202
  return `${baseUrl.split("/services")[0]}/services/data-${workspaceName}/rest`;
331203
331203
  }
331204
- // ✅ 获取默认数据集(示例)
331205
- getDefaultDatasets() {
331206
- return ["football_field@hmsmap"];
331207
- }
331208
331204
  /**
331209
331205
  * 通过边界范围查询要素
331210
331206
  * @param bounds 边界范围 [minX, minY, maxX, maxY]
@@ -335760,6 +335756,70 @@ class MapManager {
335760
335756
  );
335761
335757
  });
335762
335758
  }
335759
+ /**
335760
+ * 定位到用户当前位置
335761
+ * @param options 定位配置
335762
+ */
335763
+ locateToUser(options = {}) {
335764
+ if (!this.map) {
335765
+ console.warn("locateToUser: 地图未初始化");
335766
+ ElMessage.warning("地图未初始化,无法定位");
335767
+ return;
335768
+ }
335769
+ if (!navigator.geolocation) {
335770
+ console.warn("浏览器不支持地理定位");
335771
+ ElMessage.warning("您的浏览器不支持地理定位功能");
335772
+ return;
335773
+ }
335774
+ console.log("开始获取用户位置...");
335775
+ ElMessage.info("正在获取位置信息,请稍候...");
335776
+ const successCallback = (position2) => {
335777
+ if (!this.map)
335778
+ return;
335779
+ const { longitude, latitude } = position2.coords;
335780
+ console.log("获取到用户位置:", longitude, latitude);
335781
+ const center2 = [longitude, latitude];
335782
+ const view = this.map.getView();
335783
+ const mapProjection = view.getProjection().getCode();
335784
+ console.log("地图投影:", mapProjection);
335785
+ const transformedCenter = fromLonLat(center2, mapProjection);
335786
+ console.log("转换后的坐标:", transformedCenter);
335787
+ if (!transformedCenter || isNaN(transformedCenter[0]) || isNaN(transformedCenter[1])) {
335788
+ console.error("无效的转换坐标:", transformedCenter);
335789
+ ElMessage.error("坐标转换失败");
335790
+ return;
335791
+ }
335792
+ view.setCenter(transformedCenter);
335793
+ view.setZoom(options.zoom ?? 15);
335794
+ ElMessage.success("定位成功");
335795
+ };
335796
+ const errorCallback = (error2) => {
335797
+ console.warn("获取用户位置失败:", error2.message, error2.code);
335798
+ let errorMsg = "获取位置失败";
335799
+ switch (error2.code) {
335800
+ case error2.PERMISSION_DENIED:
335801
+ errorMsg = "定位请求被拒绝,请检查浏览器权限设置";
335802
+ break;
335803
+ case error2.POSITION_UNAVAILABLE:
335804
+ errorMsg = "位置信息不可用";
335805
+ break;
335806
+ case error2.TIMEOUT:
335807
+ errorMsg = "获取位置超时,请重试";
335808
+ break;
335809
+ }
335810
+ ElMessage.error(errorMsg);
335811
+ };
335812
+ navigator.geolocation.getCurrentPosition(
335813
+ successCallback,
335814
+ errorCallback,
335815
+ {
335816
+ enableHighAccuracy: options.enableHighAccuracy ?? true,
335817
+ timeout: 1e4,
335818
+ // 增加超时时间到 10秒
335819
+ maximumAge: 0
335820
+ }
335821
+ );
335822
+ }
335763
335823
  /**
335764
335824
  * 更新地图配置
335765
335825
  */
@@ -336478,16 +336538,16 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
336478
336538
  }
336479
336539
  });
336480
336540
  const defaultComponents = {
336481
- measurement: () => import("./MeasurementDialog-e682de16.mjs"),
336482
- basemap: () => import("./BasemapPanel-6030a4a6.mjs"),
336483
- print: () => import("./MapPrintDialog-ded74095.mjs"),
336484
- "layer-panel": () => import("./LayerPanel-457b2eda.mjs"),
336485
- coordinate: () => import("./CoordinateLocationDialog-ad411c69.mjs"),
336486
- "region-navigation": () => import("./RegionNavigationDialog-e3e5b418.mjs"),
336487
- "my-markers": () => import("./MyMarkersDialog-75707eb5.mjs"),
336488
- "view-bookmarks": () => import("./ViewBookmarksDialog-f7c42678.mjs"),
336489
- "map-drawing": () => import("./index-6f52fd83.mjs"),
336490
- "filter-panel": () => import("./FilterPanel-a23dccbb.mjs")
336541
+ measurement: () => import("./MeasurementDialog-09489e89.mjs"),
336542
+ basemap: () => import("./BasemapPanel-93acd292.mjs"),
336543
+ print: () => import("./MapPrintDialog-b84a005c.mjs"),
336544
+ "layer-panel": () => import("./LayerPanel-c9e3687b.mjs"),
336545
+ coordinate: () => import("./CoordinateLocationDialog-d7da1dee.mjs"),
336546
+ "region-navigation": () => import("./RegionNavigationDialog-fd27dd77.mjs"),
336547
+ "my-markers": () => import("./MyMarkersDialog-5eb2be16.mjs"),
336548
+ "view-bookmarks": () => import("./ViewBookmarksDialog-5d544c1e.mjs"),
336549
+ "map-drawing": () => import("./index-73f9be38.mjs"),
336550
+ "filter-panel": () => import("./FilterPanel-966e0fc5.mjs")
336491
336551
  };
336492
336552
  const _DialogRegistry = class _DialogRegistry {
336493
336553
  constructor() {
@@ -336889,7 +336949,7 @@ const _export_sfc = (sfc, props) => {
336889
336949
  }
336890
336950
  return target;
336891
336951
  };
336892
- const OlDrawToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-55056d7b"]]);
336952
+ const OlDrawToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-d8c4da4a"]]);
336893
336953
  const TIANDITU_CONFIG = {
336894
336954
  baseUrl: "https://api.tianditu.gov.cn/v2/search",
336895
336955
  key: "9a7244dd5d1a1299a52946a3d0f8ff68"
@@ -338335,6 +338395,10 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
338335
338395
  const isMinZoom = computed(() => {
338336
338396
  return currentZoom.value <= minZoom.value;
338337
338397
  });
338398
+ const hasOtherTools = computed(() => {
338399
+ const tools = props.config.tools;
338400
+ return !!((tools == null ? void 0 : tools.fullScreen) || props.config.fullScreen || ((tools == null ? void 0 : tools.location) || props.config.location) || ((tools == null ? void 0 : tools.overviewMap) || props.config.overviewMap) || ((tools == null ? void 0 : tools.zoomToExtent) || props.config.zoomToExtent));
338401
+ });
338338
338402
  const initOverviewMap = () => {
338339
338403
  const tools = props.config.tools || {};
338340
338404
  const rawConfig = tools.overviewMap ?? props.config.overviewMap;
@@ -338416,6 +338480,16 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
338416
338480
  }
338417
338481
  };
338418
338482
  const locateToInitial = () => {
338483
+ var _a2;
338484
+ const locationType = (_a2 = props.config.tools) == null ? void 0 : _a2.locationType;
338485
+ if (locationType === "user") {
338486
+ if (mapManager == null ? void 0 : mapManager.value) {
338487
+ mapManager.value.locateToUser({ zoom: 15 });
338488
+ } else {
338489
+ console.warn("MapManager not found");
338490
+ }
338491
+ return;
338492
+ }
338419
338493
  if (currentMap.value) {
338420
338494
  const view = currentMap.value.getView();
338421
338495
  const initialCenter = currentMap.value.get("initialCenter") || [
@@ -338682,8 +338756,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
338682
338756
  _: 1
338683
338757
  })
338684
338758
  ])) : createCommentVNode("", true),
338685
- (((_e2 = _ctx.config.tools) == null ? void 0 : _e2.rotate) || _ctx.config.rotate) && _ctx.hasOtherTools ? (openBlock(), createElementBlock("div", _hoisted_4$a)) : createCommentVNode("", true),
338686
- _ctx.hasOtherTools ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
338759
+ (((_e2 = _ctx.config.tools) == null ? void 0 : _e2.rotate) || _ctx.config.rotate) && hasOtherTools.value ? (openBlock(), createElementBlock("div", _hoisted_4$a)) : createCommentVNode("", true),
338760
+ hasOtherTools.value ? (openBlock(), createElementBlock("div", _hoisted_5$a, [
338687
338761
  ((_f = _ctx.config.tools) == null ? void 0 : _f.fullScreen) || _ctx.config.fullScreen ? (openBlock(), createBlock(unref(ElButton), {
338688
338762
  key: 0,
338689
338763
  class: normalizeClass(["control-btn", { "is-active": isFullscreen.value }]),
@@ -338762,7 +338836,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
338762
338836
  _: 1
338763
338837
  }, 8, ["title"])) : createCommentVNode("", true)
338764
338838
  ])) : createCommentVNode("", true),
338765
- (((_m = _ctx.config.tools) == null ? void 0 : _m.clearAll) || _ctx.config.clearAll) && (_ctx.hasOtherTools || ((_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$7)) : createCommentVNode("", true),
338839
+ (((_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$7)) : createCommentVNode("", true),
338766
338840
  ((_p = _ctx.config.tools) == null ? void 0 : _p.clearAll) || _ctx.config.clearAll ? (openBlock(), createElementBlock("div", _hoisted_7$7, [
338767
338841
  createVNode$1(unref(ElButton), {
338768
338842
  class: "control-btn",
@@ -338787,7 +338861,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
338787
338861
  };
338788
338862
  }
338789
338863
  });
338790
- const OlControlPanel = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-4a20acde"]]);
338864
+ const OlControlPanel = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-16ae0432"]]);
338791
338865
  const _hoisted_1$a = { class: "ol-legend-header" };
338792
338866
  const _hoisted_2$9 = { class: "header-actions" };
338793
338867
  const _hoisted_3$9 = { class: "ol-legend-body custom-scrollbar" };
@@ -353009,7 +353083,7 @@ function(t3) {
353009
353083
  */
353010
353084
  function(t3) {
353011
353085
  function e8() {
353012
- return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-d8a69c3e.mjs")).catch(function(t4) {
353086
+ return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-6e8fed8c.mjs")).catch(function(t4) {
353013
353087
  return Promise.reject(new Error("Could not load canvg: " + t4));
353014
353088
  }).then(function(t4) {
353015
353089
  return t4.default ? t4.default : t4;
@@ -362183,7 +362257,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
362183
362257
  };
362184
362258
  }
362185
362259
  });
362186
- const OlBaseLayerSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-31959ece"]]);
362260
+ const OlBaseLayerSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-492e5ed0"]]);
362187
362261
  const _hoisted_1$4 = { class: "print-content h-full flex flex-col overflow-hidden" };
362188
362262
  const _hoisted_2$3 = { class: "h-full flex flex-col bg-white rounded border border-gray-200 shadow-sm overflow-hidden" };
362189
362263
  const _hoisted_3$3 = { class: "px-5 py-4 border-b border-gray-200 flex items-center justify-between bg-white shrink-0" };
@@ -362704,7 +362778,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
362704
362778
  height: "85vh",
362705
362779
  "before-close": handleClose,
362706
362780
  "show-modal": false,
362707
- "modal-class": ["pointer-events-none"],
362781
+ "modal-class": "pointer-events-none",
362708
362782
  "cache-id": "print-dialog",
362709
362783
  class: "print-dialog"
362710
362784
  }, {
@@ -363645,7 +363719,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
363645
363719
  storagePrefix: { default: "custom-openlayer" },
363646
363720
  tooltipTemplate: {},
363647
363721
  enablePopup: { type: Boolean, default: true },
363648
- popupConfig: {}
363722
+ popupConfig: {},
363723
+ enableGeolocation: { type: Boolean, default: true }
363649
363724
  },
363650
363725
  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", "tool-action", "search", "search-select", "search-clear", "popup-show", "popup-hide", "popup-close"],
363651
363726
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -364294,10 +364369,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
364294
364369
  if (loadedConfig.value || props.mapConfig) {
364295
364370
  await applyConfigToMap();
364296
364371
  }
364372
+ if (props.enableGeolocation && mapManager.value) {
364373
+ mapManager.value.locateToUser();
364374
+ }
364297
364375
  emit("map-ready", mapInstance);
364298
364376
  };
364299
364377
  const onMapClick = (event) => {
364300
364378
  var _a2;
364379
+ if (dialogManager.getActiveToolId().value) {
364380
+ return;
364381
+ }
364301
364382
  if ((_a2 = props.eventCallbacks) == null ? void 0 : _a2.onMapClick) {
364302
364383
  props.eventCallbacks.onMapClick(event);
364303
364384
  }
@@ -364320,6 +364401,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
364320
364401
  emit("zoom-change", zoom, oldZoom);
364321
364402
  };
364322
364403
  const onFeatureClick = (feature, layer2, clickCoordinate, mapCoordinate) => {
364404
+ if (dialogManager.getActiveToolId().value) {
364405
+ return;
364406
+ }
364323
364407
  emit("feature-click", feature, layer2, clickCoordinate);
364324
364408
  };
364325
364409
  const onMeasurementStart = (type) => {
@@ -365252,7 +365336,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
365252
365336
  };
365253
365337
  }
365254
365338
  });
365255
- const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-178068e9"]]);
365339
+ const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-ca6277a2"]]);
365256
365340
  const CACHE_PREFIX = "custom_dialog_";
365257
365341
  const CACHE_VERSION = "1.0";
365258
365342
  class DialogCacheManager {
@@ -1,9 +1,9 @@
1
- import { c as commonjsGlobal, g as getDefaultExportFromCjs, _ as _asyncToGenerator, a as _defineProperty } from "./index-da052bda.mjs";
1
+ import { c as commonjsGlobal, g as getDefaultExportFromCjs, _ as _asyncToGenerator, a as _defineProperty } from "./index-f331a9c2.mjs";
2
2
  import "vue";
3
3
  import "@element-plus/icons-vue";
4
4
  import "ol";
5
- import "proj4";
6
5
  import "element-plus";
6
+ import "proj4";
7
7
  import "@supermapgis/iclient-ol";
8
8
  var check = function(it) {
9
9
  return it && it.Math === Math && it;
package/lib/index.esm.js CHANGED
@@ -1,9 +1,9 @@
1
- import { U, E, v, O, H, D, ai, P, S, an, am, a2, a3, ae, af, L, a4, a5, al, aj, C, B, ag, ah, ac, ad, aa, ab, a8, a9, u, o, n, s, O as O2, m, p, q, W, Y, a0, a1, a6, a7, ao, w, Z, $, V, R, F, I, N, y, f, A, Q, J, b, G, ak, x, K, l, r, z } from "./index-da052bda.mjs";
1
+ import { U, E, v, O, H, D, ai, P, S, an, am, a2, a3, ae, af, L, a4, a5, al, aj, C, B, ag, ah, ac, ad, aa, ab, a8, a9, u, o, n, s, O as O2, m, p, q, W, Y, a0, a1, a6, a7, ao, w, Z, $, V, R, F, I, N, y, f, A, Q, J, b, G, ak, x, K, l, r, z } from "./index-f331a9c2.mjs";
2
2
  import "vue";
3
3
  import "@element-plus/icons-vue";
4
4
  import "ol";
5
- import "proj4";
6
5
  import "element-plus";
6
+ import "proj4";
7
7
  import "@supermapgis/iclient-ol";
8
8
  export {
9
9
  U as BaseDrawing,