vue-openlayers-plugin 1.0.93 → 1.0.95
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-ed3aedc9.mjs → BasemapPanel-b2f3c233.mjs} +1 -1
- package/lib/{CoordinateLocationDialog-1b493dd9.mjs → CoordinateLocationDialog-2b78790d.mjs} +1 -1
- package/lib/{FilterPanel-a5f38164.mjs → FilterPanel-76134c1a.mjs} +1 -1
- package/lib/{MapPrintDialog-ce441446.mjs → LayerPanel-a95b2745.mjs} +1 -1
- package/lib/{LayerPanel-fd86591b.mjs → MapPrintDialog-289cbd66.mjs} +1 -1
- package/lib/{MeasurementDialog-901a569f.mjs → MeasurementDialog-a3b58205.mjs} +1 -1
- package/lib/{MyMarkersDialog-c0883329.mjs → MyMarkersDialog-4f5f6125.mjs} +2 -2
- package/lib/{ViewBookmarksDialog-9f767176.mjs → ViewBookmarksDialog-d7727543.mjs} +2 -2
- package/lib/{index-bc98d31c.mjs → index-351de771.mjs} +52 -19
- package/lib/{index-915b9f4d.mjs → index-6f05b5ce.mjs} +1 -1
- package/lib/{index-3dc1ae8a.mjs → index-86518558.mjs} +1 -1
- package/lib/{index.es-31d767d5.mjs → index.es-bd2c0792.mjs} +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.umd.js +44 -11
- package/lib/style.css +24 -8
- 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-351de771.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
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-
|
|
2
|
+
import { i as aim_default, T as TooltipHelper, d as _export_sfc } from "./index-351de771.mjs";
|
|
3
3
|
import "ol";
|
|
4
4
|
const _hoisted_1 = { class: "coordinate-content" };
|
|
5
5
|
const _hoisted_2 = { class: "format-selection" };
|
|
@@ -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, g as getUnitByType, d as _export_sfc } from "./index-
|
|
2
|
+
import { X, f as formatMeasurementResult, g as getUnitByType, d as _export_sfc } from "./index-351de771.mjs";
|
|
3
3
|
import "ol";
|
|
4
4
|
const createSvgIcon = (content, viewBox = "0 0 24 24", fill = "currentColor", stroke = "none", strokeWidth = "0") => {
|
|
5
5
|
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>`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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-
|
|
3
|
-
import { E as ElMessageBox } from "./index-
|
|
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";
|
|
4
4
|
import "ol";
|
|
5
5
|
const _hoisted_1 = { class: "markers-content" };
|
|
6
6
|
const _hoisted_2 = { class: "toolbar" };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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-
|
|
3
|
-
import { E as ElMessageBox } from "./index-
|
|
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";
|
|
4
4
|
import "ol";
|
|
5
5
|
const _hoisted_1 = { class: "bookmarks-content" };
|
|
6
6
|
const _hoisted_2 = { class: "toolbar" };
|
|
@@ -469419,16 +469419,16 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
469419
469419
|
}
|
|
469420
469420
|
});
|
|
469421
469421
|
const defaultComponents = {
|
|
469422
|
-
measurement: () => import("./MeasurementDialog-
|
|
469423
|
-
basemap: () => import("./BasemapPanel-
|
|
469424
|
-
print: () => import("./MapPrintDialog-
|
|
469425
|
-
"layer-panel": () => import("./LayerPanel-
|
|
469426
|
-
coordinate: () => import("./CoordinateLocationDialog-
|
|
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
469427
|
"region-navigation": () => import("./RegionNavigationDialog-b0b6f86b.mjs"),
|
|
469428
|
-
"my-markers": () => import("./MyMarkersDialog-
|
|
469429
|
-
"view-bookmarks": () => import("./ViewBookmarksDialog-
|
|
469430
|
-
"map-drawing": () => import("./index-
|
|
469431
|
-
"filter-panel": () => import("./FilterPanel-
|
|
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")
|
|
469432
469432
|
};
|
|
469433
469433
|
const _DialogRegistry = class _DialogRegistry {
|
|
469434
469434
|
constructor() {
|
|
@@ -469611,20 +469611,23 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
469611
469611
|
emits: ["tool-action", "mouse-state-change", "show-layer-panel"],
|
|
469612
469612
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
469613
469613
|
const props = __props;
|
|
469614
|
-
dialogManager.getAllStates();
|
|
469615
469614
|
const customPositionStyles = computed(() => {
|
|
469616
469615
|
const styles = {};
|
|
469617
469616
|
if (props.leftOffset !== void 0) {
|
|
469618
469617
|
styles.left = typeof props.leftOffset === "number" ? `${props.leftOffset}px` : props.leftOffset;
|
|
469618
|
+
styles.right = "auto";
|
|
469619
469619
|
}
|
|
469620
469620
|
if (props.rightOffset !== void 0) {
|
|
469621
469621
|
styles.right = typeof props.rightOffset === "number" ? `${props.rightOffset}px` : props.rightOffset;
|
|
469622
|
+
styles.left = "auto";
|
|
469622
469623
|
}
|
|
469623
469624
|
if (props.topOffset !== void 0) {
|
|
469624
469625
|
styles.top = typeof props.topOffset === "number" ? `${props.topOffset}px` : props.topOffset;
|
|
469626
|
+
styles.bottom = "auto";
|
|
469625
469627
|
}
|
|
469626
469628
|
if (props.bottomOffset !== void 0) {
|
|
469627
469629
|
styles.bottom = typeof props.bottomOffset === "number" ? `${props.bottomOffset}px` : props.bottomOffset;
|
|
469630
|
+
styles.top = "auto";
|
|
469628
469631
|
}
|
|
469629
469632
|
return styles;
|
|
469630
469633
|
});
|
|
@@ -469827,7 +469830,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
469827
469830
|
}
|
|
469828
469831
|
return target;
|
|
469829
469832
|
};
|
|
469830
|
-
const OlDrawToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-
|
|
469833
|
+
const OlDrawToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-55056d7b"]]);
|
|
469831
469834
|
const TIANDITU_CONFIG = {
|
|
469832
469835
|
baseUrl: "https://api.tianditu.gov.cn/v2/search",
|
|
469833
469836
|
key: "9a7244dd5d1a1299a52946a3d0f8ff68"
|
|
@@ -476663,11 +476666,41 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
476663
476666
|
return true;
|
|
476664
476667
|
return props.showLayerPanel !== void 0 ? props.showLayerPanel : ((_b3 = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.layerPanel) == null ? void 0 : _b3.enabled) ?? false;
|
|
476665
476668
|
});
|
|
476666
|
-
const
|
|
476669
|
+
const finalToolbarOffsets = computed(() => {
|
|
476667
476670
|
var _a3;
|
|
476671
|
+
const config = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.showToolbar;
|
|
476672
|
+
const configObj = typeof config === "object" && config !== null ? config : void 0;
|
|
476673
|
+
const position2 = (configObj == null ? void 0 : configObj.position) ?? void 0;
|
|
476674
|
+
const defaultsByPosition = (() => {
|
|
476675
|
+
const topOffset = "20px";
|
|
476676
|
+
const sideOffset = "1%";
|
|
476677
|
+
switch (position2) {
|
|
476678
|
+
case "top-left":
|
|
476679
|
+
return { leftOffset: sideOffset, topOffset };
|
|
476680
|
+
case "top-right":
|
|
476681
|
+
return { rightOffset: sideOffset, topOffset };
|
|
476682
|
+
case "bottom-left":
|
|
476683
|
+
return { leftOffset: sideOffset, bottomOffset: topOffset };
|
|
476684
|
+
case "bottom-right":
|
|
476685
|
+
return { rightOffset: sideOffset, bottomOffset: topOffset };
|
|
476686
|
+
default:
|
|
476687
|
+
return {};
|
|
476688
|
+
}
|
|
476689
|
+
})();
|
|
476690
|
+
return {
|
|
476691
|
+
leftOffset: props.toolbarLeftOffset ?? (configObj == null ? void 0 : configObj.leftOffset) ?? defaultsByPosition.leftOffset,
|
|
476692
|
+
rightOffset: props.toolbarRightOffset ?? (configObj == null ? void 0 : configObj.rightOffset) ?? defaultsByPosition.rightOffset,
|
|
476693
|
+
topOffset: props.toolbarTopOffset ?? (configObj == null ? void 0 : configObj.topOffset) ?? defaultsByPosition.topOffset,
|
|
476694
|
+
bottomOffset: props.toolbarBottomOffset ?? (configObj == null ? void 0 : configObj.bottomOffset) ?? defaultsByPosition.bottomOffset
|
|
476695
|
+
};
|
|
476696
|
+
});
|
|
476697
|
+
const finalShowToolbar = computed(() => {
|
|
476698
|
+
var _a3, _b3, _c2, _d;
|
|
476668
476699
|
if (hasToolbarSlot.value)
|
|
476669
476700
|
return false;
|
|
476670
|
-
|
|
476701
|
+
const toolbarConfig = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.showToolbar;
|
|
476702
|
+
const toolbarEnabled = typeof toolbarConfig === "boolean" ? toolbarConfig : toolbarConfig == null ? void 0 : toolbarConfig.enabled;
|
|
476703
|
+
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;
|
|
476671
476704
|
});
|
|
476672
476705
|
computed(() => {
|
|
476673
476706
|
var _a3;
|
|
@@ -478017,10 +478050,10 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
478017
478050
|
ref_key: "mapToolbarRef",
|
|
478018
478051
|
ref: mapToolbarRef,
|
|
478019
478052
|
config: finalMapConfig.value,
|
|
478020
|
-
"left-offset":
|
|
478021
|
-
"right-offset":
|
|
478022
|
-
"top-offset":
|
|
478023
|
-
"bottom-offset":
|
|
478053
|
+
"left-offset": finalToolbarOffsets.value.leftOffset,
|
|
478054
|
+
"right-offset": finalToolbarOffsets.value.rightOffset,
|
|
478055
|
+
"top-offset": finalToolbarOffsets.value.topOffset,
|
|
478056
|
+
"bottom-offset": finalToolbarOffsets.value.bottomOffset,
|
|
478024
478057
|
onToolAction,
|
|
478025
478058
|
onShowLayerPanel
|
|
478026
478059
|
}, null, 8, ["config", "left-offset", "right-offset", "top-offset", "bottom-offset"])) : createCommentVNode("", true),
|
|
@@ -478177,7 +478210,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
478177
478210
|
};
|
|
478178
478211
|
}
|
|
478179
478212
|
});
|
|
478180
|
-
const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
478213
|
+
const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-178068e9"]]);
|
|
478181
478214
|
const _hoisted_1$1 = ["href"];
|
|
478182
478215
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
478183
478216
|
__name: "index",
|
|
@@ -490071,7 +490104,7 @@ function(t3) {
|
|
|
490071
490104
|
*/
|
|
490072
490105
|
function(t3) {
|
|
490073
490106
|
function e8() {
|
|
490074
|
-
return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-
|
|
490107
|
+
return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-bd2c0792.mjs")).catch(function(t4) {
|
|
490075
490108
|
return Promise.reject(new Error("Could not load canvg: " + t4));
|
|
490076
490109
|
}).then(function(t4) {
|
|
490077
490110
|
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-351de771.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 } from "./index-351de771.mjs";
|
|
3
3
|
import "ol";
|
|
4
4
|
const icons = {
|
|
5
5
|
pointMarker: "/icons/point.png",
|
|
@@ -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-351de771.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-351de771.mjs";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "ol";
|
|
4
4
|
export {
|
package/lib/index.umd.js
CHANGED
|
@@ -471145,20 +471145,23 @@ ${this.attributes_.map(
|
|
|
471145
471145
|
emits: ["tool-action", "mouse-state-change", "show-layer-panel"],
|
|
471146
471146
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
471147
471147
|
const props = __props;
|
|
471148
|
-
dialogManager.getAllStates();
|
|
471149
471148
|
const customPositionStyles = vue.computed(() => {
|
|
471150
471149
|
const styles = {};
|
|
471151
471150
|
if (props.leftOffset !== void 0) {
|
|
471152
471151
|
styles.left = typeof props.leftOffset === "number" ? `${props.leftOffset}px` : props.leftOffset;
|
|
471152
|
+
styles.right = "auto";
|
|
471153
471153
|
}
|
|
471154
471154
|
if (props.rightOffset !== void 0) {
|
|
471155
471155
|
styles.right = typeof props.rightOffset === "number" ? `${props.rightOffset}px` : props.rightOffset;
|
|
471156
|
+
styles.left = "auto";
|
|
471156
471157
|
}
|
|
471157
471158
|
if (props.topOffset !== void 0) {
|
|
471158
471159
|
styles.top = typeof props.topOffset === "number" ? `${props.topOffset}px` : props.topOffset;
|
|
471160
|
+
styles.bottom = "auto";
|
|
471159
471161
|
}
|
|
471160
471162
|
if (props.bottomOffset !== void 0) {
|
|
471161
471163
|
styles.bottom = typeof props.bottomOffset === "number" ? `${props.bottomOffset}px` : props.bottomOffset;
|
|
471164
|
+
styles.top = "auto";
|
|
471162
471165
|
}
|
|
471163
471166
|
return styles;
|
|
471164
471167
|
});
|
|
@@ -471354,7 +471357,7 @@ ${this.attributes_.map(
|
|
|
471354
471357
|
};
|
|
471355
471358
|
}
|
|
471356
471359
|
});
|
|
471357
|
-
const
|
|
471360
|
+
const OlDrawToolbar_vue_vue_type_style_index_0_scoped_55056d7b_lang = "";
|
|
471358
471361
|
const _export_sfc = (sfc, props) => {
|
|
471359
471362
|
const target = sfc.__vccOpts || sfc;
|
|
471360
471363
|
for (const [key2, val] of props) {
|
|
@@ -471362,7 +471365,7 @@ ${this.attributes_.map(
|
|
|
471362
471365
|
}
|
|
471363
471366
|
return target;
|
|
471364
471367
|
};
|
|
471365
|
-
const OlDrawToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-
|
|
471368
|
+
const OlDrawToolbar = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-55056d7b"]]);
|
|
471366
471369
|
const TIANDITU_CONFIG = {
|
|
471367
471370
|
baseUrl: "https://api.tianditu.gov.cn/v2/search",
|
|
471368
471371
|
key: "9a7244dd5d1a1299a52946a3d0f8ff68"
|
|
@@ -478212,11 +478215,41 @@ ${this.attributes_.map(
|
|
|
478212
478215
|
return true;
|
|
478213
478216
|
return props.showLayerPanel !== void 0 ? props.showLayerPanel : ((_b3 = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.layerPanel) == null ? void 0 : _b3.enabled) ?? false;
|
|
478214
478217
|
});
|
|
478215
|
-
const
|
|
478218
|
+
const finalToolbarOffsets = vue.computed(() => {
|
|
478216
478219
|
var _a3;
|
|
478220
|
+
const config = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.showToolbar;
|
|
478221
|
+
const configObj = typeof config === "object" && config !== null ? config : void 0;
|
|
478222
|
+
const position2 = (configObj == null ? void 0 : configObj.position) ?? void 0;
|
|
478223
|
+
const defaultsByPosition = (() => {
|
|
478224
|
+
const topOffset = "20px";
|
|
478225
|
+
const sideOffset = "1%";
|
|
478226
|
+
switch (position2) {
|
|
478227
|
+
case "top-left":
|
|
478228
|
+
return { leftOffset: sideOffset, topOffset };
|
|
478229
|
+
case "top-right":
|
|
478230
|
+
return { rightOffset: sideOffset, topOffset };
|
|
478231
|
+
case "bottom-left":
|
|
478232
|
+
return { leftOffset: sideOffset, bottomOffset: topOffset };
|
|
478233
|
+
case "bottom-right":
|
|
478234
|
+
return { rightOffset: sideOffset, bottomOffset: topOffset };
|
|
478235
|
+
default:
|
|
478236
|
+
return {};
|
|
478237
|
+
}
|
|
478238
|
+
})();
|
|
478239
|
+
return {
|
|
478240
|
+
leftOffset: props.toolbarLeftOffset ?? (configObj == null ? void 0 : configObj.leftOffset) ?? defaultsByPosition.leftOffset,
|
|
478241
|
+
rightOffset: props.toolbarRightOffset ?? (configObj == null ? void 0 : configObj.rightOffset) ?? defaultsByPosition.rightOffset,
|
|
478242
|
+
topOffset: props.toolbarTopOffset ?? (configObj == null ? void 0 : configObj.topOffset) ?? defaultsByPosition.topOffset,
|
|
478243
|
+
bottomOffset: props.toolbarBottomOffset ?? (configObj == null ? void 0 : configObj.bottomOffset) ?? defaultsByPosition.bottomOffset
|
|
478244
|
+
};
|
|
478245
|
+
});
|
|
478246
|
+
const finalShowToolbar = vue.computed(() => {
|
|
478247
|
+
var _a3, _b3, _c2, _d;
|
|
478217
478248
|
if (hasToolbarSlot.value)
|
|
478218
478249
|
return false;
|
|
478219
|
-
|
|
478250
|
+
const toolbarConfig = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.showToolbar;
|
|
478251
|
+
const toolbarEnabled = typeof toolbarConfig === "boolean" ? toolbarConfig : toolbarConfig == null ? void 0 : toolbarConfig.enabled;
|
|
478252
|
+
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;
|
|
478220
478253
|
});
|
|
478221
478254
|
vue.computed(() => {
|
|
478222
478255
|
var _a3;
|
|
@@ -479566,10 +479599,10 @@ ${this.attributes_.map(
|
|
|
479566
479599
|
ref_key: "mapToolbarRef",
|
|
479567
479600
|
ref: mapToolbarRef,
|
|
479568
479601
|
config: finalMapConfig.value,
|
|
479569
|
-
"left-offset":
|
|
479570
|
-
"right-offset":
|
|
479571
|
-
"top-offset":
|
|
479572
|
-
"bottom-offset":
|
|
479602
|
+
"left-offset": finalToolbarOffsets.value.leftOffset,
|
|
479603
|
+
"right-offset": finalToolbarOffsets.value.rightOffset,
|
|
479604
|
+
"top-offset": finalToolbarOffsets.value.topOffset,
|
|
479605
|
+
"bottom-offset": finalToolbarOffsets.value.bottomOffset,
|
|
479573
479606
|
onToolAction,
|
|
479574
479607
|
onShowLayerPanel
|
|
479575
479608
|
}, null, 8, ["config", "left-offset", "right-offset", "top-offset", "bottom-offset"])) : vue.createCommentVNode("", true),
|
|
@@ -479726,8 +479759,8 @@ ${this.attributes_.map(
|
|
|
479726
479759
|
};
|
|
479727
479760
|
}
|
|
479728
479761
|
});
|
|
479729
|
-
const
|
|
479730
|
-
const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
479762
|
+
const OlMap_vue_vue_type_style_index_0_scoped_178068e9_lang = "";
|
|
479763
|
+
const OlMap = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-178068e9"]]);
|
|
479731
479764
|
const _hoisted_1$a = ["href"];
|
|
479732
479765
|
const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
|
|
479733
479766
|
__name: "index",
|
package/lib/style.css
CHANGED
|
@@ -685,13 +685,29 @@
|
|
|
685
685
|
text-align: center;
|
|
686
686
|
backdrop-filter: blur(4px);
|
|
687
687
|
}
|
|
688
|
-
.map-toolbar[data-v-
|
|
688
|
+
.map-toolbar[data-v-55056d7b] {
|
|
689
689
|
position: absolute;
|
|
690
690
|
top: 20px;
|
|
691
691
|
right: 1%;
|
|
692
|
-
z-index:
|
|
692
|
+
z-index: 3000;
|
|
693
|
+
height: 32px;
|
|
694
|
+
}
|
|
695
|
+
.map-toolbar[data-v-55056d7b] .el-menu--horizontal {
|
|
696
|
+
height: 100% !important;
|
|
697
|
+
}
|
|
698
|
+
.map-toolbar .toolbar-menu[data-v-55056d7b] {
|
|
699
|
+
background: rgba(255, 255, 255, 0.9);
|
|
700
|
+
backdrop-filter: blur(10px);
|
|
701
|
+
border-radius: 4px;
|
|
702
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
703
|
+
}
|
|
704
|
+
.map-toolbar .main-menu-item[data-v-55056d7b] {
|
|
705
|
+
transition: all 0.3s ease;
|
|
706
|
+
}
|
|
707
|
+
.map-toolbar .main-menu-item[data-v-55056d7b]:hover {
|
|
708
|
+
background-color: rgba(64, 158, 255, 0.1);
|
|
693
709
|
}
|
|
694
|
-
.map-toolbar[data-v-
|
|
710
|
+
.map-toolbar[data-v-55056d7b]:hover {
|
|
695
711
|
box-shadow: var(--el-box-shadow);
|
|
696
712
|
border-color: var(--el-border-color-hover);
|
|
697
713
|
}.map-search-container {
|
|
@@ -1668,7 +1684,7 @@ label {
|
|
|
1668
1684
|
width: 100% !important;
|
|
1669
1685
|
height: 100% !important;
|
|
1670
1686
|
}
|
|
1671
|
-
.context-menu[data-v-
|
|
1687
|
+
.context-menu[data-v-178068e9] {
|
|
1672
1688
|
background: var(--el-bg-color-overlay);
|
|
1673
1689
|
border: 1px solid var(--el-border-color-light);
|
|
1674
1690
|
border-radius: var(--el-border-radius-base);
|
|
@@ -1677,7 +1693,7 @@ label {
|
|
|
1677
1693
|
min-width: 140px;
|
|
1678
1694
|
overflow: hidden;
|
|
1679
1695
|
}
|
|
1680
|
-
.context-menu .context-menu-item[data-v-
|
|
1696
|
+
.context-menu .context-menu-item[data-v-178068e9] {
|
|
1681
1697
|
display: flex;
|
|
1682
1698
|
align-items: center;
|
|
1683
1699
|
padding: 8px 16px;
|
|
@@ -1686,14 +1702,14 @@ label {
|
|
|
1686
1702
|
color: var(--el-text-color-primary);
|
|
1687
1703
|
transition: all 0.2s;
|
|
1688
1704
|
}
|
|
1689
|
-
.context-menu .context-menu-item[data-v-
|
|
1705
|
+
.context-menu .context-menu-item[data-v-178068e9]:hover {
|
|
1690
1706
|
background-color: var(--el-fill-color-light);
|
|
1691
1707
|
color: var(--el-color-primary);
|
|
1692
1708
|
}
|
|
1693
|
-
.context-menu .context-menu-item:hover .el-icon[data-v-
|
|
1709
|
+
.context-menu .context-menu-item:hover .el-icon[data-v-178068e9] {
|
|
1694
1710
|
color: var(--el-color-primary);
|
|
1695
1711
|
}
|
|
1696
|
-
.context-menu .context-menu-item .el-icon[data-v-
|
|
1712
|
+
.context-menu .context-menu-item .el-icon[data-v-178068e9] {
|
|
1697
1713
|
margin-right: 8px;
|
|
1698
1714
|
font-size: 16px;
|
|
1699
1715
|
color: var(--el-text-color-secondary);
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
1
2
|
import { ColorLike } from 'ol/colorlike';
|
|
2
3
|
import { Component } from 'vue';
|
|
3
4
|
import { Coordinate } from 'ol/coordinate';
|
|
@@ -16,6 +17,7 @@ import { Layer } from 'ol/layer';
|
|
|
16
17
|
import { Map as Map_2 } from 'ol';
|
|
17
18
|
import { MapManager as MapManager_2 } from '../utils/mapManager';
|
|
18
19
|
import { Pixel } from 'ol/pixel';
|
|
20
|
+
import { Plugin as Plugin_2 } from 'vue';
|
|
19
21
|
import { Source } from 'ol/source';
|
|
20
22
|
import { Style } from 'ol/style';
|
|
21
23
|
import { UrlFunction } from 'ol/Tile';
|
|
@@ -512,17 +514,31 @@ export declare interface CustomApiConfig {
|
|
|
512
514
|
responseInterceptor?: (response: any) => any;
|
|
513
515
|
}
|
|
514
516
|
|
|
517
|
+
export declare const CustomDialog: Component;
|
|
518
|
+
|
|
515
519
|
export declare interface CustomFilterConfig extends LayerFilter {
|
|
516
520
|
type: FilterType.CUSTOM;
|
|
517
521
|
filterFunction: (feature: any) => boolean;
|
|
518
522
|
}
|
|
519
523
|
|
|
524
|
+
export declare const CustomOpenlayer: Component;
|
|
525
|
+
|
|
520
526
|
declare interface CustomPopupConfig extends BasePopupConfig {
|
|
521
527
|
type: "custom";
|
|
522
528
|
component: any;
|
|
523
529
|
props?: Record<string, any> | ((feature: Feature | undefined, coordinate: Coordinate) => Record<string, any>);
|
|
524
530
|
}
|
|
525
531
|
|
|
532
|
+
declare const _default: Plugin_2 & {
|
|
533
|
+
install: typeof install;
|
|
534
|
+
OlMap: typeof OlMap;
|
|
535
|
+
CustomOpenlayer: typeof CustomOpenlayer;
|
|
536
|
+
CustomDialog: typeof CustomDialog;
|
|
537
|
+
EPlusDialog: typeof EPlusDialog;
|
|
538
|
+
SvgIcon: typeof SvgIcon;
|
|
539
|
+
};
|
|
540
|
+
export default _default;
|
|
541
|
+
|
|
526
542
|
export declare type Drawing = PointDrawing | TextDrawing | PointWithTextDrawing | IconDrawing | LineDrawing | PolygonDrawing | MultiPolygonDrawing | MultiPointDrawing | MultiLineStringDrawing | ImageDrawing | MilitaryDrawing;
|
|
527
543
|
|
|
528
544
|
/**
|
|
@@ -1228,6 +1244,8 @@ export declare class DrawingUtils {
|
|
|
1228
1244
|
static addOpacityToColor(color: string, opacity: number): string;
|
|
1229
1245
|
}
|
|
1230
1246
|
|
|
1247
|
+
export declare const EPlusDialog: unknown;
|
|
1248
|
+
|
|
1231
1249
|
declare class EventManager {
|
|
1232
1250
|
private map;
|
|
1233
1251
|
private layerManager;
|
|
@@ -2166,6 +2184,8 @@ export declare interface ImageStyleConfig extends DrawingStyleConfig {
|
|
|
2166
2184
|
maintainAspectRatio?: boolean;
|
|
2167
2185
|
}
|
|
2168
2186
|
|
|
2187
|
+
export declare const install: (app: App) => void;
|
|
2188
|
+
|
|
2169
2189
|
/**
|
|
2170
2190
|
* 点样式配置
|
|
2171
2191
|
*/
|
|
@@ -5175,6 +5195,22 @@ export declare interface MultiPolygonStyleConfig extends DrawingStyleConfig {
|
|
|
5175
5195
|
indexColor?: string;
|
|
5176
5196
|
}
|
|
5177
5197
|
|
|
5198
|
+
export declare const OlBaseLayerSwitcher: Component;
|
|
5199
|
+
|
|
5200
|
+
export declare const OlControlPanel: Component;
|
|
5201
|
+
|
|
5202
|
+
export declare const OlDrawToolbar: Component;
|
|
5203
|
+
|
|
5204
|
+
export declare const OlLegendPanel: Component;
|
|
5205
|
+
|
|
5206
|
+
export declare const OlMap: Component;
|
|
5207
|
+
|
|
5208
|
+
export declare const OlMapContainer: Component;
|
|
5209
|
+
|
|
5210
|
+
export declare const OlMapSearch: Component;
|
|
5211
|
+
|
|
5212
|
+
export declare const OlMapTooltip: Component;
|
|
5213
|
+
|
|
5178
5214
|
export declare type OpenLayersConfig = MapConfig;
|
|
5179
5215
|
|
|
5180
5216
|
export declare interface PluginAnimation {
|
|
@@ -6241,6 +6277,8 @@ export declare enum SpatialFilterType {
|
|
|
6241
6277
|
DISJOINT = "disjoint"
|
|
6242
6278
|
}
|
|
6243
6279
|
|
|
6280
|
+
export declare const SvgIcon: Component;
|
|
6281
|
+
|
|
6244
6282
|
/**
|
|
6245
6283
|
* 文字标绘类
|
|
6246
6284
|
* 专门用于在地图上绘制文字标注,支持丰富的文字样式和效果
|
|
@@ -6607,6 +6645,8 @@ export declare class VectorTileLayerHandler extends BaseLayer {
|
|
|
6607
6645
|
getFeatureProperties(): Record<string, any>[];
|
|
6608
6646
|
}
|
|
6609
6647
|
|
|
6648
|
+
export declare const version: string;
|
|
6649
|
+
|
|
6610
6650
|
export declare type WFSRequestFilter = {
|
|
6611
6651
|
type: 'equalTo' | 'like';
|
|
6612
6652
|
property: string;
|