google map clicked coordinates
hi friends
how can i find the coordinate if a site visitor clicked my google map?
below is my code for the gmap
thanks
<script src="http://maps.google.com/maps?file=api&key=ABQIAAAA0BO2Ps4DbLymjxuBgZcbgkPN hnwAuBgZcbgkPNhnwAa0Zz7fHWiJUQ" type="text/javascript"></script>
<div id="map" style="width: 300px; height: 300px;"></div>
<script type="text/javascript">
infoWinHtml="hello world";
function loadGMap()
{
var map = new GMap(document.getElementById("map"));
var point = new GPoint(55.176429748535156, 25.104875594635896);
var marker = new GMarker(point);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.centerAndZoom(point, 8);
GEvent.addListener(marker, "click", function()
{
marker.openInfoWindowHtml(infoWinHtml);
//alert("You clicked on" + GEvent. )
});
map.addOverlay(marker);
}
window.onload=loadGMap;
</script>
|