vue-openlayers-plugin 1.0.94 → 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.
- package/lib/{BasemapPanel-2db8ac45.mjs → BasemapPanel-da74ca3f.mjs} +1 -1
- package/lib/{CoordinateLocationDialog-966cbb7e.mjs → CoordinateLocationDialog-360b1eb4.mjs} +4 -5
- package/lib/{FilterPanel-df20f797.mjs → FilterPanel-20122101.mjs} +1 -1
- package/lib/{MapPrintDialog-4b3d5d88.mjs → LayerPanel-ec7ffab0.mjs} +1 -1
- package/lib/{LayerPanel-b5092abf.mjs → MapPrintDialog-74537e68.mjs} +1 -1
- package/lib/{MeasurementDialog-a3b2acf4.mjs → MeasurementDialog-25b82c2f.mjs} +29 -3
- package/lib/{MyMarkersDialog-663189c2.mjs → MyMarkersDialog-3dd0c4d4.mjs} +5 -6
- package/lib/{RegionNavigationDialog-b0b6f86b.mjs → RegionNavigationDialog-6c59ecf3.mjs} +4 -3
- package/lib/{ViewBookmarksDialog-513a3aa4.mjs → ViewBookmarksDialog-f45396f7.mjs} +5 -6
- package/lib/{index-bffe7847.mjs → index-09c5c4d4.mjs} +70 -29
- package/lib/{index-fe5a55ea.mjs → index-ab1630d8.mjs} +1 -1
- package/lib/{index-2d14dc18.mjs → index-bf4b15aa.mjs} +3 -4
- package/lib/{index.es-38d18d6e.mjs → index.es-19eef7b1.mjs} +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.umd.js +103 -41
- package/lib/style.css +45 -45
- package/package.json +1 -1
- package/types/index.d.ts +40 -0
- package/types/tsconfig.tsbuildinfo +1 -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 { l as layerEventBus, X, d as _export_sfc } from "./index-
|
|
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
|
|
2
|
-
import { i as aim_default, T as TooltipHelper, d as _export_sfc } from "./index-
|
|
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
|
-
|
|
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-
|
|
314
|
+
const CoordinateLocationDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2ba7b57a"]]);
|
|
316
315
|
export {
|
|
317
316
|
CoordinateLocationDialog as default
|
|
318
317
|
};
|
|
@@ -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-
|
|
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
|
-
|
|
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-
|
|
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,
|
|
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-
|
|
3
|
-
import { E as ElMessageBox } from "./index-
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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,
|
|
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-
|
|
3
|
-
import { E as ElMessageBox } from "./index-
|
|
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
|
-
|
|
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(
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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-
|
|
469423
|
-
basemap: () => import("./BasemapPanel-
|
|
469424
|
-
print: () => import("./MapPrintDialog-
|
|
469425
|
-
"layer-panel": () => import("./LayerPanel-
|
|
469426
|
-
coordinate: () => import("./CoordinateLocationDialog-
|
|
469427
|
-
"region-navigation": () => import("./RegionNavigationDialog-
|
|
469428
|
-
"my-markers": () => import("./MyMarkersDialog-
|
|
469429
|
-
"view-bookmarks": () => import("./ViewBookmarksDialog-
|
|
469430
|
-
"map-drawing": () => import("./index-
|
|
469431
|
-
"filter-panel": () => import("./FilterPanel-
|
|
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() {
|
|
@@ -469615,15 +469623,19 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
469615
469623
|
const styles = {};
|
|
469616
469624
|
if (props.leftOffset !== void 0) {
|
|
469617
469625
|
styles.left = typeof props.leftOffset === "number" ? `${props.leftOffset}px` : props.leftOffset;
|
|
469626
|
+
styles.right = "auto";
|
|
469618
469627
|
}
|
|
469619
469628
|
if (props.rightOffset !== void 0) {
|
|
469620
469629
|
styles.right = typeof props.rightOffset === "number" ? `${props.rightOffset}px` : props.rightOffset;
|
|
469630
|
+
styles.left = "auto";
|
|
469621
469631
|
}
|
|
469622
469632
|
if (props.topOffset !== void 0) {
|
|
469623
469633
|
styles.top = typeof props.topOffset === "number" ? `${props.topOffset}px` : props.topOffset;
|
|
469634
|
+
styles.bottom = "auto";
|
|
469624
469635
|
}
|
|
469625
469636
|
if (props.bottomOffset !== void 0) {
|
|
469626
469637
|
styles.bottom = typeof props.bottomOffset === "number" ? `${props.bottomOffset}px` : props.bottomOffset;
|
|
469638
|
+
styles.top = "auto";
|
|
469627
469639
|
}
|
|
469628
469640
|
return styles;
|
|
469629
469641
|
});
|
|
@@ -469826,7 +469838,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
469826
469838
|
}
|
|
469827
469839
|
return target;
|
|
469828
469840
|
};
|
|
469829
|
-
const OlDrawToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
469841
|
+
const OlDrawToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-55056d7b"]]);
|
|
469830
469842
|
const TIANDITU_CONFIG = {
|
|
469831
469843
|
baseUrl: "https://api.tianditu.gov.cn/v2/search",
|
|
469832
469844
|
key: "9a7244dd5d1a1299a52946a3d0f8ff68"
|
|
@@ -475649,8 +475661,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
475649
475661
|
const _component_el_button_group = resolveComponent("el-button-group");
|
|
475650
475662
|
const _component_el_card = resolveComponent("el-card");
|
|
475651
475663
|
const _component_el_row = resolveComponent("el-row");
|
|
475652
|
-
|
|
475653
|
-
return openBlock(), createBlock(_component_EPlusDialog, {
|
|
475664
|
+
return openBlock(), createBlock(unref(X$1), {
|
|
475654
475665
|
modelValue: dialogVisible.value,
|
|
475655
475666
|
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => dialogVisible.value = $event),
|
|
475656
475667
|
title: "地图打印",
|
|
@@ -476662,11 +476673,41 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
476662
476673
|
return true;
|
|
476663
476674
|
return props.showLayerPanel !== void 0 ? props.showLayerPanel : ((_b3 = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.layerPanel) == null ? void 0 : _b3.enabled) ?? false;
|
|
476664
476675
|
});
|
|
476676
|
+
const finalToolbarOffsets = computed(() => {
|
|
476677
|
+
var _a3;
|
|
476678
|
+
const config = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.showToolbar;
|
|
476679
|
+
const configObj = typeof config === "object" && config !== null ? config : void 0;
|
|
476680
|
+
const position2 = (configObj == null ? void 0 : configObj.position) ?? void 0;
|
|
476681
|
+
const defaultsByPosition = (() => {
|
|
476682
|
+
const topOffset = "20px";
|
|
476683
|
+
const sideOffset = "1%";
|
|
476684
|
+
switch (position2) {
|
|
476685
|
+
case "top-left":
|
|
476686
|
+
return { leftOffset: sideOffset, topOffset };
|
|
476687
|
+
case "top-right":
|
|
476688
|
+
return { rightOffset: sideOffset, topOffset };
|
|
476689
|
+
case "bottom-left":
|
|
476690
|
+
return { leftOffset: sideOffset, bottomOffset: topOffset };
|
|
476691
|
+
case "bottom-right":
|
|
476692
|
+
return { rightOffset: sideOffset, bottomOffset: topOffset };
|
|
476693
|
+
default:
|
|
476694
|
+
return {};
|
|
476695
|
+
}
|
|
476696
|
+
})();
|
|
476697
|
+
return {
|
|
476698
|
+
leftOffset: props.toolbarLeftOffset ?? (configObj == null ? void 0 : configObj.leftOffset) ?? defaultsByPosition.leftOffset,
|
|
476699
|
+
rightOffset: props.toolbarRightOffset ?? (configObj == null ? void 0 : configObj.rightOffset) ?? defaultsByPosition.rightOffset,
|
|
476700
|
+
topOffset: props.toolbarTopOffset ?? (configObj == null ? void 0 : configObj.topOffset) ?? defaultsByPosition.topOffset,
|
|
476701
|
+
bottomOffset: props.toolbarBottomOffset ?? (configObj == null ? void 0 : configObj.bottomOffset) ?? defaultsByPosition.bottomOffset
|
|
476702
|
+
};
|
|
476703
|
+
});
|
|
476665
476704
|
const finalShowToolbar = computed(() => {
|
|
476666
|
-
var _a3, _b3, _c2;
|
|
476705
|
+
var _a3, _b3, _c2, _d;
|
|
476667
476706
|
if (hasToolbarSlot.value)
|
|
476668
476707
|
return false;
|
|
476669
|
-
|
|
476708
|
+
const toolbarConfig = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.showToolbar;
|
|
476709
|
+
const toolbarEnabled = typeof toolbarConfig === "boolean" ? toolbarConfig : toolbarConfig == null ? void 0 : toolbarConfig.enabled;
|
|
476710
|
+
return props.showToolbar !== void 0 ? props.showToolbar : ((_b3 = finalMapConfig.value.ui) == null ? void 0 : _b3.showToolbar) ?? toolbarEnabled ?? ((_d = (_c2 = finalMapConfig.value.controls) == null ? void 0 : _c2.tools) == null ? void 0 : _d.showToolbar) ?? true;
|
|
476670
476711
|
});
|
|
476671
476712
|
computed(() => {
|
|
476672
476713
|
var _a3;
|
|
@@ -478016,10 +478057,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
478016
478057
|
ref_key: "mapToolbarRef",
|
|
478017
478058
|
ref: mapToolbarRef,
|
|
478018
478059
|
config: finalMapConfig.value,
|
|
478019
|
-
"left-offset":
|
|
478020
|
-
"right-offset":
|
|
478021
|
-
"top-offset":
|
|
478022
|
-
"bottom-offset":
|
|
478060
|
+
"left-offset": finalToolbarOffsets.value.leftOffset,
|
|
478061
|
+
"right-offset": finalToolbarOffsets.value.rightOffset,
|
|
478062
|
+
"top-offset": finalToolbarOffsets.value.topOffset,
|
|
478063
|
+
"bottom-offset": finalToolbarOffsets.value.bottomOffset,
|
|
478023
478064
|
onToolAction,
|
|
478024
478065
|
onShowLayerPanel
|
|
478025
478066
|
}, null, 8, ["config", "left-offset", "right-offset", "top-offset", "bottom-offset"])) : createCommentVNode("", true),
|
|
@@ -478176,7 +478217,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
478176
478217
|
};
|
|
478177
478218
|
}
|
|
478178
478219
|
});
|
|
478179
|
-
const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
478220
|
+
const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-178068e9"]]);
|
|
478180
478221
|
const _hoisted_1$1 = ["href"];
|
|
478181
478222
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
478182
478223
|
__name: "index",
|
|
@@ -490070,7 +490111,7 @@ function(t3) {
|
|
|
490070
490111
|
*/
|
|
490071
490112
|
function(t3) {
|
|
490072
490113
|
function e8() {
|
|
490073
|
-
return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-
|
|
490114
|
+
return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-19eef7b1.mjs")).catch(function(t4) {
|
|
490074
490115
|
return Promise.reject(new Error("Could not load canvg: " + t4));
|
|
490075
490116
|
}).then(function(t4) {
|
|
490076
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-
|
|
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-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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-
|
|
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 {
|