I'm using the Bing Maps API...
And I want to get the latitude and longitude on click function. This is my HTML code:
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script type='text/javascript' src='http://www.bing.com/api/maps/mapcontrol?callback=GetMap&key=[YOUR_BING_MAPS_KEY]' async defer></script>
</head>
<body>
<div id="myMap" style="position:relative;width:600px;height:400px;"></div>
<script type='text/javascript'>
var map;
function GetMap() {
map = new Microsoft.Maps.Map('#myMap', {});
Microsoft.Maps.Events.addHandler(map, 'click', function () { set_latitudes_and_longitude(map); });
}
function set_latitudes_and_longitude(map)
{
console.log(map);
// How can I wright something like
// map.getLat or map.getLong?
}
</script>
</body>
</html>
On console.log(map);
I did not find anything referring to latitude and longitude...