setMarkers: function setMarkers(res1) {
var maker=[]
for (var i = 0; i < res1.data.length; i++) {
console.log(res1);
var mak = {
iconPath: “…/…/resources/biaozu.png”,
id: i,
latitude: res1.data[i].latitude,
longitude: res1.data[i].longitude,
width: 33,
height: 43,
callout: {
content: res1.data[i].txt,
color: “#ff0000”,
fontSize: “16”,
borderRadius: “10”,
bgColor: “#ffffff”,
padding: “10”,
display: “BYCLICK”
}
};
maker.push(mak);
};
that.setData({
markers: maker
});
电脑上运行时显示markers图标,但是手机上不显示
你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。