How to attach a click event to a goole map
You need to create marker & add a listener to it.
amarker = new google.maps.Marker(
{ position: alocations,
map: map,
title: "title "
} );
google.maps.event.addListener(amarker, 'click',
function() {
markerClick(this);
}
);
}
function markerClick( mark )
{
//do something
}
You can follow the link for more details http://code.google.com/apis/maps/documentation/javascript/events.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With