谷歌地图标记可以显示方形自定义图像的圆形版本作为图标吗? [英] Can a google map marker show a circular version of a square custom image as the icon?
本文介绍了谷歌地图标记可以显示方形自定义图像的圆形版本作为图标吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不知道是否有一个显示圆形版本的方形图像作为图标图像传递到谷歌地图标记(api v3)?
解决方案
根据文档,您可以指定标记图标的锚点,图片和大小,但您可以不会裁剪它的圆形版本。我想你会希望将gravatars存储为 .png
文件,然后在后端以透明的方式裁剪它们。
I wonder if there is a away to show a circular version of a square image that is passed in as an icon image to a google map marker (api v3)?
Use case would be to show a round version of a gravatar as a marker.
解决方案
According to the docs, you can specify the anchor, image and size of your marker icon, but you can't crop a circular version of it. I think you would want to store the gravatars as .png
files and then crop them with transparency on the backend.
这篇关于谷歌地图标记可以显示方形自定义图像的圆形版本作为图标吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文