javascript
<map
id="map"
class="map"
:latitude="latitude"
:longitude="longitude"
:show-location="true"
:markers="covers"
:scale="18"
@markertap="handleShowCard"
:enable-building="true"
>
<cover-view slot="callout">
<block v-for="(item, ItemIndex) in covers" :key="item.id">
<cover-view class="markersContent" :marker-id="item.id">
</cover-view>
</block>
</cover-view>
<cover-view></cover-view>
</map>
数据:
covers:[
{
id: 1,
latitude: 31.242229,
longitude: 121.487909,
width: 1,
height: 1,
iconPath: "/static/iconImg/transparent.png",(使用一张1px*1px的透明图片即可)
options: {
isStore: true,
status: 1,
xian: 12,
all: 20,
},
// 自定义窗口
customCallout: {
display: "ALWAYS", // 常显
}]