feat: 增加是否加载底图参数
This commit is contained in:
parent
4eb9e3cd97
commit
c7b8ddd2f1
@ -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,8 +98,10 @@ async function initViewer() {
|
||||
} else if (!skipInitialView) {
|
||||
await applyInitialCameraView()
|
||||
}
|
||||
if (props.isLoadDefaultBaseMap) {
|
||||
await loadBaseMap()
|
||||
}
|
||||
|
||||
await loadBaseMap()
|
||||
}
|
||||
|
||||
async function applyInitialCameraView() {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="map-center">
|
||||
<div class="map-container">
|
||||
<MapViewport />
|
||||
<MapViewport :isLoadDefaultBaseMap="false"/>
|
||||
<MapControls />
|
||||
</div>
|
||||
<!-- 顶部功能按钮 -->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user