markers: [{ iconPath: "/images/icon/map_point.png" , id: 0, latitude: 31.296970, longitude: 121.300510, width: 20, height: 20, callout: { content: "111111111" , padding: 10, display: 'BYCLICK' , textAlign: 'center' , } }, { iconPath: "/images/icon/map_point.png" , id: 1, latitude: 31.297511, longitude: 121.302816, width: 20, height: 20, callout: { content: "2222222222" , padding: 10, display: 'BYCLICK' , textAlign: 'center' , } }, { iconPath: "/images/icon/map_point.png" , id: 2, latitude: 31.298483, longitude: 121.305230, width: 20, height: 20, callout: { content: "33333333333" , padding: 10, display: 'BYCLICK' , textAlign: 'center' , } }], |
< map longitude = "121.303685" latitude = "31.297593" style = 'width:100%;height:100vh' polyline = '{{polyline}}' markers = '{{markers}}' bindmarkertap = "makertap" > </ map > |
一共有三个点 我在开发者工具上面 点击第一个后 显示 再点第二个点 第一个点的callout 就消失了 但是 换到真机上面 我点第二个点 第一个点的callout并没有消失 请问 有没有大神遇到过这种问题呢
这个问题1年多了吧 还没解决么
安卓还是iOS呢?麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
/**
* 页面的初始数据
*/
data: {
polyline: [{
points: [{
longitude: 121.300510,
latitude: 31.296970
}, {
longitude: 121.302816,
latitude: 31.297511
}],
color:
"#FF0000DD"
,
width: 2,
dottedLine:
false
},
{
points: [{
longitude: 121.302816,
latitude: 31.297511
}, {
longitude: 121.305230,
latitude: 31.298483
}],
color:
"#000000DD"
,
width: 2,
dottedLine:
false
}
],
markers: [{
iconPath:
"/images/icon/map_point.png"
,
id: 0,
latitude: 31.296970,
longitude: 121.300510,
width: 20,
height: 20,
callout: {
content:
"111111111"
,
padding: 10,
display:
'BYCLICK'
,
textAlign:
'center'
,
bgColor:
''
,
}
}, {
iconPath:
"/images/icon/map_point.png"
,
id: 1,
latitude: 31.297511,
longitude: 121.302816,
width: 20,
height: 20,
callout: {
content:
"2222222222"
,
padding: 10,
display:
'BYCLICK'
,
textAlign:
'center'
,
bgColor:
''
,
}
}, {
iconPath:
"/images/icon/map_point.png"
,
id: 2,
latitude: 31.298483,
longitude: 121.305230,
width: 20,
height: 20,
callout: {
content:
"33333333333"
,
padding: 10,
display:
'BYCLICK'
,
textAlign:
'center'
,
bgColor:
''
,
}
}],
isshowMark:
true
,
islineshow:
true
,
iscenter:
true
,
},
makertap:
function
(e) {
},
})
<!--index.wxml-->
<
map
longitude
=
"{{iscenter ? '121.303685' : '' }}"
latitude
=
"{{iscenter? '31.297593' :''}}"
style
=
'width:100%;height:100vh'
polyline
=
"{{islineshow?polyline:''}}"
markers
=
"{{isshowMark ? markers:''}}"
bindmarkertap
=
"makertap"
>
<
cover-view
bindtap
=
'add'
>增加</
cover-view
>
<
cover-view
bindtap
=
'showpoint'
> 隐藏/显示监测点</
cover-view
>
<
cover-view
bindtap
=
'showline'
>隐藏/显示航线</
cover-view
>
<
cover-view
bindtap
=
'center'
>置不置中</
cover-view
>
</
map
>
android 机器 手机是realme X RMX1901 微信版本7.0.4 android 9.0
代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)这个格式
https://developers.weixin.qq.com/s/6AGGYsmb7o9J
你们那边能复现这个问题么