vue-openlayers-plugin 1.2.1 → 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.
- package/lib/{BasemapPanel-aa284bf3.mjs → BasemapPanel-2a1eff3d.mjs} +1 -1
- package/lib/{CoordinateLocationDialog-6c0a6b23.mjs → CoordinateLocationDialog-3ffa7ef5.mjs} +1 -1
- package/lib/{MapPrintDialog-2e5a22e7.mjs → FilterPanel-caa15606.mjs} +1 -1
- package/lib/{FilterPanel-b91325ac.mjs → LayerPanel-c7be314b.mjs} +1 -1
- package/lib/{LayerPanel-88983648.mjs → MapPrintDialog-1520d417.mjs} +1 -1
- package/lib/{MeasurementDialog-ebda57e6.mjs → MeasurementDialog-1b4b64c7.mjs} +1 -1
- package/lib/{MyMarkersDialog-1f851036.mjs → MyMarkersDialog-67ff8e26.mjs} +1 -1
- package/lib/{QuadCompareDialog-8f624242.mjs → QuadCompareDialog-c1098032.mjs} +1 -1
- package/lib/{RegionNavigationDialog-549597e1.mjs → RegionNavigationDialog-cc4e392d.mjs} +1 -1
- package/lib/{SplitCompareDialog-9bcce145.mjs → SplitCompareDialog-ab540279.mjs} +1 -1
- package/lib/{SwipeCompareDialog-374b9865.mjs → SwipeCompareDialog-a1aa3ab0.mjs} +1 -1
- package/lib/{ViewBookmarksDialog-10b5fe14.mjs → ViewBookmarksDialog-6b0999f7.mjs} +1 -1
- package/lib/{index-e8d5fc75.mjs → index-0c3a5960.mjs} +58 -19
- package/lib/{index-b9d6884a.mjs → index-f34dc985.mjs} +1 -1
- package/lib/{index.es-ff0f4147.mjs → index.es-571daed3.mjs} +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.umd.js +46 -7
- package/lib/style.css +26 -26
- package/package.json +2 -9
- package/types/components/OlControlPanel.vue.d.ts +3 -1
- package/types/components/OlControlPanel.vue.d.ts.map +1 -1
- package/types/components/OlMap.vue.d.ts +3 -1
- package/types/components/OlMap.vue.d.ts.map +1 -1
- package/types/core/MapManager.d.ts +5 -0
- package/types/core/MapManager.d.ts.map +1 -1
- package/types/lowcode-entry.d.ts +5 -0
- package/types/lowcode-entry.d.ts.map +1 -1
- package/types/types/map.d.ts +5 -0
- package/types/types/map.d.ts.map +1 -1
- package/lib//346/240/207/345/207/206 +0 -159
- package/types/tsconfig.tsbuildinfo +0 -1
|
@@ -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 { r as resolveBasemapThumbnail, l as layerEventBus, X, b as _export_sfc } from "./index-
|
|
2
|
+
import { r as resolveBasemapThumbnail, l as layerEventBus, X, b as _export_sfc } from "./index-0c3a5960.mjs";
|
|
3
3
|
import "@element-plus/icons-vue";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "proj4";
|
|
@@ -1,6 +1,6 @@
|
|
|
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, b as _export_sfc } from "./index-
|
|
3
|
+
import { X, T as TooltipHelper, b as _export_sfc } from "./index-0c3a5960.mjs";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "proj4";
|
|
6
6
|
import "@supermapgis/iclient-ol";
|
|
@@ -1,5 +1,5 @@
|
|
|
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 _export_sfc } from "./index-
|
|
2
|
+
import { X, f as formatMeasurementResult, b as _export_sfc } from "./index-0c3a5960.mjs";
|
|
3
3
|
import "@element-plus/icons-vue";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "proj4";
|
|
@@ -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, h as fromLonLat, t as toLonLat } from "./index-
|
|
4
|
+
import { X, M as MarkerDrawingAdapter, h as fromLonLat, t as toLonLat } from "./index-0c3a5960.mjs";
|
|
5
5
|
import "ol";
|
|
6
6
|
import "proj4";
|
|
7
7
|
import "@supermapgis/iclient-ol";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, computed, shallowRef, reactive, watch, nextTick, onMounted, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
2
|
-
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-
|
|
2
|
+
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-0c3a5960.mjs";
|
|
3
3
|
import { u as useMap } from "./useMap-8e3a2de5.mjs";
|
|
4
4
|
import { View, Map } from "ol";
|
|
5
5
|
import "@element-plus/icons-vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
import { X } from "./index-0c3a5960.mjs";
|
|
3
3
|
import "@element-plus/icons-vue";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "proj4";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, computed, shallowRef, watch, nextTick, onMounted, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
2
|
-
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-
|
|
2
|
+
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-0c3a5960.mjs";
|
|
3
3
|
import { u as useMap } from "./useMap-8e3a2de5.mjs";
|
|
4
4
|
import { View, Map } from "ol";
|
|
5
5
|
import "@element-plus/icons-vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, inject, computed, shallowRef, watch, nextTick, onMounted, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, normalizeClass, normalizeStyle, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
|
2
|
-
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-
|
|
2
|
+
import { k as layerFactory, i as getUid, m as defaults, X, n as TileLayer, I as ImageLayer, V as VectorTileLayer, H as HeatmapLayer, o as VectorLayer, L as LayerGroup, b as _export_sfc } from "./index-0c3a5960.mjs";
|
|
3
3
|
import { u as useMap } from "./useMap-8e3a2de5.mjs";
|
|
4
4
|
import { View, Map } from "ol";
|
|
5
5
|
import { DCaret } from "@element-plus/icons-vue";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, inject, computed, ref, watch, reactive, resolveComponent, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, createElementBlock, Fragment, renderList, withModifiers, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { Plus, 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, h as fromLonLat, i as getUid } from "./index-
|
|
4
|
+
import { X, t as toLonLat, h as fromLonLat, i as getUid } from "./index-0c3a5960.mjs";
|
|
5
5
|
import "ol";
|
|
6
6
|
import "proj4";
|
|
7
7
|
import "@supermapgis/iclient-ol";
|
|
@@ -335988,15 +335988,34 @@ class MapManager {
|
|
|
335988
335988
|
__publicField(this, "drawingManager", null);
|
|
335989
335989
|
__publicField(this, "featureHighlightManager", null);
|
|
335990
335990
|
__publicField(this, "popupManager", null);
|
|
335991
|
+
__publicField(this, "drawingEndListener", null);
|
|
335991
335992
|
// 状态管理
|
|
335992
335993
|
__publicField(this, "isCoordinatePicking", false);
|
|
335993
335994
|
__publicField(this, "coordinatePickCallback", null);
|
|
335994
335995
|
__publicField(this, "measurementType", null);
|
|
335995
335996
|
__publicField(this, "contextMenuCoordinate", [0, 0]);
|
|
335997
|
+
__publicField(this, "ignoreMapClickUntil", 0);
|
|
335996
335998
|
this.config = config;
|
|
335997
335999
|
this.eventBus = eventBus;
|
|
335998
336000
|
this.storage = storage2;
|
|
335999
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
|
+
}
|
|
336000
336019
|
/**
|
|
336001
336020
|
* 处理要素点击的popup显示
|
|
336002
336021
|
*/
|
|
@@ -336291,6 +336310,7 @@ class MapManager {
|
|
|
336291
336310
|
this.featureHighlightManager = new FeatureHighlightManager(this.map);
|
|
336292
336311
|
this.markerAdapter = new MarkerDrawingAdapter(this.map);
|
|
336293
336312
|
this.drawingManager = new DrawingManager({ map: this.map });
|
|
336313
|
+
this.bindDrawingManagerEvents();
|
|
336294
336314
|
this.measurementTool = new MeasurementTool(this.map, this.storage);
|
|
336295
336315
|
const initialCenter = this.config.center || [116.404, 39.915];
|
|
336296
336316
|
const initialZoom = this.config.zoom || 10;
|
|
@@ -336386,6 +336406,9 @@ class MapManager {
|
|
|
336386
336406
|
}
|
|
336387
336407
|
return;
|
|
336388
336408
|
}
|
|
336409
|
+
if (this.shouldIgnoreMapClick()) {
|
|
336410
|
+
return;
|
|
336411
|
+
}
|
|
336389
336412
|
const featuresAtPixel = [];
|
|
336390
336413
|
this.map.forEachFeatureAtPixel(pixel, (feature, layer2) => {
|
|
336391
336414
|
if (layer2 && feature) {
|
|
@@ -336876,6 +336899,9 @@ class MapManager {
|
|
|
336876
336899
|
const view = this.map.getView();
|
|
336877
336900
|
const projection2 = view.getProjection().getCode();
|
|
336878
336901
|
const lonLatCoordinate = projection2 === "EPSG:4326" || projection2 === "EPSG:4490" ? coordinate : toLonLat(coordinate);
|
|
336902
|
+
if (this.shouldIgnoreMapClick()) {
|
|
336903
|
+
return;
|
|
336904
|
+
}
|
|
336879
336905
|
const features2 = this.map.getFeaturesAtPixel(pixel);
|
|
336880
336906
|
if (features2 && features2.length > 0) {
|
|
336881
336907
|
features2.sort((a3, b10) => {
|
|
@@ -337156,6 +337182,9 @@ class MapManager {
|
|
|
337156
337182
|
* 销毁地图管理器
|
|
337157
337183
|
*/
|
|
337158
337184
|
destroy() {
|
|
337185
|
+
if (this.drawingManager && this.drawingEndListener) {
|
|
337186
|
+
this.drawingManager.off("drawing-end", this.drawingEndListener);
|
|
337187
|
+
}
|
|
337159
337188
|
if (this.map) {
|
|
337160
337189
|
this.map.setTarget(void 0);
|
|
337161
337190
|
}
|
|
@@ -337166,6 +337195,7 @@ class MapManager {
|
|
|
337166
337195
|
this.measurementTool = null;
|
|
337167
337196
|
this.mapOperationTool = null;
|
|
337168
337197
|
this.drawingManager = null;
|
|
337198
|
+
this.drawingEndListener = null;
|
|
337169
337199
|
this.eventCallbacks = {};
|
|
337170
337200
|
this.map = null;
|
|
337171
337201
|
}
|
|
@@ -337395,19 +337425,19 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
337395
337425
|
}
|
|
337396
337426
|
});
|
|
337397
337427
|
const defaultComponents = {
|
|
337398
|
-
measurement: () => import("./MeasurementDialog-
|
|
337399
|
-
basemap: () => import("./BasemapPanel-
|
|
337400
|
-
print: () => import("./MapPrintDialog-
|
|
337401
|
-
"layer-panel": () => import("./LayerPanel-
|
|
337402
|
-
coordinate: () => import("./CoordinateLocationDialog-
|
|
337403
|
-
"region-navigation": () => import("./RegionNavigationDialog-
|
|
337404
|
-
"my-markers": () => import("./MyMarkersDialog-
|
|
337405
|
-
"view-bookmarks": () => import("./ViewBookmarksDialog-
|
|
337406
|
-
"map-drawing": () => import("./index-
|
|
337407
|
-
"filter-panel": () => import("./FilterPanel-
|
|
337408
|
-
"swipe-compare": () => import("./SwipeCompareDialog-
|
|
337409
|
-
"split-compare": () => import("./SplitCompareDialog-
|
|
337410
|
-
"quad-compare": () => import("./QuadCompareDialog-
|
|
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")
|
|
337411
337441
|
};
|
|
337412
337442
|
const _DialogRegistry = class _DialogRegistry {
|
|
337413
337443
|
constructor() {
|
|
@@ -339502,7 +339532,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
339502
339532
|
bottomOffset: {},
|
|
339503
339533
|
viewBookmarks: {}
|
|
339504
339534
|
},
|
|
339505
|
-
emits: ["drawing-complete"],
|
|
339535
|
+
emits: ["drawing-complete", "drawing-clear"],
|
|
339506
339536
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
339507
339537
|
const props = __props;
|
|
339508
339538
|
const emit = __emit;
|
|
@@ -339845,6 +339875,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
339845
339875
|
const clearAllDrawnContent = () => {
|
|
339846
339876
|
if (mapManager == null ? void 0 : mapManager.value) {
|
|
339847
339877
|
mapManager.value.clearAll();
|
|
339878
|
+
emit("drawing-clear", {
|
|
339879
|
+
source: "controls",
|
|
339880
|
+
cleared: true,
|
|
339881
|
+
timestamp: Date.now()
|
|
339882
|
+
});
|
|
339848
339883
|
}
|
|
339849
339884
|
};
|
|
339850
339885
|
const buildDrawingResult = (drawing) => {
|
|
@@ -340394,7 +340429,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
340394
340429
|
};
|
|
340395
340430
|
}
|
|
340396
340431
|
});
|
|
340397
|
-
const OlControlPanel = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-
|
|
340432
|
+
const OlControlPanel = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["__scopeId", "data-v-2ee216d4"]]);
|
|
340398
340433
|
const _hoisted_1$i = {
|
|
340399
340434
|
key: 0,
|
|
340400
340435
|
class: "ol-legend-header"
|
|
@@ -352995,7 +353030,7 @@ function(t3) {
|
|
|
352995
353030
|
*/
|
|
352996
353031
|
function(t3) {
|
|
352997
353032
|
function e8() {
|
|
352998
|
-
return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-
|
|
353033
|
+
return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-571daed3.mjs")).catch(function(t4) {
|
|
352999
353034
|
return Promise.reject(new Error("Could not load canvg: " + t4));
|
|
353000
353035
|
}).then(function(t4) {
|
|
353001
353036
|
return t4.default ? t4.default : t4;
|
|
@@ -365684,7 +365719,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
365684
365719
|
popupConfig: {},
|
|
365685
365720
|
enableGeolocation: { type: Boolean, default: true }
|
|
365686
365721
|
},
|
|
365687
|
-
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", "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"],
|
|
365688
365723
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
365689
365724
|
const currentLegends = ref([]);
|
|
365690
365725
|
const currentLayers = ref([]);
|
|
@@ -366549,6 +366584,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
366549
366584
|
const onDrawingComplete = (result) => {
|
|
366550
366585
|
emit("drawing-complete", result);
|
|
366551
366586
|
};
|
|
366587
|
+
const onDrawingClear = (event) => {
|
|
366588
|
+
emit("drawing-clear", event);
|
|
366589
|
+
};
|
|
366552
366590
|
const onPrintAction = (data) => {
|
|
366553
366591
|
console.log("打印操作:", data);
|
|
366554
366592
|
switch (data.action) {
|
|
@@ -367236,7 +367274,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
367236
367274
|
"top-offset": finalControlsConfig.value.topOffset,
|
|
367237
367275
|
"bottom-offset": finalControlsConfig.value.bottomOffset,
|
|
367238
367276
|
"view-bookmarks": props.viewBookmarks,
|
|
367239
|
-
onDrawingComplete
|
|
367277
|
+
onDrawingComplete,
|
|
367278
|
+
onDrawingClear
|
|
367240
367279
|
}, {
|
|
367241
367280
|
custom: withCtx(({ controls }) => [
|
|
367242
367281
|
renderSlot(_ctx.$slots, "controls", {
|
|
@@ -367373,7 +367412,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
367373
367412
|
};
|
|
367374
367413
|
}
|
|
367375
367414
|
});
|
|
367376
|
-
const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
367415
|
+
const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-88e42f18"]]);
|
|
367377
367416
|
const Property = {
|
|
367378
367417
|
ACCURACY: "accuracy",
|
|
367379
367418
|
ACCURACY_GEOMETRY: "accuracyGeometry",
|
|
@@ -1,6 +1,6 @@
|
|
|
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 { b as _export_sfc, D as DrawingManager, X } from "./index-
|
|
3
|
+
import { b as _export_sfc, D as DrawingManager, X } from "./index-0c3a5960.mjs";
|
|
4
4
|
import "ol";
|
|
5
5
|
import "proj4";
|
|
6
6
|
import "@supermapgis/iclient-ol";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as commonjsGlobal, g as getDefaultExportFromCjs, _ as _asyncToGenerator, a as _defineProperty } from "./index-
|
|
1
|
+
import { c as commonjsGlobal, g as getDefaultExportFromCjs, _ as _asyncToGenerator, a as _defineProperty } from "./index-0c3a5960.mjs";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "@element-plus/icons-vue";
|
|
4
4
|
import "ol";
|
package/lib/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ad, a0, K, O, a4, D, aA, a9, ac, aF, aE, ak, al, aw, ax, Y, am, an, aD, aB, $, Z, ay, az, B, E, F, A, J, y, C, z, G, au, av, as, at, aq, ar, x, s, q, w, O as O2, p, u, v, ae, af, ai, aj, ao, ap, aG, N, ag, ah, U, ab, a1, a5, a8, Q, f, W, aa, a6, a2, a3, aC, P, a7, l, S, r, R } from "./index-
|
|
1
|
+
import { ad, a0, K, O, a4, D, aA, a9, ac, aF, aE, ak, al, aw, ax, Y, am, an, aD, aB, $, Z, ay, az, B, E, F, A, J, y, C, z, G, au, av, as, at, aq, ar, x, s, q, w, O as O2, p, u, v, ae, af, ai, aj, ao, ap, aG, N, ag, ah, U, ab, a1, a5, a8, Q, f, W, aa, a6, a2, a3, aC, P, a7, l, S, r, R } from "./index-0c3a5960.mjs";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "@element-plus/icons-vue";
|
|
4
4
|
import "ol";
|
package/lib/index.umd.js
CHANGED
|
@@ -336388,15 +336388,34 @@ ${indentData}`);
|
|
|
336388
336388
|
__publicField(this, "drawingManager", null);
|
|
336389
336389
|
__publicField(this, "featureHighlightManager", null);
|
|
336390
336390
|
__publicField(this, "popupManager", null);
|
|
336391
|
+
__publicField(this, "drawingEndListener", null);
|
|
336391
336392
|
// 状态管理
|
|
336392
336393
|
__publicField(this, "isCoordinatePicking", false);
|
|
336393
336394
|
__publicField(this, "coordinatePickCallback", null);
|
|
336394
336395
|
__publicField(this, "measurementType", null);
|
|
336395
336396
|
__publicField(this, "contextMenuCoordinate", [0, 0]);
|
|
336397
|
+
__publicField(this, "ignoreMapClickUntil", 0);
|
|
336396
336398
|
this.config = config;
|
|
336397
336399
|
this.eventBus = eventBus;
|
|
336398
336400
|
this.storage = storage2;
|
|
336399
336401
|
}
|
|
336402
|
+
markDrawingEndIgnoreWindow() {
|
|
336403
|
+
this.ignoreMapClickUntil = Date.now() + 300;
|
|
336404
|
+
}
|
|
336405
|
+
shouldIgnoreMapClick() {
|
|
336406
|
+
return Date.now() < this.ignoreMapClickUntil;
|
|
336407
|
+
}
|
|
336408
|
+
bindDrawingManagerEvents() {
|
|
336409
|
+
if (!this.drawingManager)
|
|
336410
|
+
return;
|
|
336411
|
+
if (this.drawingEndListener) {
|
|
336412
|
+
this.drawingManager.off("drawing-end", this.drawingEndListener);
|
|
336413
|
+
}
|
|
336414
|
+
this.drawingEndListener = () => {
|
|
336415
|
+
this.markDrawingEndIgnoreWindow();
|
|
336416
|
+
};
|
|
336417
|
+
this.drawingManager.on("drawing-end", this.drawingEndListener);
|
|
336418
|
+
}
|
|
336400
336419
|
/**
|
|
336401
336420
|
* 处理要素点击的popup显示
|
|
336402
336421
|
*/
|
|
@@ -336691,6 +336710,7 @@ ${indentData}`);
|
|
|
336691
336710
|
this.featureHighlightManager = new FeatureHighlightManager(this.map);
|
|
336692
336711
|
this.markerAdapter = new MarkerDrawingAdapter(this.map);
|
|
336693
336712
|
this.drawingManager = new DrawingManager({ map: this.map });
|
|
336713
|
+
this.bindDrawingManagerEvents();
|
|
336694
336714
|
this.measurementTool = new MeasurementTool(this.map, this.storage);
|
|
336695
336715
|
const initialCenter = this.config.center || [116.404, 39.915];
|
|
336696
336716
|
const initialZoom = this.config.zoom || 10;
|
|
@@ -336786,6 +336806,9 @@ ${indentData}`);
|
|
|
336786
336806
|
}
|
|
336787
336807
|
return;
|
|
336788
336808
|
}
|
|
336809
|
+
if (this.shouldIgnoreMapClick()) {
|
|
336810
|
+
return;
|
|
336811
|
+
}
|
|
336789
336812
|
const featuresAtPixel = [];
|
|
336790
336813
|
this.map.forEachFeatureAtPixel(pixel, (feature, layer2) => {
|
|
336791
336814
|
if (layer2 && feature) {
|
|
@@ -337276,6 +337299,9 @@ ${indentData}`);
|
|
|
337276
337299
|
const view = this.map.getView();
|
|
337277
337300
|
const projection2 = view.getProjection().getCode();
|
|
337278
337301
|
const lonLatCoordinate = projection2 === "EPSG:4326" || projection2 === "EPSG:4490" ? coordinate : toLonLat(coordinate);
|
|
337302
|
+
if (this.shouldIgnoreMapClick()) {
|
|
337303
|
+
return;
|
|
337304
|
+
}
|
|
337279
337305
|
const features2 = this.map.getFeaturesAtPixel(pixel);
|
|
337280
337306
|
if (features2 && features2.length > 0) {
|
|
337281
337307
|
features2.sort((a3, b10) => {
|
|
@@ -337556,6 +337582,9 @@ ${indentData}`);
|
|
|
337556
337582
|
* 销毁地图管理器
|
|
337557
337583
|
*/
|
|
337558
337584
|
destroy() {
|
|
337585
|
+
if (this.drawingManager && this.drawingEndListener) {
|
|
337586
|
+
this.drawingManager.off("drawing-end", this.drawingEndListener);
|
|
337587
|
+
}
|
|
337559
337588
|
if (this.map) {
|
|
337560
337589
|
this.map.setTarget(void 0);
|
|
337561
337590
|
}
|
|
@@ -337566,6 +337595,7 @@ ${indentData}`);
|
|
|
337566
337595
|
this.measurementTool = null;
|
|
337567
337596
|
this.mapOperationTool = null;
|
|
337568
337597
|
this.drawingManager = null;
|
|
337598
|
+
this.drawingEndListener = null;
|
|
337569
337599
|
this.eventCallbacks = {};
|
|
337570
337600
|
this.map = null;
|
|
337571
337601
|
}
|
|
@@ -339905,7 +339935,7 @@ ${indentData}`);
|
|
|
339905
339935
|
bottomOffset: {},
|
|
339906
339936
|
viewBookmarks: {}
|
|
339907
339937
|
},
|
|
339908
|
-
emits: ["drawing-complete"],
|
|
339938
|
+
emits: ["drawing-complete", "drawing-clear"],
|
|
339909
339939
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
339910
339940
|
const props = __props;
|
|
339911
339941
|
const emit = __emit;
|
|
@@ -340248,6 +340278,11 @@ ${indentData}`);
|
|
|
340248
340278
|
const clearAllDrawnContent = () => {
|
|
340249
340279
|
if (mapManager == null ? void 0 : mapManager.value) {
|
|
340250
340280
|
mapManager.value.clearAll();
|
|
340281
|
+
emit("drawing-clear", {
|
|
340282
|
+
source: "controls",
|
|
340283
|
+
cleared: true,
|
|
340284
|
+
timestamp: Date.now()
|
|
340285
|
+
});
|
|
340251
340286
|
}
|
|
340252
340287
|
};
|
|
340253
340288
|
const buildDrawingResult = (drawing) => {
|
|
@@ -340797,8 +340832,8 @@ ${indentData}`);
|
|
|
340797
340832
|
};
|
|
340798
340833
|
}
|
|
340799
340834
|
});
|
|
340800
|
-
const
|
|
340801
|
-
const OlControlPanel = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-
|
|
340835
|
+
const OlControlPanel_vue_vue_type_style_index_0_scoped_2ee216d4_lang = "";
|
|
340836
|
+
const OlControlPanel = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["__scopeId", "data-v-2ee216d4"]]);
|
|
340802
340837
|
const _hoisted_1$u = {
|
|
340803
340838
|
key: 0,
|
|
340804
340839
|
class: "ol-legend-header"
|
|
@@ -366035,7 +366070,7 @@ ${indentData}`);
|
|
|
366035
366070
|
popupConfig: {},
|
|
366036
366071
|
enableGeolocation: { type: Boolean, default: true }
|
|
366037
366072
|
},
|
|
366038
|
-
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", "search", "search-select", "search-clear", "popup-show", "popup-hide", "popup-close"],
|
|
366073
|
+
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"],
|
|
366039
366074
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
366040
366075
|
const currentLegends = vue.ref([]);
|
|
366041
366076
|
const currentLayers = vue.ref([]);
|
|
@@ -366900,6 +366935,9 @@ ${indentData}`);
|
|
|
366900
366935
|
const onDrawingComplete = (result) => {
|
|
366901
366936
|
emit("drawing-complete", result);
|
|
366902
366937
|
};
|
|
366938
|
+
const onDrawingClear = (event) => {
|
|
366939
|
+
emit("drawing-clear", event);
|
|
366940
|
+
};
|
|
366903
366941
|
const onPrintAction = (data2) => {
|
|
366904
366942
|
console.log("打印操作:", data2);
|
|
366905
366943
|
switch (data2.action) {
|
|
@@ -367587,7 +367625,8 @@ ${indentData}`);
|
|
|
367587
367625
|
"top-offset": finalControlsConfig.value.topOffset,
|
|
367588
367626
|
"bottom-offset": finalControlsConfig.value.bottomOffset,
|
|
367589
367627
|
"view-bookmarks": props.viewBookmarks,
|
|
367590
|
-
onDrawingComplete
|
|
367628
|
+
onDrawingComplete,
|
|
367629
|
+
onDrawingClear
|
|
367591
367630
|
}, {
|
|
367592
367631
|
custom: vue.withCtx(({ controls }) => [
|
|
367593
367632
|
vue.renderSlot(_ctx.$slots, "controls", {
|
|
@@ -367724,8 +367763,8 @@ ${indentData}`);
|
|
|
367724
367763
|
};
|
|
367725
367764
|
}
|
|
367726
367765
|
});
|
|
367727
|
-
const
|
|
367728
|
-
const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-
|
|
367766
|
+
const OlMap_vue_vue_type_style_index_0_scoped_88e42f18_lang = "";
|
|
367767
|
+
const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["__scopeId", "data-v-88e42f18"]]);
|
|
367729
367768
|
const ol = "";
|
|
367730
367769
|
const Property$1 = {
|
|
367731
367770
|
ACCURACY: "accuracy",
|
package/lib/style.css
CHANGED
|
@@ -888,7 +888,7 @@ to {
|
|
|
888
888
|
.position-bottom-right {
|
|
889
889
|
bottom: 5px;
|
|
890
890
|
}
|
|
891
|
-
}.control-bar[data-v-
|
|
891
|
+
}.control-bar[data-v-2ee216d4] {
|
|
892
892
|
display: flex;
|
|
893
893
|
align-items: center;
|
|
894
894
|
gap: 0;
|
|
@@ -901,77 +901,77 @@ to {
|
|
|
901
901
|
border: 1px solid var(--el-border-color-light);
|
|
902
902
|
transition: all 0.3s ease;
|
|
903
903
|
}
|
|
904
|
-
.control-bar[data-v-
|
|
904
|
+
.control-bar[data-v-2ee216d4]:hover {
|
|
905
905
|
box-shadow: var(--el-box-shadow);
|
|
906
906
|
border-color: var(--el-border-color-hover);
|
|
907
907
|
}
|
|
908
|
-
.control-bar.flex-col[data-v-
|
|
908
|
+
.control-bar.flex-col[data-v-2ee216d4] {
|
|
909
909
|
flex-direction: column;
|
|
910
910
|
width: fit-content;
|
|
911
911
|
}
|
|
912
|
-
.control-bar.flex-row[data-v-
|
|
912
|
+
.control-bar.flex-row[data-v-2ee216d4] {
|
|
913
913
|
flex-direction: row;
|
|
914
914
|
height: fit-content;
|
|
915
915
|
}
|
|
916
|
-
.control-section[data-v-
|
|
916
|
+
.control-section[data-v-2ee216d4] {
|
|
917
917
|
display: flex;
|
|
918
918
|
align-items: center;
|
|
919
919
|
justify-content: center;
|
|
920
920
|
gap: 4px;
|
|
921
921
|
/* Inherit direction from parent implicitly via flex layout */
|
|
922
922
|
}
|
|
923
|
-
.flex-col .control-section[data-v-
|
|
923
|
+
.flex-col .control-section[data-v-2ee216d4] {
|
|
924
924
|
flex-direction: column;
|
|
925
925
|
width: 100%;
|
|
926
926
|
}
|
|
927
|
-
.flex-row .control-section[data-v-
|
|
927
|
+
.flex-row .control-section[data-v-2ee216d4] {
|
|
928
928
|
flex-direction: row;
|
|
929
929
|
height: 100%;
|
|
930
930
|
}
|
|
931
|
-
.control-divider[data-v-
|
|
931
|
+
.control-divider[data-v-2ee216d4] {
|
|
932
932
|
background-color: var(--el-border-color-light);
|
|
933
933
|
}
|
|
934
|
-
.flex-col .control-divider[data-v-
|
|
934
|
+
.flex-col .control-divider[data-v-2ee216d4] {
|
|
935
935
|
width: 80%;
|
|
936
936
|
height: 1px;
|
|
937
937
|
margin: 4px 0;
|
|
938
938
|
}
|
|
939
|
-
.flex-row .control-divider[data-v-
|
|
939
|
+
.flex-row .control-divider[data-v-2ee216d4] {
|
|
940
940
|
width: 1px;
|
|
941
941
|
height: 16px; /* Explicit height for horizontal mode */
|
|
942
942
|
margin: 0 4px;
|
|
943
943
|
}
|
|
944
944
|
|
|
945
945
|
/* ensure buttons themselves are interactive */
|
|
946
|
-
.control-btn[data-v-
|
|
946
|
+
.control-btn[data-v-2ee216d4] {
|
|
947
947
|
pointer-events: auto;
|
|
948
948
|
margin: 0 !important; /* Ensure no margin interferes */
|
|
949
949
|
transition: transform 0.1s;
|
|
950
950
|
}
|
|
951
|
-
.control-btn[data-v-
|
|
951
|
+
.control-btn[data-v-2ee216d4]:active {
|
|
952
952
|
transform: scale(0.95);
|
|
953
953
|
}
|
|
954
954
|
|
|
955
955
|
/* reset Element Plus button default adjacent margin and use our gap instead */
|
|
956
|
-
[data-v-
|
|
956
|
+
[data-v-2ee216d4] .el-button + .el-button {
|
|
957
957
|
margin-left: 0 !important;
|
|
958
958
|
}
|
|
959
959
|
|
|
960
960
|
/* make sure all EP interactive widgets are clickable */
|
|
961
|
-
[data-v-
|
|
961
|
+
[data-v-2ee216d4] .el-button,[data-v-2ee216d4] .el-slider,[data-v-2ee216d4] .el-icon {
|
|
962
962
|
pointer-events: auto;
|
|
963
963
|
}
|
|
964
|
-
.drawing-menu-panel-content[data-v-
|
|
964
|
+
.drawing-menu-panel-content[data-v-2ee216d4] {
|
|
965
965
|
display: flex;
|
|
966
966
|
flex-direction: column;
|
|
967
967
|
}
|
|
968
|
-
.drawing-menu-title[data-v-
|
|
968
|
+
.drawing-menu-title[data-v-2ee216d4] {
|
|
969
969
|
margin-bottom: 8px;
|
|
970
970
|
font-size: 12px;
|
|
971
971
|
font-weight: 600;
|
|
972
972
|
color: var(--el-text-color-primary);
|
|
973
973
|
}
|
|
974
|
-
.drawing-tool-list[data-v-
|
|
974
|
+
.drawing-tool-list[data-v-2ee216d4] {
|
|
975
975
|
display: grid;
|
|
976
976
|
grid-template-columns: repeat(4, 1fr);
|
|
977
977
|
gap: 8px;
|
|
@@ -979,7 +979,7 @@ to {
|
|
|
979
979
|
overflow-y: auto;
|
|
980
980
|
padding: 4px;
|
|
981
981
|
}
|
|
982
|
-
.drawing-tool-btn[data-v-
|
|
982
|
+
.drawing-tool-btn[data-v-2ee216d4] {
|
|
983
983
|
width: 32px;
|
|
984
984
|
height: 32px;
|
|
985
985
|
margin: 0 !important;
|
|
@@ -988,17 +988,17 @@ to {
|
|
|
988
988
|
align-items: center;
|
|
989
989
|
font-size: 16px; /* Icon size */
|
|
990
990
|
}
|
|
991
|
-
.drawing-menu-divider[data-v-
|
|
991
|
+
.drawing-menu-divider[data-v-2ee216d4] {
|
|
992
992
|
height: 1px;
|
|
993
993
|
margin: 8px 0;
|
|
994
994
|
background: var(--el-border-color-light);
|
|
995
995
|
}
|
|
996
|
-
.drawing-toggle-row[data-v-
|
|
996
|
+
.drawing-toggle-row[data-v-2ee216d4] {
|
|
997
997
|
display: flex;
|
|
998
998
|
align-items: center;
|
|
999
999
|
justify-content: space-between;
|
|
1000
1000
|
}
|
|
1001
|
-
.drawing-stop-btn[data-v-
|
|
1001
|
+
.drawing-stop-btn[data-v-2ee216d4] {
|
|
1002
1002
|
justify-content: flex-start;
|
|
1003
1003
|
width: 100%;
|
|
1004
1004
|
margin-top: 6px !important;
|
|
@@ -1725,7 +1725,7 @@ label {
|
|
|
1725
1725
|
width: 100% !important;
|
|
1726
1726
|
height: 100% !important;
|
|
1727
1727
|
}
|
|
1728
|
-
.context-menu[data-v-
|
|
1728
|
+
.context-menu[data-v-88e42f18] {
|
|
1729
1729
|
background: var(--el-bg-color-overlay);
|
|
1730
1730
|
border: 1px solid var(--el-border-color-light);
|
|
1731
1731
|
border-radius: var(--el-border-radius-base);
|
|
@@ -1734,7 +1734,7 @@ label {
|
|
|
1734
1734
|
min-width: 140px;
|
|
1735
1735
|
overflow: hidden;
|
|
1736
1736
|
}
|
|
1737
|
-
.context-menu .context-menu-item[data-v-
|
|
1737
|
+
.context-menu .context-menu-item[data-v-88e42f18] {
|
|
1738
1738
|
display: flex;
|
|
1739
1739
|
align-items: center;
|
|
1740
1740
|
padding: 8px 16px;
|
|
@@ -1743,14 +1743,14 @@ label {
|
|
|
1743
1743
|
color: var(--el-text-color-primary);
|
|
1744
1744
|
transition: all 0.2s;
|
|
1745
1745
|
}
|
|
1746
|
-
.context-menu .context-menu-item[data-v-
|
|
1746
|
+
.context-menu .context-menu-item[data-v-88e42f18]:hover {
|
|
1747
1747
|
background-color: var(--el-fill-color-light);
|
|
1748
1748
|
color: var(--el-color-primary);
|
|
1749
1749
|
}
|
|
1750
|
-
.context-menu .context-menu-item:hover .el-icon[data-v-
|
|
1750
|
+
.context-menu .context-menu-item:hover .el-icon[data-v-88e42f18] {
|
|
1751
1751
|
color: var(--el-color-primary);
|
|
1752
1752
|
}
|
|
1753
|
-
.context-menu .context-menu-item .el-icon[data-v-
|
|
1753
|
+
.context-menu .context-menu-item .el-icon[data-v-88e42f18] {
|
|
1754
1754
|
margin-right: 8px;
|
|
1755
1755
|
font-size: 16px;
|
|
1756
1756
|
color: var(--el-text-color-secondary);
|