LocationExtensions.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(Location, Location, DistanceUnits) |
Extension to calculate distance from location to another location. |
CalculateDistance(Location, Double, Double, DistanceUnits) |
Extension to calculate distance from location to another location. |
CalculateDistance(Location, Location, DistanceUnits)
Extension to calculate distance from location to another location.
public static double CalculateDistance (this 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 use during calculation.
Returns
Distance in units fro two locations.
Applies to
CalculateDistance(Location, Double, Double, DistanceUnits)
Extension to calculate distance from location to another location.
public static double CalculateDistance (this 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
Units to use.
Returns
Distance calculated.