vue-openlayers-plugin 1.0.56 → 1.0.57
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/{index-a4ec7e53.mjs → index-799a4733.mjs} +172 -52
- package/lib/{index.es-1ed309bd.mjs → index.es-6d89f2cf.mjs} +1 -1
- package/lib/index.esm.js +1 -1
- package/lib/index.umd.js +172 -52
- package/lib/style.css +40 -40
- package/package.json +1 -1
- package/types/src/components/CustomOpenlayer/components/dialogs/LayerPanel.vue.d.ts +504 -2
- package/types/src/components/CustomOpenlayer/components/dialogs/LayerPanel.vue.d.ts.map +1 -1
- package/types/src/components/CustomOpenlayer/types/index.d.ts +48 -2
- package/types/src/components/CustomOpenlayer/types/index.d.ts.map +1 -1
- package/types/src/components/CustomOpenlayer/utils/configLoader.d.ts.map +1 -1
|
@@ -4,7 +4,7 @@ var __publicField = (obj, key, value) => {
|
|
|
4
4
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
return value;
|
|
6
6
|
};
|
|
7
|
-
import { getCurrentInstance, inject, ref, computed, unref, getCurrentScope, onScopeDispose, shallowRef, watchEffect, readonly, onMounted, nextTick, watch, isRef, warn as warn$3, provide, defineComponent, openBlock, createElementBlock, mergeProps, renderSlot, createElementVNode, toRef, onUnmounted, useAttrs as useAttrs$1, useSlots, normalizeClass, normalizeStyle as normalizeStyle$1, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, toDisplayString, onBeforeUnmount, createVNode as createVNode$1, Transition, withDirectives, createTextVNode, vShow, Text as Text$6, reactive, h as h$4, shallowReactive, isVNode, render as render$3, markRaw, toRefs, resolveComponent, withKeys, renderList, createApp, resolveDirective, Teleport } from "vue";
|
|
7
|
+
import { getCurrentInstance, inject, ref, computed, unref, getCurrentScope, onScopeDispose, shallowRef, watchEffect, readonly, onMounted, nextTick, watch, isRef, warn as warn$3, provide, defineComponent, openBlock, createElementBlock, mergeProps, renderSlot, createElementVNode, toRef, onUnmounted, useAttrs as useAttrs$1, useSlots, normalizeClass, normalizeStyle as normalizeStyle$1, createCommentVNode, Fragment, createBlock, withCtx, resolveDynamicComponent, withModifiers, toDisplayString, onBeforeUnmount, createVNode as createVNode$1, Transition, withDirectives, createTextVNode, vShow, Text as Text$6, reactive, h as h$4, shallowReactive, isVNode, render as render$3, markRaw, toRefs, resolveComponent, withKeys, renderList, createApp, resolveDirective, Teleport, createSlots, normalizeProps, guardReactiveProps } from "vue";
|
|
8
8
|
import { Feature as Feature$6, Map as Map$8 } from "ol";
|
|
9
9
|
function _mergeNamespaces(n2, m2) {
|
|
10
10
|
for (var i = 0; i < m2.length; i++) {
|
|
@@ -478890,7 +478890,22 @@ class ConfigLoader {
|
|
|
478890
478890
|
fullScreen: false,
|
|
478891
478891
|
scaleLine: true,
|
|
478892
478892
|
mousePosition: false,
|
|
478893
|
-
overviewMap: false
|
|
478893
|
+
overviewMap: false,
|
|
478894
|
+
layerPanel: {
|
|
478895
|
+
enabled: true,
|
|
478896
|
+
defaultOpen: false,
|
|
478897
|
+
position: "right",
|
|
478898
|
+
title: "图层管理",
|
|
478899
|
+
width: "350px",
|
|
478900
|
+
height: "600px",
|
|
478901
|
+
modal: false,
|
|
478902
|
+
draggable: true,
|
|
478903
|
+
resizable: true,
|
|
478904
|
+
showClose: true,
|
|
478905
|
+
cacheId: "layer-dialog",
|
|
478906
|
+
className: "layer-dialog",
|
|
478907
|
+
collapsible: true
|
|
478908
|
+
}
|
|
478894
478909
|
},
|
|
478895
478910
|
baseLayers: [
|
|
478896
478911
|
{
|
|
@@ -480159,8 +480174,18 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
480159
480174
|
const layerTreeManager = new LayerTreeManager();
|
|
480160
480175
|
const layerConfigManager = new LayerConfigManager();
|
|
480161
480176
|
const defaultExpandedKeys = computed(() => layerTreeManager.defaultExpandedKeys.value);
|
|
480162
|
-
const defaultCheckedKeys =
|
|
480163
|
-
const treeData =
|
|
480177
|
+
const defaultCheckedKeys = ref([]);
|
|
480178
|
+
const treeData = ref([]);
|
|
480179
|
+
onMounted(() => {
|
|
480180
|
+
try {
|
|
480181
|
+
defaultCheckedKeys.value = Array.isArray(layerTreeManager.defaultCheckedKeys.value) ? [...layerTreeManager.defaultCheckedKeys.value] : [];
|
|
480182
|
+
const source = layerTreeManager.treeData.value;
|
|
480183
|
+
treeData.value = source ? JSON.parse(JSON.stringify(source)) : [];
|
|
480184
|
+
} catch (e8) {
|
|
480185
|
+
defaultCheckedKeys.value = layerTreeManager.defaultCheckedKeys.value || [];
|
|
480186
|
+
treeData.value = layerTreeManager.treeData.value || [];
|
|
480187
|
+
}
|
|
480188
|
+
});
|
|
480164
480189
|
const handleLayerDoubleClick = (data) => {
|
|
480165
480190
|
layerTreeManager.handleLayerDoubleClick(data, layerManager.value, map2.value);
|
|
480166
480191
|
};
|
|
@@ -480271,6 +480296,22 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
480271
480296
|
inject("eventBus");
|
|
480272
480297
|
inject("storage");
|
|
480273
480298
|
const mapManager = inject("mapManager");
|
|
480299
|
+
const dialogProps = computed(() => {
|
|
480300
|
+
var _a3;
|
|
480301
|
+
const ui2 = ((_a3 = config == null ? void 0 : config.value) == null ? void 0 : _a3.ui) || {};
|
|
480302
|
+
return {
|
|
480303
|
+
title: ui2.title ?? "图层管理",
|
|
480304
|
+
width: ui2.width ?? "350px",
|
|
480305
|
+
height: ui2.height ?? "600px",
|
|
480306
|
+
modal: ui2.modal ?? false,
|
|
480307
|
+
draggable: ui2.draggable ?? true,
|
|
480308
|
+
resizable: ui2.resizable ?? true,
|
|
480309
|
+
showClose: ui2.showClose ?? true,
|
|
480310
|
+
position: ui2.position ?? "right",
|
|
480311
|
+
cacheId: ui2.cacheId ?? "layer-dialog",
|
|
480312
|
+
className: ui2.className ?? "layer-dialog"
|
|
480313
|
+
};
|
|
480314
|
+
});
|
|
480274
480315
|
watch(config, (newConfig) => {
|
|
480275
480316
|
var _a3, _b3, _c2;
|
|
480276
480317
|
console.log("🔍 [LayerPanel] config变化:", newConfig);
|
|
@@ -480526,11 +480567,33 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
480526
480567
|
treeRef.value.setCheckedKeys(checkedKeys);
|
|
480527
480568
|
}
|
|
480528
480569
|
};
|
|
480570
|
+
const hasTreeSnapshot = ref(false);
|
|
480571
|
+
const expectedLayerCount = computed(() => {
|
|
480572
|
+
var _a3, _b3, _c2;
|
|
480573
|
+
const c2 = (config == null ? void 0 : config.value) || {};
|
|
480574
|
+
const total = (((_a3 = c2.baseLayers) == null ? void 0 : _a3.length) || 0) + (((_b3 = c2.overlayLayers) == null ? void 0 : _b3.length) || 0) + (((_c2 = c2.vectorLayers) == null ? void 0 : _c2.length) || 0);
|
|
480575
|
+
return total;
|
|
480576
|
+
});
|
|
480529
480577
|
watchEffect(() => {
|
|
480530
480578
|
if (layerGroups.value.length > 0) {
|
|
480531
480579
|
layerTreeManager.setLayerGroups(layerGroups.value);
|
|
480532
480580
|
layerTreeManager.setDefaultExpandedKeys(layerGroups.value.map((group2) => group2.id));
|
|
480533
480581
|
initializeExpandedKeys();
|
|
480582
|
+
if (!hasTreeSnapshot.value) {
|
|
480583
|
+
const isInitialRegistrationDone = layers.value.length >= expectedLayerCount.value || expectedLayerCount.value === 0;
|
|
480584
|
+
console.log("🔍 [LayerPanel] 快照准备检查: layers.length=", layers.value.length, " expected=", expectedLayerCount.value, " done=", isInitialRegistrationDone);
|
|
480585
|
+
if (isInitialRegistrationDone) {
|
|
480586
|
+
try {
|
|
480587
|
+
defaultCheckedKeys.value = Array.isArray(layerTreeManager.defaultCheckedKeys.value) ? [...layerTreeManager.defaultCheckedKeys.value] : [];
|
|
480588
|
+
const source = layerTreeManager.treeData.value;
|
|
480589
|
+
treeData.value = source ? JSON.parse(JSON.stringify(source)) : [];
|
|
480590
|
+
} catch (e8) {
|
|
480591
|
+
defaultCheckedKeys.value = layerTreeManager.defaultCheckedKeys.value || [];
|
|
480592
|
+
treeData.value = layerTreeManager.treeData.value || [];
|
|
480593
|
+
}
|
|
480594
|
+
hasTreeSnapshot.value = true;
|
|
480595
|
+
}
|
|
480596
|
+
}
|
|
480534
480597
|
nextTick(() => {
|
|
480535
480598
|
syncTreeCheckedState();
|
|
480536
480599
|
});
|
|
@@ -480728,20 +480791,41 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
480728
480791
|
return openBlock(), createBlock(CustomDialog, {
|
|
480729
480792
|
modelValue: visible.value,
|
|
480730
480793
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => visible.value = $event),
|
|
480731
|
-
title:
|
|
480732
|
-
width:
|
|
480733
|
-
height:
|
|
480734
|
-
"show-modal":
|
|
480735
|
-
draggable:
|
|
480736
|
-
resizable:
|
|
480737
|
-
"show-close":
|
|
480738
|
-
position:
|
|
480739
|
-
cacheId:
|
|
480740
|
-
class:
|
|
480794
|
+
title: dialogProps.value.title,
|
|
480795
|
+
width: dialogProps.value.width,
|
|
480796
|
+
height: dialogProps.value.height,
|
|
480797
|
+
"show-modal": dialogProps.value.modal,
|
|
480798
|
+
draggable: dialogProps.value.draggable,
|
|
480799
|
+
resizable: dialogProps.value.resizable,
|
|
480800
|
+
"show-close": dialogProps.value.showClose,
|
|
480801
|
+
position: dialogProps.value.position,
|
|
480802
|
+
cacheId: dialogProps.value.cacheId,
|
|
480803
|
+
class: normalizeClass(dialogProps.value.className),
|
|
480741
480804
|
onClose: handleClose
|
|
480742
480805
|
}, {
|
|
480743
480806
|
default: withCtx(() => [
|
|
480744
|
-
|
|
480807
|
+
_ctx.$slots.default ? renderSlot(_ctx.$slots, "default", {
|
|
480808
|
+
key: 0,
|
|
480809
|
+
layers: layers.value,
|
|
480810
|
+
layerGroups: layerGroups.value,
|
|
480811
|
+
onTreeCheck,
|
|
480812
|
+
handleLayerVisibilityChange,
|
|
480813
|
+
updateLayerOpacity,
|
|
480814
|
+
updateClusterDistance,
|
|
480815
|
+
updateSuperMapConfig,
|
|
480816
|
+
resetLayerStyle,
|
|
480817
|
+
layerManager: layerManager.value,
|
|
480818
|
+
layerTreeManager: unref(layerTreeManager),
|
|
480819
|
+
layerConfigManager: unref(layerConfigManager),
|
|
480820
|
+
treeRef: treeRef.value,
|
|
480821
|
+
treeData: treeData.value,
|
|
480822
|
+
treeProps,
|
|
480823
|
+
defaultExpandedKeys: defaultExpandedKeys.value,
|
|
480824
|
+
defaultCheckedKeys: defaultCheckedKeys.value,
|
|
480825
|
+
syncTreeCheckedState,
|
|
480826
|
+
getAllTreeNodes
|
|
480827
|
+
}, void 0, true) : (openBlock(), createBlock(_component_el_tabs, {
|
|
480828
|
+
key: 1,
|
|
480745
480829
|
modelValue: activeMainTab.value,
|
|
480746
480830
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => activeMainTab.value = $event),
|
|
480747
480831
|
class: "main-tabs"
|
|
@@ -480847,14 +480931,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
480847
480931
|
})
|
|
480848
480932
|
]),
|
|
480849
480933
|
_: 1
|
|
480850
|
-
}, 8, ["modelValue"])
|
|
480934
|
+
}, 8, ["modelValue"]))
|
|
480851
480935
|
]),
|
|
480852
|
-
_:
|
|
480853
|
-
}, 8, ["modelValue"]);
|
|
480936
|
+
_: 3
|
|
480937
|
+
}, 8, ["modelValue", "title", "width", "height", "show-modal", "draggable", "resizable", "show-close", "position", "cacheId", "class"]);
|
|
480854
480938
|
};
|
|
480855
480939
|
}
|
|
480856
480940
|
});
|
|
480857
|
-
const LayerPanel = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
480941
|
+
const LayerPanel = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-d12fef13"]]);
|
|
480858
480942
|
const _hoisted_1$1 = {
|
|
480859
480943
|
key: 2,
|
|
480860
480944
|
class: "tooltip-content"
|
|
@@ -481105,7 +481189,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
481105
481189
|
}
|
|
481106
481190
|
});
|
|
481107
481191
|
const _hoisted_1 = {
|
|
481108
|
-
key:
|
|
481192
|
+
key: 8,
|
|
481109
481193
|
class: "absolute top-15 right-2.5 w-62.5 max-h-75 bg-white rounded-md shadow-lg z-1000 overflow-hidden md:w-50 md:top-20 md:right-1.25"
|
|
481110
481194
|
};
|
|
481111
481195
|
const _hoisted_2 = { class: "flex items-center justify-between px-4 py-3 border-b border-gray-200 bg-gray-50" };
|
|
@@ -481192,6 +481276,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481192
481276
|
const hasMapInfoSlot = computed(() => !!slots.mapInfo || !!slots["map-info"]);
|
|
481193
481277
|
const hasLayerPanelSlot = computed(() => !!slots.layerPanel || !!slots["layer-panel"]);
|
|
481194
481278
|
const hasLegendSlot = computed(() => !!slots.legend);
|
|
481279
|
+
const finalEnableLayerPanel = computed(() => {
|
|
481280
|
+
var _a3, _b3;
|
|
481281
|
+
if (hasLayerPanelSlot.value)
|
|
481282
|
+
return true;
|
|
481283
|
+
return props.showLayerPanel !== void 0 ? props.showLayerPanel : ((_b3 = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.layerPanel) == null ? void 0 : _b3.enabled) ?? false;
|
|
481284
|
+
});
|
|
481195
481285
|
const finalShowToolbar = computed(() => {
|
|
481196
481286
|
var _a3;
|
|
481197
481287
|
if (hasToolbarSlot.value)
|
|
@@ -481204,12 +481294,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481204
481294
|
return false;
|
|
481205
481295
|
return props.showMapInfo !== void 0 ? props.showMapInfo : ((_a3 = finalMapConfig.value.ui) == null ? void 0 : _a3.showMapInfo) ?? true;
|
|
481206
481296
|
});
|
|
481207
|
-
const finalShowLayerPanel = computed(() => {
|
|
481208
|
-
var _a3;
|
|
481209
|
-
if (hasLayerPanelSlot.value)
|
|
481210
|
-
return false;
|
|
481211
|
-
return props.showLayerPanel !== void 0 ? props.showLayerPanel : ((_a3 = finalMapConfig.value.ui) == null ? void 0 : _a3.showLayerPanel) ?? false;
|
|
481212
|
-
});
|
|
481213
481297
|
const showLegend = computed(() => {
|
|
481214
481298
|
var _a3;
|
|
481215
481299
|
if (hasLegendSlot.value)
|
|
@@ -481252,18 +481336,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481252
481336
|
});
|
|
481253
481337
|
const finalShowControls = computed(() => {
|
|
481254
481338
|
var _a3;
|
|
481255
|
-
|
|
481339
|
+
const controls = finalMapConfig.value.controls || {};
|
|
481340
|
+
const useCustomStyle = controls.useCustomStyle ?? ((_a3 = controls.tools) == null ? void 0 : _a3.useCustomStyle) ?? false;
|
|
481341
|
+
return props.showControls !== void 0 ? props.showControls : useCustomStyle;
|
|
481256
481342
|
});
|
|
481257
481343
|
const finalControlsConfig = computed(() => {
|
|
481258
|
-
|
|
481344
|
+
const controls = finalMapConfig.value.controls || {};
|
|
481345
|
+
const { tools = {}, ...controlsRest } = controls;
|
|
481259
481346
|
return {
|
|
481260
|
-
...
|
|
481261
|
-
|
|
481262
|
-
|
|
481263
|
-
|
|
481264
|
-
|
|
481265
|
-
|
|
481266
|
-
|
|
481347
|
+
...tools,
|
|
481348
|
+
...controlsRest,
|
|
481349
|
+
position: props.controlsPosition || controlsRest.position || tools.position || "bottom-left",
|
|
481350
|
+
direction: props.controlsDirection || controlsRest.direction || tools.direction || "vertical",
|
|
481351
|
+
leftOffset: props.controlsLeftOffset || controlsRest.leftOffset,
|
|
481352
|
+
rightOffset: props.controlsRightOffset || controlsRest.rightOffset,
|
|
481353
|
+
topOffset: props.controlsTopOffset || controlsRest.topOffset,
|
|
481354
|
+
bottomOffset: props.controlsBottomOffset || controlsRest.bottomOffset,
|
|
481267
481355
|
...props.controlsConfig
|
|
481268
481356
|
};
|
|
481269
481357
|
});
|
|
@@ -481314,9 +481402,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481314
481402
|
});
|
|
481315
481403
|
const measurementResults = ref([]);
|
|
481316
481404
|
const layerPanelConfig = computed(() => {
|
|
481405
|
+
var _a3, _b3;
|
|
481317
481406
|
console.log("🔍 [CustomOpenlayer] layerPanelConfig计算中...");
|
|
481318
481407
|
console.log("🔍 [CustomOpenlayer] loadedConfig.value:", loadedConfig.value);
|
|
481319
481408
|
console.log("🔍 [CustomOpenlayer] props.mapConfig:", props.mapConfig);
|
|
481409
|
+
const lpControls = ((_b3 = (_a3 = finalMapConfig.value) == null ? void 0 : _a3.controls) == null ? void 0 : _b3.layerPanel) || {};
|
|
481410
|
+
const ui2 = {
|
|
481411
|
+
title: lpControls.title ?? "图层管理",
|
|
481412
|
+
width: lpControls.width ?? "350px",
|
|
481413
|
+
height: lpControls.height ?? "600px",
|
|
481414
|
+
modal: lpControls.modal ?? false,
|
|
481415
|
+
draggable: lpControls.draggable ?? true,
|
|
481416
|
+
resizable: lpControls.resizable ?? true,
|
|
481417
|
+
showClose: lpControls.showClose ?? true,
|
|
481418
|
+
position: lpControls.position ?? "right",
|
|
481419
|
+
cacheId: lpControls.cacheId ?? "layer-dialog",
|
|
481420
|
+
className: lpControls.className ?? "layer-dialog"
|
|
481421
|
+
};
|
|
481320
481422
|
if (loadedConfig.value) {
|
|
481321
481423
|
const hasLayers = loadedConfig.value.baseLayers && loadedConfig.value.baseLayers.length > 0 || loadedConfig.value.overlayLayers && loadedConfig.value.overlayLayers.length > 0 || loadedConfig.value.vectorLayers && loadedConfig.value.vectorLayers.length > 0;
|
|
481322
481424
|
console.log("🔍 [CustomOpenlayer] loadedConfig hasLayers:", hasLayers);
|
|
@@ -481324,7 +481426,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481324
481426
|
const config = {
|
|
481325
481427
|
baseLayers: loadedConfig.value.baseLayers || [],
|
|
481326
481428
|
overlayLayers: loadedConfig.value.overlayLayers || [],
|
|
481327
|
-
vectorLayers: loadedConfig.value.vectorLayers || []
|
|
481429
|
+
vectorLayers: loadedConfig.value.vectorLayers || [],
|
|
481430
|
+
ui: ui2
|
|
481328
481431
|
};
|
|
481329
481432
|
console.log("🔍 [CustomOpenlayer] 使用loadedConfig,返回配置:", config);
|
|
481330
481433
|
return config;
|
|
@@ -481334,7 +481437,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481334
481437
|
const config = {
|
|
481335
481438
|
baseLayers: props.mapConfig.baseLayers || [],
|
|
481336
481439
|
overlayLayers: props.mapConfig.overlayLayers || [],
|
|
481337
|
-
vectorLayers: props.mapConfig.vectorLayers || []
|
|
481440
|
+
vectorLayers: props.mapConfig.vectorLayers || [],
|
|
481441
|
+
ui: ui2
|
|
481338
481442
|
};
|
|
481339
481443
|
console.log("🔍 [CustomOpenlayer] 使用props.mapConfig,返回配置:", config);
|
|
481340
481444
|
console.log("🔍 [CustomOpenlayer] overlayLayers数量:", config.overlayLayers.length);
|
|
@@ -481347,7 +481451,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481347
481451
|
return {
|
|
481348
481452
|
baseLayers: [],
|
|
481349
481453
|
overlayLayers: [],
|
|
481350
|
-
vectorLayers: []
|
|
481454
|
+
vectorLayers: [],
|
|
481455
|
+
ui: ui2
|
|
481351
481456
|
};
|
|
481352
481457
|
});
|
|
481353
481458
|
const measurementTool = ref(null);
|
|
@@ -481378,6 +481483,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481378
481483
|
},
|
|
481379
481484
|
{ deep: true }
|
|
481380
481485
|
);
|
|
481486
|
+
watch(
|
|
481487
|
+
() => props.showLayerPanel,
|
|
481488
|
+
(val) => {
|
|
481489
|
+
if (val !== void 0) {
|
|
481490
|
+
showLayerPanel.value = val;
|
|
481491
|
+
}
|
|
481492
|
+
}
|
|
481493
|
+
);
|
|
481381
481494
|
watch(
|
|
481382
481495
|
finalMapConfig,
|
|
481383
481496
|
(newConfig) => {
|
|
@@ -481394,7 +481507,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481394
481507
|
{ deep: true }
|
|
481395
481508
|
);
|
|
481396
481509
|
onMounted(async () => {
|
|
481510
|
+
var _a3, _b3;
|
|
481397
481511
|
await loadConfig();
|
|
481512
|
+
const defaultLayerPanelOpen = props.showLayerPanel !== void 0 ? props.showLayerPanel : ((_b3 = (_a3 = finalMapConfig.value.controls) == null ? void 0 : _a3.layerPanel) == null ? void 0 : _b3.defaultOpen) ?? false;
|
|
481513
|
+
if (defaultLayerPanelOpen) {
|
|
481514
|
+
showLayerPanel.value = true;
|
|
481515
|
+
}
|
|
481398
481516
|
if (props.enableStorage) {
|
|
481399
481517
|
loadStoredData();
|
|
481400
481518
|
}
|
|
@@ -481630,10 +481748,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
481630
481748
|
const onSearchClear = () => {
|
|
481631
481749
|
emit("search-clear");
|
|
481632
481750
|
};
|
|
481633
|
-
const onLayerChange = (layer2) => {
|
|
481634
|
-
emit("layer-change", layer2);
|
|
481635
|
-
console.log("Layer changed:", layer2);
|
|
481636
|
-
};
|
|
481637
481751
|
const onShowLayerPanel = () => {
|
|
481638
481752
|
showLayerPanel.value = true;
|
|
481639
481753
|
};
|
|
@@ -482189,16 +482303,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
482189
482303
|
hasToolbarSlot.value ? renderSlot(_ctx.$slots, "toolbar", { key: 2 }, void 0, true) : createCommentVNode("", true),
|
|
482190
482304
|
hasMapInfoSlot.value ? renderSlot(_ctx.$slots, "mapInfo", { key: 3 }, void 0, true) : createCommentVNode("", true),
|
|
482191
482305
|
hasMapInfoSlot.value ? renderSlot(_ctx.$slots, "map-info", { key: 4 }, void 0, true) : createCommentVNode("", true),
|
|
482192
|
-
|
|
482306
|
+
finalEnableLayerPanel.value ? (openBlock(), createBlock(LayerPanel, {
|
|
482193
482307
|
key: 5,
|
|
482194
482308
|
modelValue: showLayerPanel.value,
|
|
482195
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showLayerPanel.value = $event)
|
|
482196
|
-
|
|
482197
|
-
|
|
482198
|
-
|
|
482199
|
-
|
|
482309
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => showLayerPanel.value = $event)
|
|
482310
|
+
}, createSlots({ _: 2 }, [
|
|
482311
|
+
hasLayerPanelSlot.value ? {
|
|
482312
|
+
name: "default",
|
|
482313
|
+
fn: withCtx((panel) => [
|
|
482314
|
+
renderSlot(_ctx.$slots, "layerPanel", normalizeProps(guardReactiveProps(panel)), void 0, true),
|
|
482315
|
+
renderSlot(_ctx.$slots, "layer-panel", normalizeProps(guardReactiveProps(panel)), void 0, true)
|
|
482316
|
+
]),
|
|
482317
|
+
key: "0"
|
|
482318
|
+
} : void 0
|
|
482319
|
+
]), 1032, ["modelValue"])) : createCommentVNode("", true),
|
|
482200
482320
|
showLegend.value ? (openBlock(), createBlock(LegendPanel, {
|
|
482201
|
-
key:
|
|
482321
|
+
key: 6,
|
|
482202
482322
|
position: finalLegendPosition.value,
|
|
482203
482323
|
width: finalLegendWidth.value,
|
|
482204
482324
|
collapsible: finalLegendCollapsible.value,
|
|
@@ -482209,7 +482329,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
482209
482329
|
"top-offset": props.legendTopOffset,
|
|
482210
482330
|
"bottom-offset": props.legendBottomOffset
|
|
482211
482331
|
}, null, 8, ["position", "width", "collapsible", "default-collapsed", "show-only-visible", "left-offset", "right-offset", "top-offset", "bottom-offset"])) : createCommentVNode("", true),
|
|
482212
|
-
hasLegendSlot.value ? renderSlot(_ctx.$slots, "legend", { key:
|
|
482332
|
+
hasLegendSlot.value ? renderSlot(_ctx.$slots, "legend", { key: 7 }, void 0, true) : createCommentVNode("", true),
|
|
482213
482333
|
measurementResults.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
482214
482334
|
createElementVNode("div", _hoisted_2, [
|
|
482215
482335
|
_cache[6] || (_cache[6] = createElementVNode("h4", { class: "m-0 text-sm font-semibold text-gray-800" }, "测量结果", -1)),
|
|
@@ -482256,7 +482376,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
482256
482376
|
};
|
|
482257
482377
|
}
|
|
482258
482378
|
});
|
|
482259
|
-
const CustomOpenlayer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
482379
|
+
const CustomOpenlayer = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a8800082"]]);
|
|
482260
482380
|
var u8 = Uint8Array;
|
|
482261
482381
|
var u16 = Uint16Array;
|
|
482262
482382
|
var i32 = Int32Array;
|
|
@@ -490528,7 +490648,7 @@ function(t3) {
|
|
|
490528
490648
|
*/
|
|
490529
490649
|
function(t3) {
|
|
490530
490650
|
function e8() {
|
|
490531
|
-
return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-
|
|
490651
|
+
return (n.canvg ? Promise.resolve(n.canvg) : import("./index.es-6d89f2cf.mjs")).catch(function(t4) {
|
|
490532
490652
|
return Promise.reject(new Error("Could not load canvg: " + t4));
|
|
490533
490653
|
}).then(function(t4) {
|
|
490534
490654
|
return t4.default ? t4.default : t4;
|
|
@@ -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-799a4733.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 { z, B, d, C, D, a2, a3, u, y, a7, a6, I, H, Z, $, L, J, K, a4, h, M, a0, a1, X, Y, U, W, Q, S, P, A, F, G, N, O, a8, e, T, E, V, x, j, o, t, f, k, g, w, q, m, n, a5, i, s, l, v } from "./index-
|
|
1
|
+
import { z, B, d, C, D, a2, a3, u, y, a7, a6, I, H, Z, $, L, J, K, a4, h, M, a0, a1, X, Y, U, W, Q, S, P, A, F, G, N, O, a8, e, T, E, V, x, j, o, t, f, k, g, w, q, m, n, a5, i, s, l, v } from "./index-799a4733.mjs";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "ol";
|
|
4
4
|
export {
|