Calculate Distance Between Geocodes in C# and JavaScript (pietschsoft.com)

submitted by crpietschmanncrpietschmann(11.3k) 4 years, 3 months ago

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.

1 comment |category: |Views: 244

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by powerrushpowerrush(3873) 4 years, 3 months ago 0

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

http://www.dotnetkicks.com/database/ZIP_or_Address_Radius_Search_Function_for_SQL_Server_2000

Reply

information Login or create an account to comment on this story