<baidu-map class="map" :center="{ lng: 116.404, lat: 39.915 }" :zoom="15" :scroll-wheel-zoom="true">
<bm-map-type :map-types="['BMAP_HYBRID_MAP', 'BMAP_NORMAL_MAP']"
anchor="BMAP_ANCHOR_TOP_LEFT"></bm-map-type>
<template v-for="item in point">
<bm-marker :key:any="item.id" :position="item.markerPoint"
@click="infoWindowOpen(item)">
</bm-marker>
</template>
<bm-info-window :position="position" :show="show"
@close="infoWindowClose" @open="infoWindowOpen">
<p>{{ information.commentsForm+'ee' }}</p>
zhong{{information.commentsForm+'fff'}}</bm-info-window>
</baidu-map>
show: false,
point: [
{
id: 1,
markerPoint: { lng: 116.403963, lat: 39.915119 },
commentsForm: '第一'
},
{
id: 2,
markerPoint: { lng: 116.508328, lat: 40.004086 },
commentsForm: '第二'
},
{
id: 3,
markerPoint: { lng: 116.28863, lat: 39.999638 },
commentsForm: '第三'
},
],
position: {},
markerPoint1: { lng: 116.508328, lat: 40.004086 },
information: ''
infoWindowOpen(item) {
console.log(item, 'item');
this.position = item.markerPoint
this.information = item
this.show = true;
},