Answer the question
In order to leave comments, you need to log in
Why is the marker shadow not showing on the google map?
It seems I'm doing everything right, but the marker is displayed and the shadow is not.
Here is the code:
function setMarkers(map, locations) {
var image = new google.maps.MarkerImage('media/images/layout/other_bg/map_marker.png',
new google.maps.Size(55,68),
new google.maps.Point(0,0),
new google.maps.Point(27.5,68)
);
var shadow = new google.maps.MarkerImage('media/images/layout/other_bg/map_marker_shadow.png',
new google.maps.Size(60,63),
new google.maps.Point(0,0),
new google.maps.Point(30,68)
);
for (var i = 0; i < locations.length; i++) {
var beach = locations[i];
var myLatLng = new google.maps.LatLng(beach[1], beach[2]);
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
shadow: shadow,
icon: image
});
}
}
Answer the question
In order to leave comments, you need to log in
Note: Marker shadows were removed in version 3.14 of the Google Maps JavaScript API. Any shadows specified programmatically will be ignored.
Shadows have been removed from version 3.14
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question