Posts Tagged ‘direct distance’

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 [...]