Jump to content

marker shadows


AndrewW

Recommended Posts

Hello

 

I am wondering if it's possible to add this code to the plugin to call a shadow:

 

var map; // Must be initialized first.

function addMarker(point) {
    var image = new google.maps.MarkerImage("dynimg/-1968682208/image",
        new google.maps.Size(30.0, 41.0),
        new google.maps.Point(0, 0),
        new google.maps.Point(15.0, 20.0)
    );
    var shadow = new google.maps.MarkerImage("dynimg/-1968682208/shadow.png",
        new google.maps.Size(51.0, 41.0),
        new google.maps.Point(0, 0),
        new google.maps.Point(15.0, 20.0)
    );
    var marker = new google.maps.Marker({
        position: point,
        map: this.map,
        icon: image,
        shadow: shadow
    });
    
    google.maps.event.addListener(marker, 'click', function(event) {        
        marker.setMap(null);
        google.maps.event.clearInstanceListeners(marker);
    });
}

google.maps.event.addListener(map, 'click', function(event) {
    addMarker(event.latLng);
});

 

regards

 

Andrew

 

 

Link to comment
×
×
  • Create New...