小程序
小游戏
企业微信
微信支付
扫描小程序码分享
map控件里label和callout同时使用,点击market,callout会同时出现两个。
3 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,IOS上测试点击marker,只会出现一个callout,麻烦提供下代码片段和机型相关信息
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
js:
latitude: 40.069,
longitude: 116.129,
markers: [{
id: 382712,
latitude: 40.07103,
longitude: 116.12672,
iconPath: '/image/zhfw.png',
width: 16,
height: 16,
label: { content: '安云影像', color: '#db5712', x: -16, y: 6, fontSize: 8 },
callout: { content: '去逛逛', color: '#db5712', display: 'BYCLICK', borderRadius: 5, fontSize: 8, display: 'BYCLICK' },
anchor: { x: .5, y: .5 }
},
{
id: 382715,
latitude: 40.071445,
longitude: 116.12731,
iconPath: '/image/mscy.png',
label: { content: '安河家园小\n顾披萨外卖', color: '#db1296', x: -16, y: 6, fontSize: 8 },
callout: { content: '去逛逛', color: '#db1296', display: 'BYCLICK', borderRadius: 5, fontSize: 8, display: 'BYCLICK' },
}
],
wxml:
<map
id="myMap"
style="width: 100%; height: 100%;"
latitude="{{latitude}}"
longitude="{{longitude}}"
markers="{{markers}}"
circles="{{circles}}"
scale = "17"
bindmarkertap="markertap"
bindcallouttap = "bindcallouttap"
bindtap="bindtap"
show-location
></map>
你好,麻烦提供下代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html?search-key=%E4%BB%A3%E7%A0%81%E7%89%87%E6%AE%B5)
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
你好,IOS上测试点击marker,只会出现一个callout,麻烦提供下代码片段和机型相关信息
js:
latitude: 40.069,
longitude: 116.129,
markers: [{
id: 382712,
latitude: 40.07103,
longitude: 116.12672,
iconPath: '/image/zhfw.png',
width: 16,
height: 16,
label: { content: '安云影像', color: '#db5712', x: -16, y: 6, fontSize: 8 },
callout: { content: '去逛逛', color: '#db5712', display: 'BYCLICK', borderRadius: 5, fontSize: 8, display: 'BYCLICK' },
anchor: { x: .5, y: .5 }
},
{
id: 382715,
latitude: 40.071445,
longitude: 116.12731,
iconPath: '/image/mscy.png',
width: 16,
height: 16,
label: { content: '安河家园小\n顾披萨外卖', color: '#db1296', x: -16, y: 6, fontSize: 8 },
callout: { content: '去逛逛', color: '#db1296', display: 'BYCLICK', borderRadius: 5, fontSize: 8, display: 'BYCLICK' },
anchor: { x: .5, y: .5 }
}
],
wxml:
<map
id="myMap"
style="width: 100%; height: 100%;"
latitude="{{latitude}}"
longitude="{{longitude}}"
markers="{{markers}}"
circles="{{circles}}"
scale = "17"
bindmarkertap="markertap"
bindcallouttap = "bindcallouttap"
bindtap="bindtap"
show-location
></map>
你好,麻烦提供下代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html?search-key=%E4%BB%A3%E7%A0%81%E7%89%87%E6%AE%B5)