Location Class

Definition

The latitude, longitude, and time information reported by the device.

public class Location
Inheritance
Location

Constructors

Location()

Constructor for a location.

Location(Location)

Constructor for a location.

Location(Double, Double)

Constructor for a location.

Location(Double, Double, DateTimeOffset)

Constructor for a location.

Properties

Accuracy

Gets or sets the accuracy (in meters) of the location.

Altitude

Gets the Altitude, if available in meters above sea level.

Course

Degrees relative to true north.

IsFromMockProvider

Inform if location is from GPS or from Mock.

Latitude

Gets or sets the latitude of location.

Longitude

Gets or sets the longitude of location.

Speed

Speed in meters per second.

Timestamp

Gets or sets the timestamp of the location.

Methods

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

Calculate distance between two locations.

CalculateDistance(Location, Double, Double, DistanceUnits)

Calculate distance between two locations.

CalculateDistance(Location, Location, DistanceUnits)

Calculate distance between two locations.

CalculateDistance(Double, Double, Location, DistanceUnits)

Calculate distance between two locations.

ToString()

Extension Methods

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.

OpenMapsAsync(Location)

Open maps to this location.

OpenMapsAsync(Location, MapLaunchOptions)

Open maps to this location.

Applies to