Location.CalculateDistance Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CalculateDistance(Double, Double, Double, Double, DistanceUnits) |
Calculate distance between two locations. |
CalculateDistance(Location, Double, Double, DistanceUnits) |
Calculate distance between two locations. |
CalculateDistance(Double, Double, Location, DistanceUnits) |
Calculate distance between two locations. |
CalculateDistance(Location, Location, DistanceUnits) |
Calculate distance between two locations. |
CalculateDistance(Double, Double, Double, Double, DistanceUnits)
Calculate distance between two locations.
public static double CalculateDistance (double latitudeStart, double longitudeStart, double latitudeEnd, double longitudeEnd, Xamarin.Essentials.DistanceUnits units);
Parameters
- latitudeStart
- System.Double
Start latitude to calculate from.
- longitudeStart
- System.Double
Start longitude to calculate from.
- latitudeEnd
- System.Double
End latitude to calculate from.
- longitudeEnd
- System.Double
End longitude to calculate from.
- units
- DistanceUnits
Units to return.
Returns
Distance between two locations in the unit selected.
Applies to
CalculateDistance(Location, Double, Double, DistanceUnits)
Calculate distance between two locations.
public static double CalculateDistance (Xamarin.Essentials.Location locationStart, double latitudeEnd, double longitudeEnd, Xamarin.Essentials.DistanceUnits units);
Parameters
- locationStart
- Location
Start location to calculate from.
- latitudeEnd
- System.Double
End latitude to calculate from.
- longitudeEnd
- System.Double
End longitude to calculate from.
- units
- DistanceUnits
Unit to use.
Returns
Distance calculated.
Applies to
CalculateDistance(Double, Double, Location, DistanceUnits)
Calculate distance between two locations.
public static double CalculateDistance (double latitudeStart, double longitudeStart, Xamarin.Essentials.Location locationEnd, Xamarin.Essentials.DistanceUnits units);
Parameters
- latitudeStart
- System.Double
Start latitude to calculate from.
- longitudeStart
- System.Double
Start longitude to calculate from.
- locationEnd
- Location
End location to calculate from.
- units
- DistanceUnits
Unit to return.
Returns
Distance calculated.
Applies to
CalculateDistance(Location, Location, DistanceUnits)
Calculate distance between two locations.
public static double CalculateDistance (Xamarin.Essentials.Location locationStart, Xamarin.Essentials.Location locationEnd, Xamarin.Essentials.DistanceUnits units);
Parameters
- locationStart
- Location
Start location to calculate from.
- locationEnd
- Location
End location to calculate from.
- units
- DistanceUnits
Units to return.
Returns
Distance between two locations in the unit selected.