* Bug 表现是什么
marker丢失
* 如何复现?
在iPhone6手机上 缩放地图2-5次
* 提供一个最简复现 Demo
js
Page({
data: {
myMarkers: [],
latitude: '22.607340393876836',
longitude: '114.13628160953523',
scale: '14',
},
onLoad: function (data) {
let artGallery = [{
id: 1,
latitude: 22.53897,
longitude: 113.99268,
type: 1,
width:28,
height:28,
callout: {
fontSize: 14,
color: '#ffffff',
content: "深圳玩咖艺术空间",
bgColor: '#6c6c6c',
borderRadius: 10,
padding: 4,
display: 'BYCLICK'
}
},
{
id: 4,
latitude: 22.60286,
longitude: 114.17814,
type: 1,
width:28,
height:28,
callout:{
fontSize: 14,
color: '#ffffff',
content: "深圳意象美术馆IMAGE GALLERY",
bgColor: '#6c6c6c',
borderRadius: 10,
padding: 4,
display: 'BYCLICK'
}
},
{
id: 2,
latitude: 22.61003,
longitude: 114.13583,
type: 1,
width:28,
height:28,
callout:{
fontSize: 14,
color: 'white',
content: "太阳山艺术中心Sunrise Art Center",
bgColor: '#6c6c6c',
borderRadius: 10,
padding: 4,
display: 'BYCLICK'
}
},{
id: 3,
latitude: 22.607340,
longitude: 114.13628,
type: 1,
width:28,
height:28,
callout:{
fontSize: 14,
color: '#ffffff',
content: "我的位置",
bgColor: '#6c6c6c',
borderRadius: 10,
padding: 4,
display: 'BYCLICK'
}
}
]
this.setData({
myMarkers: artGallery
})
},
})
wxml
<map id="myMap" style="width: 100% ; height: 100vh" longitude="{{longitude}}" latitude="{{latitude}}" scale="{{scale}}" markers="{{myMarkers}}"></map>
关注,我们也遇到该情况,多次点击markers也会导致其他的markers消失,目前只有ios会
手机缩放幅度比较大的情况