Udostępnij za pośrednictwem


LocationExtensions.CalculateDistance Method

Definition

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

System.Double

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

System.Double

Distance calculated.

Applies to