Calculate Distance in Km and Miles
问题 I have two points whose latitude and longitude i know. How can i calculate the distance(in Km and Miles) between them. What is the formulae? 回答1: You can use the haversine formula to calculate such distances. 回答2: Use the haversine Formula for this... Here is the link having java script code to calculate distance http://www.movable-type.co.uk/scripts/latlong.html 回答3: A = LAT1, B = LONG1 C = LAT2, D = LONG2 (all converted to radians: degree/57.29577951) IF A = C AND B = D THEN DISTANCE = 0;