Created
November 2, 2018 10:16
-
-
Save SamKr/f4071fc797fc24367d723891fefba62e to your computer and use it in GitHub Desktop.
Calculates distance between 2 geopoints
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Device.Location; | |
internal static double GetDistance(double lat, double lon) | |
{ | |
var sCoord = new GeoCoordinate(Variables.HomeLat, Variables.HomeLon); | |
var eCoord = new GeoCoordinate(lat, lon); | |
return sCoord.GetDistanceTo(eCoord); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment