Archive for the ‘Google Maps API’ Category

Google Earth, Mars included

Now google Eearth inludes Mars watch Vid:

Google Maps API direct Distance

Javascript Direct Distance function for Google Maps API
coordinates format:
decimal coordinates
input values:
lat1: latitude of the first point
lon1: longitude of the first point
lat2: latitude of the second point
lon2: longitude of the second point
return value:
direct distance in kilometers
Javascript Code:
// direct distance
function direct_distance(lat1, lon1, lat2, lon2){
lng = 0; // preset default value
polyPoints = [new GLatLng(lat1,lon1),new GLatLng(lat2,lon2)]; // make [...]