Location Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The latitude, longitude, altitude and time information reported by the device.
public class Location
- Inheritance
-
System.ObjectLocation
Constructors
Location() |
Default constructor. |
Location(Double, Double, DateTimeOffset) |
Parametrized constructor with latitude, longitude and timestamp parameters. |
Location(Double, Double, Double) |
Parametrized constructor with latitude, longitude and altitude parameters. |
Location(Double, Double) |
Parametrized constructor with latitude and longitude parameters. |
Location(Location) |
Copy constructor. |
Properties
Accuracy |
Gets or sets the horizontal accuracy (in meters) of the location. |
Altitude |
Gets the altitude in meters (if available) in a reference system which is specified by AltitudeReferenceSystem. |
AltitudeReferenceSystem |
Specifies the reference system in which the altitude value is given. |
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. |
VerticalAccuracy |
Gets or sets the vertical accuracy (in meters) of the location. |
Methods
CalculateDistance(Double, Double, Double, Double, DistanceUnits) |
Calculate distance between two locations. |
CalculateDistance(Double, Double, Location, 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. |
ToString() |
A string representation of the location. |
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, MapLaunchOptions) |
Open maps to this location. |
OpenMapsAsync(Location) |
Open maps to this location. |