使用Google地图在自定义标记中标记图像

我正在为在Cordova中开发的移动应用程序使用google maps api。 我不仅要使用图标标记,还要使用标签来自定义标记。我已经搜索过是否还有其他类似问题,但没有找到。 在google文档中,我看到的唯一选项是文本标签,但是我想使用用户头像作为标签(在这种情况下,是宠物头像)执行以下操作:

使用Google地图在自定义标记中标记图像

这是我正在尝试使用标记的代码:

 //The variables for the marker and the label
 var image = "images/location/me_marker40px.png";
 var pin_image = "images/location/label40px.png"; //I've tried this but I just got the url writed as label,not the image

 var marker = new google.maps.Marker({ 
                position: pos,map: map,title: 'nombre mascota',icon: image,label: pin_image,});

有没有办法做到这一点?预先谢谢你!

zhuzhu1107 回答:使用Google地图在自定义标记中标记图像

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3099757.html

大家都在问