地图Map组件,Android 7.0环境闪退,去掉markers赋值可以显示,各位大牛有遇到该问题的么?
微信6.5.22版本,手机是三星s6 ed+
Page({
data: {
longitude: 0,
latitude: 0,
windowHeight: 0,
markers: [{
iconPath: “…/…/image/mapa.png”,
id: 0,
longitude: 0,
latitude: 0,
width: 25,
height: 25
}, {
iconPath: “…/…/image/mapb.png”,
id: 0,
longitude: 0,
latitude: 0,
width: 25,
height: 25
}],
polyline: [{
points: [{
longitude: 0,
latitude: 0
}, {
longitude: 0,
latitude: 0
}],
color: “#FF0000DD”,
width: 2,
dottedLine: true
}],
controls: [{
id: 1,
iconPath: ‘…/…/image/go.png’,
position: {
left: 0,
top: 0,
width: 50,
height: 50
},
clickable: true
}]
},
onLoad: function (e) {
var that = this;
var longitude_a = e.longitude_a;
var latitude_a = e.latitude_a;
var longitude_b = e.longitude_b;
var latitude_b = e.latitude_b;
that.data.markers[0].longitude = longitude_a;
that.data.markers[0].latitude = latitude_a;
that.data.markers[1].longitude = longitude_b;
that.data.markers[1].latitude = latitude_b;
that.data.polyline[0].points[0].longitude = longitude_a;
that.data.polyline[0].points[0].latitude = latitude_a;
that.data.polyline[0].points[1].longitude = longitude_b;
that.data.polyline[0].points[1].latitude = latitude_b;
wx.getSystemInfo({
success: function (res) {
that.setData({
longitude: longitude_a,
latitude: latitude_a,
windowHeight: res.windowHeight,
polyline: that.data.polyline,
markers: that.data.markers
})
},
})
}
})
去掉加粗行,就不闪退,但无法显示标记点信息,带上加粗行,直接闪退。