feat: 增加是否加载底图参数

This commit is contained in:
nightdays 2025-11-19 14:02:42 +08:00
parent 4eb9e3cd97
commit c7b8ddd2f1
2 changed files with 12 additions and 2 deletions

View File

@ -8,6 +8,14 @@ import { onMounted, onBeforeUnmount } from 'vue'
import { useRoute } from 'vue-router'
import useMapStore from '@/map/stores/mapStore'
const props = defineProps({
//
isLoadDefaultBaseMap: {
type: Boolean,
default: true
}
})
const mapStore = useMapStore()
const route = useRoute()
let viewer = null
@ -90,10 +98,12 @@ async function initViewer() {
} else if (!skipInitialView) {
await applyInitialCameraView()
}
if (props.isLoadDefaultBaseMap) {
await loadBaseMap()
}
}
async function applyInitialCameraView() {
const { camera } = mapStore.services()

View File

@ -1,7 +1,7 @@
<template>
<div class="map-center">
<div class="map-container">
<MapViewport />
<MapViewport :isLoadDefaultBaseMap="false"/>
<MapControls />
</div>
<!-- 顶部功能按钮 -->