Map组件的callout在iOS失效的问题
发布于 6 年前 作者 mingfan 5385 次浏览 来自 问答

代码如下:

<map include-points="[{"id":"0","latitude":38.56541,"longitude":114.7337,"iconPath":"/images/loc.png","title":"06:55:36","callout":{"content":"文德镇,曲阳县,保定市,河北省\n多云, 25度,96%湿度","color":"black","bgColor":"white","display":"BYCLICK"}},{"id":"2","latitude":38.873891,"longitude":115.464806,"iconPath":"/images/loc.png","title":"12:06:16","callout":{"content":"先锋街道,竞秀区,保定市,河北省\n多云, 29度,80%湿度.","color":"black","bgColor":"white","display":"BYCLICK"}},{"id":"3","latitude":38.873891,"longitude":115.464806,"iconPath":"/images/loc.png","title":"12:06:48","callout":{"content":"先锋街道,竞秀区,保定市,河北省\n多云, 29度,80%湿度。","color":"black","bgColor":"white","display":"BYCLICK"}},{"id":"4","latitude":38.56432,"longitude":114.7332,"iconPath":"/images/loc.png","title":"12:14:43","callout":{"content":"文德镇,曲阳县,保定市,河北省\n雷阵雨, 29度,66%湿度。","color":"black","bgColor":"white","display":"BYCLICK"}},{"id":"5","latitude":38.56553,"longitude":114.734,"iconPath":"/images/loc.png","title":"17:23:38","callout":{"content":"文德镇,曲阳县,保定市,河北省\n多云, 32度,63%湿度","color":"black","bgColor":"white","display":"BYCLICK"}}]" markers="[{"id":"0","latitude":38.56541,"longitude":114.7337,"iconPath":"/images/loc.png","title":"06:55:36","callout":{"content":"文德镇,曲阳县,保定市,河北省\n多云, 25度,96%湿度","color":"black","bgColor":"white","display":"BYCLICK"}},{"id":"2","latitude":38.873891,"longitude":115.464806,"iconPath":"/images/loc.png","title":"12:06:16","callout":{"content":"先锋街道,竞秀区,保定市,河北省\n多云, 29度,80%湿度.","color":"black","bgColor":"white","display":"BYCLICK"}},{"id":"3","latitude":38.873891,"longitude":115.464806,"iconPath":"/images/loc.png","title":"12:06:48","callout":{"content":"先锋街道,竞秀区,保定市,河北省\n多云, 29度,80%湿度。","color":"black","bgColor":"white","display":"BYCLICK"}},{"id":"4","latitude":38.56432,"longitude":114.7332,"iconPath":"/images/loc.png","title":"12:14:43","callout":{"content":"文德镇,曲阳县,保定市,河北省\n雷阵雨, 29度,66%湿度。","color":"black","bgColor":"white","display":"BYCLICK"}},{"id":"5","latitude":38.56553,"longitude":114.734,"iconPath":"/images/loc.png","title":"17:23:38","callout":{"content":"文德镇,曲阳县,保定市,河北省\n多云, 32度,63%湿度","color":"black","bgColor":"white","display":"BYCLICK"}}]" polylines="[{"points":[{"latitude":38.56541,"longitude":114.7337},{"latitude":38.873891,"longitude":115.464806},{"latitude":38.873891,"longitude":115.464806},{"latitude":38.56432,"longitude":114.7332},{"latitude":38.56553,"longitude":114.734}],"color":"#000000AA","width":2}]" style="height:400px;width:100%" />

问题: 在开发工具中,callout内容会一直显示,好像我的display:'BYCLICK’属性无效,在安卓手机表现正常,点击才会显示callout内容,但iOS只显示marker图标,点击图标不会弹出callout,好像这个callout失效了。

请高手指教,谢谢啊!

1 回复

你最后解决了吗,我是callout属性加上去之后,点击图标后,文本框就不出现了。

回到顶部