Freigeben über


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)

Source:
LocationExtensions.shared.cs
Source:
LocationExtensions.shared.cs

Extension to calculate distance from location to another location.

public:
[System::Runtime::CompilerServices::Extension]
 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 (this 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
<Extension()>
Public Function CalculateDistance (locationStart As Location, locationEnd As Location, units As DistanceUnits) As Double

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)

Source:
LocationExtensions.shared.cs
Source:
LocationExtensions.shared.cs

Extension to calculate distance from location to another location.

public:
[System::Runtime::CompilerServices::Extension]
 static double CalculateDistance(Microsoft::Maui::Devices::Sensors::Location ^ locationStart, double latitudeEnd, double longitudeEnd, Microsoft::Maui::Devices::Sensors::DistanceUnits units);
public static double CalculateDistance (this 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
<Extension()>
Public Function CalculateDistance (locationStart As Location, latitudeEnd As Double, longitudeEnd As Double, units As DistanceUnits) As Double

Parameters

locationStart
Location

Start location to calculate from.

latitudeEnd
Double

End latitude to calculate from.

longitudeEnd
Double

End longitude to calculate from.

units
DistanceUnits

Units to use.

Returns

Distance calculated.

Applies to