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.
Represents a physical location with the latitude, longitude, altitude and time information reported by the device.
public ref class Location
public class Location
type Location = class
Public Class Location
- Inheritance
-
Location
Constructors
Location() |
Initializes a new instance of the Location class. |
Location(Double, Double, DateTimeOffset) |
Initializes a new instance of the Location class with the specified latitude, longitude, and timestamp. |
Location(Double, Double, Double) |
Initializes a new instance of the Location class with the specified latitude, longitude, and altitude. |
Location(Double, Double) |
Initializes a new instance of the Location class with the specified latitude and longitude. |
Location(Location) |
Initializes a new instance of the Location class from an existing instance. |
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 expressed. |
Course |
Gets or sets the current degrees relative to true north at the time when this location was determined. |
IsFromMockProvider |
Gets or sets whether this location originates from a mocked sensor and thus might not be the real location of the device. |
Latitude |
Gets or sets the latitude coordinate of this location. |
Longitude |
Gets or sets the longitude coordinate of this location. |
ReducedAccuracy |
Gets or sets whether this location has a reduced accuracy reading. |
Speed |
Gets or sets the current speed in meters per second at the time when this location was determined. |
Timestamp |
Gets or sets the timestamp of the location in UTC. |
VerticalAccuracy |
Gets or sets the vertical accuracy (in meters) of the location. |
Methods
CalculateDistance(Double, Double, Double, Double, DistanceUnits) |
Calculate distance between two Location instances. |
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. |
Equals(Object) | Determines whether the specified object is equal to the current object. |
GetHashCode() | Serves as the default hash function. |
ToString() |
Returns a string representation of the current values of Location. |
Operators
Equality(Location, Location) |
Equality operator for equals. |
Inequality(Location, Location) |
Inequality operator. |
Extension Methods
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. |
OpenMapsAsync(Location, MapLaunchOptions) |
Open maps to this location. |
OpenMapsAsync(Location) |
Open maps to this location. |