I want to create a map that when user click a marker, it open the
marker's info window and display the lat/lng. So i create a scritp:
//create a marker;
var centerMarker = new GMarker( centerLatLng );
map.addOverlay( centerMarker );
// marker click event
GEvent.addListener( centerMarker, "click", function( ) {
console.log( "marker click" );
});
GEvent.addListener(map, 'click', function( overlay, latlng ){
console.log(latlng.lat());
});
when i click the marker, it give me an error: "latlng is undefined"
Please help me!
Thank you in advance!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---