地图Map组件,Android 7.0环境闪退
发布于 5 年前 作者 gongxia 9254 次浏览 来自 问答

地图Map组件,Android 7.0环境闪退,去掉markers赋值可以显示,各位大牛有遇到该问题的么?

4 回复

模拟器下显示正常,小米手机显示也没问题。

收到,辛苦了。

你好,问题已复现,我们会尽快进行修复。

微信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

})

},

})

}

})

去掉加粗行,就不闪退,但无法显示标记点信息,带上加粗行,直接闪退。

回到顶部