google map V-3 simple problem with latlng

Posted by amar on Stack Overflow See other posts from Stack Overflow or by amar
Published on 2010-05-03T17:44:46Z Indexed on 2010/05/03 17:58 UTC
Read the original article Hit count: 340

Filed under:

hi, i was using v2 of google maps. Now i shifted to v3.

In version 2, this WAS working

    GEvent.addListener(map, "click", function(overlay, latlng) { 
        myLatitude = latlng.lat(); 
        myLongitude = latlng.lng(); 
        alert(myLatitude + '  data  ' + myLongitude); 
    }); 

what should be the equvalant of this code in v3 ?? i searched a lot, but couldn't find any good result..

I have tried this..

    google.maps.event.addListener(map, 'click', function(overlay , latlng) { 
        myLatitude = latlng.lat(); 
        //myLongitude = latlng.lng(); 
        alert('hi! ' + myLatitude); 
    }); 

but no results..

thanks

© Stack Overflow or respective owner

Related posts about google-maps-api-3