微信小程序map组件标注点与气泡位置重叠
[图片]
const INIT_POLYLINE = {
points: [
{latitude:26.084311,longitude:119.312358},
{latitude:26.084311,longitude:116.312358},
{latitude:40.038974,longitude:116.275214},
],
color: '#3875FF',
width: 4,
dottedLine: false,
arrowLine: false,
borderWidth: 1,
// colorList: ['#3875FF']
};
const INIT_MARKER = {
callout: {
content: '邮政大厦大楼',
padding: 10,
borderRadius: 2,
display: 'ALWAYS',
},
latitude: 26.084311,
longitude: 119.312358,
iconPath: './imgs/Marker1_Activated@3x.png',
width: '34px',
height: '34px',
rotate: 0,
alpha: 1
};
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
location: {
latitude: 26.084311,
longitude: 119.312358
},
scale: 5,
polyline: [{
...INIT_POLYLINE
}],
markers: [{
...INIT_MARKER
}],
},
/**
* 组件的方法列表
*/
methods: {
},
pageLifetimes: {
show() {
if (typeof this.getTabBar === 'function' &&
this.getTabBar()) {
this.getTabBar().setData({
selected: 0
})
}
}
}
})