I am using code from
http://onefishmedia.com/onefishmedia/post/2009/10/06/Determining-the-distance-between-two-addresses-using-Google-Maps-API-and-C.aspx
. I trying to caculate distance between 2 address i.e. "4610 N Fairfax
Drive, Arlington, VA 22203" and "2870 HIGHWAY 35, HAZLET, NJ 07730" it
is not returning exact distance. If you run following code, it returns
284.889477539062 miles. But if you compare in google map it return 227
miles. It seems following formula wrong.

In the above mentioend url they are using following formula
float distance = ((Math.Abs((69.1 * (latitude1 - latitude2))) +
Math.Abs((53.0 * (longitude1 - longitude2))));

Can anyone tell me what wrong with the calculation? I am looking to
small solution to be include with my C#/Asp.Net code?

Regards

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to