public static double GetDistance(double fromLat, double fromLng, double toLat, double toLng) { Point ptFrom = Context.MakePoint(fromLng, fromLat); Point ptTo = Context.MakePoint(toLng, toLat); return(Context.GetDistCalc().Distance(ptFrom, ptTo)); }
public static double GetDistance(double fromLat, double fromLng, double toLat, double toLng) { Point ptFrom = Context.MakePoint(fromLng, fromLat); Point ptTo = Context.MakePoint(toLng, toLat); var distance = Context.GetDistCalc().Distance(ptFrom, ptTo); return((distance / RadiansToDegrees) * EarthMeanRadiusKm); }