wujingjing
2024-07-16 b8dc9eeb53ce361f3142ea8de2c46244ecd9d5d6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<template>
    <div ref="containerRef" class="h-[70vh]"></div>
</template>
 
<script setup lang="ts">
import { onMounted, ref } from 'vue';
import { GaoDeMap } from '/@/model/map/GaoDeMap';
let gaoDeMap = new GaoDeMap();
const containerRef = ref<HTMLDivElement>(null);
 
onMounted(async () => {
    await gaoDeMap.init({
        container: containerRef.value,
    });
    gaoDeMap.zoomToRect([116.319665, 39.855919], [116.468324, 39.9756]);
    gaoDeMap.applyBasicPlugins();
});
</script>
<style scoped lang="scss"></style>