Share via


Location.CalculateDistance Method

Definition

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

System.Double

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

System.Double

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

System.Double

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

System.Double

Distance between two locations in the unit selected.

Applies to