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.

-------------Problems Reply------------

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

Sounds like it's a common PNG with an alpha channel. No fancy software work, just plain gfx editing. GIMP can do this. "Layer"->"Transparency"->"Add alpha channel", then use "eraser" tool to remove whatever you want, or layer opacity to make layer partially transparent, or adjust Alpha channel in curves... anyway, "checkerboard" background means transparency. Save as PNG and you're done.

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.

I ran into the similar problem and solved it loading transparent png's trough a php request and pass a 'transparency' variable trough get.

like: pathtoyourphpfile/index.php?input=darkcyan_0c.png&transparency=40 where 'input' is the original image and 'transparency' is the amount % of transparency you want. In this case it outputs 'output-40.png'

I used imagick to process the png. A very simple example without image paths:

$percent = $_GET[transparency];
$transparency = 100 / $percent;
$command = "/usr/bin/convert ".$_GET[input]." -channel Alpha -evaluate Divide {$transparency} output-{$transparency}.png";
$output = shell_exec($commando1);

but you could also use php's GD library to adjust png's transparency

Category:javascript Views:0 Time:2011-07-15

Related post

  • Add numbering label to google map marker 2010-08-25

    May I know how to add numbering label to google map marker using google map api? Just add label, not trying to change the icon. Thank you. --------------Solutions------------- If you don't want to use custom icons for each marker then I suggest looki

  • Getting Lat/Lng from Google marker 2011-03-13

    I made a google map with a draggable marker. When the user drags the marker, I need to know the new latitude and longitude, but I don't understand what is the best approach to doing that. How can I retrieve the new coordinates? Thanks, Alex ---------

  • Show Button On Google Marker Drag 2011-08-12

    I wonder whether someone may be able to help me please. I am using the code below to reverse geocode address details, in this case starting off with the OS Grid Ref. Could someone perhaps tell me please how I would go about including code which upon

  • Google Marker Manager not defined 2011-10-18

    im trying to create a google marker manager but get the error message marker is not defined, ive commented out the code that is causing the problem, i have it set to user clicking on the map and places a marker, i want it to be able to do this automa

  • How i add an addListener to GOOGLE MAPS to get MapType V3 2012-01-16

    How i add an addListener to GOOGLE MAPS to get MapType V3 I use google.maps.event.addListener(map, "maptypechanged", function() { var newMapType = map.getCurrentMapType(); alert(newMapType); }); don't alert --------------Solutions------------- Assumi

  • How add css border at google maps v3 icon 2012-02-01

    I want to add css border at google maps icon. But I don't know, how can I do? This is my code! plz....! http://fiddle.jshell.net/yX7ce/9/ <script type="text/javascript"> function initialize() { var myOptions = { zoom: 4, center: new google.maps

  • can't add yahoo pipes to google reader 2009-06-25

    for some reason the feed won't load anything when I add it to google reader. The pipe is very simple, consists of 2 filters only. Runs fine in yahoo pipes itself, just will not be found in google reader when I attempt to fetch. Anyone seen this befor

  • Google marks seemingly perfect emails as spam 2010-02-27

    First post, have found many answers here, so hopes are high. The problem: Google marks seemingly correctly formatted emails from my apache/postfix server as spam. Sample email as follows; (I have replaced my domain with mydomain.com.au and the IP wit

  • MFC - I want to add transparency and shading to the background of my Application but don't know how 2010-07-06

    I would like to add transparency and shading to my application written using MFC and Visual Studio 2008 Prof. At the moment I am using Ribbons which makes the app look good but the mainframe (is a CFormView based app) is terrible! I hate the grey bac

  • can we add purchased fonts to google font api? 2010-07-30

    can we add purchased fonts to google font api? --------------Solutions------------- As I understand it, you cannot upload arbitrary font files from your own sources. You can load other fonts via the Web Font Loader, from sources other than Google (e.

  • How to add GWT Wrappers for Google APIs to GWT Designer's Palette? 2011-06-20

    I'm using GWT Designer to build a site. I use the Google Visualization API and would like to be able to place Pie Charts, Timelines, etc in my Panels. Anyone know how to add GWT libs for Google APIs to the GWT Designer Palette? Cheers, David --------

  • How do you add the "you are here" marker to Bing Maps Control 2011-08-01

    How do you add the "you are here" marker to the Bing Maps control? On the phone this is represented as a circle within a square and then there is an outer circle representing the location accuracy. It looks like you could do it with a pushpin and a p

  • How come I cannot add in jsp into google app engine in eclipse? 2011-10-11

    How come I cannot add in jsp into google app engine in eclipse? I am using java. I was trying the tutorial on guestbook at google app engine and there was a step that say to create jsp into war folder but when i right click on war folder and then new

  • Ruby add method!(with exclamation mark) to string 2011-10-22

    I have found many resources how to do add "ordinary" method to String. ie Add custom method to string object But i haven't found any info how to add "destructive" method with exclamation mark to String class. Can somebody rewrite this method to "dest

  • how to add dynamic kml to google earth? 2011-12-14

    We are trying to add dynamic kml to google earth.But we are failing in one situation. CODE: var currentKmlObject = null; function loadkmlGE(){ if (currentKmlObject != null) { ge.getFeatures().removeChild(currentKmlObject); currentKmlObject = null; }

  • Add custom text to Google Visualization tooltip (using GWT API) 2011-12-30

    The following question almost entirely describes what I'm trying to to... Add custom text to Google Visualization tooltip ... basically to add extra information to google-viz tooltips. The accepted answer looked pretty good but I'm using the GWT API.

  • How to install Google Inc. add-ons (dl-ssl.google.com) (Third party add-ons) for use with google maps external library? 2012-01-08

    I want to use com.google.android.maps.MapView, but can't figure out how to download the library for this. I have been looking at http://developer.android.com/sdk/adding-components.html. But in my SDK manager I simply can't find the section "third par

  • How do I add My Favorites and Google to my menu bar so it appears when I open explorer? 2013-08-06

    How do I add my favorites and google to the menu bar so it appears when I open Explorer? --------------Solutions------------- Right click on a blank spot to the right of Tabs.

  • how to enable IE8 add-ons disabled when Google Chrome browser was installed on Win XP 2013-08-29

    Installed Google browser recently and, when attempting to use a Real Player function, I found out that browser does not support Real Player downloader. My question is how to add back the add-ons disabled by Google Chrome installation. --------------S

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.158 (s). 11 q(s)