Thursday October 8th

Wednesday October 7th

Calculate Distance Between Geocodes in C# and JavaScript

There are times when I need code to calculate the distance between two geocodes (Lat/Long points). I don't need it very often and until now I didn't have a code snippet that I could jus copy and paste. I was searching and found Rob Conery's LINQ and Geocoding post. It's an interesting post and he includes a sample of how to use Lambda expressions in C# 3.0 to calculate the distance between two geocodes in Miles. I decided to copy his code snippet and make sure it works in .NET 2.0 and also convert it to JavaScript.


Here is my previous submission of a SQL Server function that does the same:

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network