markers: [{
iconPath: “…/…/img/bike.png”,
id: 0,
latitude: 32.02984542637893,
longitude: 120.87840606613159,
width: 24,
height: 34
},
{
iconPath: “…/…/img/bike.png”,
id: 1,
latitude: 32.02984542637123,
longitude: 120.87840606613122,
width: 24,
height: 34
}]
markers_new = [{
iconPath: “…/…/img/bike.png”,
id: 0,
latitude: 23.15239951121,
longitude: 113.36770856218,
width: 24,
height: 34
},
{
iconPath: “…/…/img/bike.png”,
id: 1,
latitude: 23.15319565481,
longitude: 113.368644799478,
width: 24,
height: 34
}];
that.setData({
markers: markers_new
})
这两个位置还是只显示一个图标呢
<map class=‘map_w’ id=“myMap” markers="{{markers}}" style=‘height:{{screenHeight}}px;’ controls="{{controls}}" longitude=‘109.518198’ latitude=‘18.257981’ bindregionchange=“regionchange” show-location>
</map>
markers_new = [{
iconPath: “…/…/img/bike.png”,
id: 0,
latitude: 32.02984542637893,
longitude: 120.87840606613159,
width: 24,
height: 34
},
{
iconPath: “…/…/img/bike.png”,
id: 1,
latitude: 32.02984542123123,
longitude: 120.87840606123123,
width: 24,
height: 34
}];
that.setData({
markers: markers_new
})