42 lines
800 B
Vue
42 lines
800 B
Vue
|
<template>
|
||
|
<div>
|
||
|
<baidu-map
|
||
|
:center="position"
|
||
|
:zoom="13"
|
||
|
:scroll-wheel-zoom="true"
|
||
|
style="width: auto; height: 40vh"
|
||
|
>
|
||
|
<bm-map-type
|
||
|
:map-types="['BMAP_NORMAL_MAP', 'BMAP_HYBRID_MAP']"
|
||
|
anchor="BMAP_ANCHOR_TOP_LEFT"
|
||
|
></bm-map-type>
|
||
|
<bm-marker :position="position"></bm-marker>
|
||
|
</baidu-map>
|
||
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import { BmlHeatmap } from "vue-baidu-map"; //引人
|
||
|
export default {
|
||
|
components: {
|
||
|
BmlHeatmap,
|
||
|
},
|
||
|
props: {
|
||
|
selectedDept: {
|
||
|
type: Object,
|
||
|
default: () => {
|
||
|
return {};
|
||
|
},
|
||
|
},
|
||
|
},
|
||
|
computed: {
|
||
|
position() {
|
||
|
return {
|
||
|
lng: parseFloat(this.selectedDept.longitude),
|
||
|
lat: parseFloat(this.selectedDept.latitude),
|
||
|
};
|
||
|
},
|
||
|
},
|
||
|
};
|
||
|
</script>
|