1***@qq.com
1***@qq.com
  • 发布:2020-12-08 09:51
  • 更新:2020-12-08 09:51
  • 阅读:1109

uniapp的地图组件,给标注图标设置宽高,在用手机测试时不起效果

分类:uni-app

<map v-if="info_obj.lng_lat" :latitude="info_obj.lng_lat.split(',')[0]" :longitude="info_obj.lng_lat.split(',')[1]" :markers="covers"></map>

data() {
return {
info_obj : {},
covers : []
};
},

this.$api.post({
url : "。。。。。",
data : {
id
},
contentType: "form",
success : res => {
this.info_obj = res;
this.covers.push({
latitude : this.info_obj.lng_lat.split(',')[0],
longitude : this.info_obj.lng_lat.split(',')[1],
width : 50,
height : 60,
callout : {
content : this.info_obj.city + " " + this.info_obj.corporate_name,
bgColor : "#fff",
fontSize : 16,
display : 'ALWAYS'
}
})
}
})

2020-12-08 09:51 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复