Share via


Location.CalculateDistance Method

Definition

Overloads

CalculateDistance(Location, Location, 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(Double, Double, Double, Double, DistanceUnits)

Calculate distance between two Location instances.

CalculateDistance(Location, Location, DistanceUnits)

Source:
Location.shared.cs
Source:
Location.shared.cs

Calculate distance between two locations.

public:
 static double CalculateDistance(Microsoft::Maui::Devices::Sensors::Location ^ locationStart, Microsoft::Maui::Devices::Sensors::Location ^ locationEnd, Microsoft::Maui::Devices::Sensors::DistanceUnits units);
public static double CalculateDistance (Microsoft.Maui.Devices.Sensors.Location locationStart, Microsoft.Maui.Devices.Sensors.Location locationEnd, Microsoft.Maui.Devices.Sensors.DistanceUnits units);
static member CalculateDistance : Microsoft.Maui.Devices.Sensors.Location * Microsoft.Maui.Devices.Sensors.Location * Microsoft.Maui.Devices.Sensors.DistanceUnits -> double
Public Shared Function CalculateDistance (locationStart As Location, locationEnd As Location, units As DistanceUnits) As Double

Parameters

locationStart
Location

The start location.

locationEnd
Location

The end location.

units
DistanceUnits

The unit in which the result distance is returned.

Returns

Distance between two locations in the unit selected.

Applies to

CalculateDistance(Location, Double, Double, DistanceUnits)

Source:
Location.shared.cs
Source:
Location.shared.cs

Calculate distance between two locations.

public:
 static double CalculateDistance(Microsoft::Maui::Devices::Sensors::Location ^ locationStart, double latitudeEnd, double longitudeEnd, Microsoft::Maui::Devices::Sensors::DistanceUnits units);
public static double CalculateDistance (Microsoft.Maui.Devices.Sensors.Location locationStart, double latitudeEnd, double longitudeEnd, Microsoft.Maui.Devices.Sensors.DistanceUnits units);
static member CalculateDistance : Microsoft.Maui.Devices.Sensors.Location * double * double * Microsoft.Maui.Devices.Sensors.DistanceUnits -> double
Public Shared Function CalculateDistance (locationStart As Location, latitudeEnd As Double, longitudeEnd As Double, units As DistanceUnits) As Double

Parameters

locationStart
Location

The start location.

latitudeEnd
Double

Latitude coordinate of the end location.

longitudeEnd
Double

Longitude coordinate of the end location.

units
DistanceUnits

The unit in which the result distance is returned.

Returns

Distance between two locations in the unit selected.

Applies to

CalculateDistance(Double, Double, Location, DistanceUnits)

Source:
Location.shared.cs
Source:
Location.shared.cs

Calculate distance between two locations.

public:
 static double CalculateDistance(double latitudeStart, double longitudeStart, Microsoft::Maui::Devices::Sensors::Location ^ locationEnd, Microsoft::Maui::Devices::Sensors::DistanceUnits units);
public static double CalculateDistance (double latitudeStart, double longitudeStart, Microsoft.Maui.Devices.Sensors.Location locationEnd, Microsoft.Maui.Devices.Sensors.DistanceUnits units);
static member CalculateDistance : double * double * Microsoft.Maui.Devices.Sensors.Location * Microsoft.Maui.Devices.Sensors.DistanceUnits -> double
Public Shared Function CalculateDistance (latitudeStart As Double, longitudeStart As Double, locationEnd As Location, units As DistanceUnits) As Double

Parameters

latitudeStart
Double

Latitude coordinate of the starting location.

longitudeStart
Double

Longitude coordinate of the starting location.

locationEnd
Location

The end location.

units
DistanceUnits

The unit in which the result distance is returned.

Returns

Distance between two locations in the unit selected.

Applies to

CalculateDistance(Double, Double, Double, Double, DistanceUnits)

Source:
Location.shared.cs
Source:
Location.shared.cs

Calculate distance between two Location instances.

public:
 static double CalculateDistance(double latitudeStart, double longitudeStart, double latitudeEnd, double longitudeEnd, Microsoft::Maui::Devices::Sensors::DistanceUnits units);
public static double CalculateDistance (double latitudeStart, double longitudeStart, double latitudeEnd, double longitudeEnd, Microsoft.Maui.Devices.Sensors.DistanceUnits units);
static member CalculateDistance : double * double * double * double * Microsoft.Maui.Devices.Sensors.DistanceUnits -> double
Public Shared Function CalculateDistance (latitudeStart As Double, longitudeStart As Double, latitudeEnd As Double, longitudeEnd As Double, units As DistanceUnits) As Double

Parameters

latitudeStart
Double

Latitude coordinate of the starting location.

longitudeStart
Double

Longitude coordinate of the starting location.

latitudeEnd
Double

Latitude coordinate of the end location.

longitudeEnd
Double

Longitude coordinate of the end location.

units
DistanceUnits

The unit in which the result distance is returned.

Returns

Distance between two locations in the unit selected.

Applies to