Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add transparency to a Google Marker

I have a marker that looks like the on in this tutorial : http://www.powerhut.co.uk/googlemaps/custom_markers.php

Can I add transparency to this marker ?

I've looked over the net and failed to find something that would help me in this issue. In Bing Maps I can do something like this :

var veCustomIco = new VECustomIconSpecification();
veCustomIco.CustomHTML= "<img src='" + url + "' style='filter: Alpha(opacity=10);-moz-opacity: 0.1;opacity: 0.10;'/>";
pin.SetCustomIcon(veCustomIco);

Thank you.

like image 651
Sergiu Avatar asked Feb 23 '23 14:02

Sergiu


2 Answers

You can add transparency as you wish as this is a PNG file. PNG files can have transparency. Just edit the image file with photoshop or the like.

like image 34
Steffen Müller Avatar answered Mar 03 '23 18:03

Steffen Müller


It doesn't look like you can: http://code.google.com/apis/maps/documentation/javascript/reference.html#MarkerOptions

like image 139
sabes Avatar answered Mar 03 '23 16:03

sabes