how is the name how? I tried the code from Google land, but it looks like the result is different from the result of calculating the Google map. below is the code i made
-(double)GetDistance:(double)lat1 long1:(double)lng1 la2:(double)lat2 long2:(double)lng2 {
EARTH_RADIUS value is 6378.138
using this function, providing two coordinates, the result will be 4.5kM but when I use google map to get the direction between two identical coordinates, it will show me a distance of about 8 km
can anyone help point out the problem of my code?
lee
source share