mukasa ronald

mukasa ronald

  • NA
  • 7
  • 2.8k

Distance calulation

Jul 21 2015 9:03 AM
i have this code 
public double GetDistance(double latitude1, double longitude1, double latitude2, double longitude2)
{
var firstCordinate = new GeoCoordinate(latitude1, longitude1);
var secondCordinate = new GeoCoordinate(latitude2, longitude2);
double distance = firstCordinate.GetDistanceTo(secondCordinate);
return distance;
}
 
i want to attach it onto my currentRoute obtained: GeoCoordinate CurrentLocCoordinate = new System.Device.Location.GeoCoordinate(latitude, longtitude);