小程序开发,根据文档,callout气泡各种参数都写好了,在开发者工具中,显示也很正常。
data: {
markers: [{
iconPath: "../../images/me.png",
id: 0,
latitude: 22.553147,
longitude: 114.013367,
width: 50,
height: 50,
callout: {
content: "老人头",
bgColor: "#fff",
color: "#f00",
padding: 10,
display: "ALWAYS",
borderRadius: 5
},
}],
}
但是到手机上,就抽风了,气泡一坨黑。
如果出现这种情况,那么你的bgColor参数或者color参数设置的一定不是6位16进制的值,将其改为6位就可以了
data: {
markers: [{
iconPath: "../../images/me.png",
id: 0,
latitude: 22.553147,
longitude: 114.013367,
width: 50,
height: 50,
callout: {
content: "老人头",
bgColor: "#ffffff",//酱紫
color: "#ff0000",//酱紫
padding: 10,
display: "ALWAYS",
borderRadius: 5
},
}],
}