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.
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.
If you can't edit the image when delivered from the server, maybe you can put a mask on it by adding another icon over the top of that same location with a transparent circular area in the center.
Although this may look a bit weird.
You can create an HTML marker, give it border-radius:50%
and put an image in it. You have a perfectly round image for marker.