qa-prevention-gwj-vue/src/views/emergen_cyrescue/emergency_map/components/mapAssembly.vue

40 lines
594 B
Vue
Raw Normal View History

2024-07-19 10:50:07 +08:00
<template>
<div>
<div id="map"/>
</div>
</template>
<script>
let mapInstance
export default {
data() {
return {
}
},
mounted() {
this.fnMapInit()
},
beforeDestroy() {
mapInstance = null
},
methods: {
fnMapInit() {
mapInstance = new window.BMapGL.Map('map')
mapInstance.centerAndZoom(new window.BMapGL.Point('119.502057', '39.933306'), 15)
mapInstance.enableScrollWheelZoom(true)
},
addPoint() {
}
}
}
</script>
<style scoped lang="scss">
#map {
width: calc(100vw - 210px);
height: calc(100vh - 84px);
}
</style>