Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
/* Here's how to add a coloured marker to a Google Map with a shadow in the
right place.
The pin itself is dynamically generated using the Google Charts API,
documented here:
Note however that this API was marked as deprecated on April 20th 2012
although it's not clear when or if it will be turned off.
var shadowImage = new google.maps.MarkerImage(
'', null, null,
new google.maps.Point(10, 34)
var point = new google.maps.LatLng(lat, lng);
var marker = new google.maps.Marker({
position: point,
map: map,
title: name,
icon: "|3491FF|000000",
shadow: shadowImage

This comment has been minimized.

Copy link

@omgbbqhaxx omgbbqhaxx commented Mar 24, 2014

Google map v3 not accept shadow can you update this ?


This comment has been minimized.

Copy link

@devloe devloe commented Apr 17, 2014

If you add "_withshadow" at the end of "d_map_pin_letter" you get a pin with a shadow, without the need add it programmatically.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.