Geocoordinate Geocoordinate Geocoordinate Geocoordinate Class

Definition

Contains the information for identifying a geographic location.

public : sealed class Geocoordinate : IGeocoordinate, IGeocoordinateWithPoint, IGeocoordinateWithPositionData, IGeocoordinateWithPositionSourceTimestamp
public sealed class Geocoordinate : IGeocoordinate, IGeocoordinateWithPoint, IGeocoordinateWithPositionData, IGeocoordinateWithPositionSourceTimestamp
Public NotInheritable Class Geocoordinate Implements IGeocoordinate, IGeocoordinateWithPoint, IGeocoordinateWithPositionData, IGeocoordinateWithPositionSourceTimestamp
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location ID_CAP_LOCATION [Windows Phone]

Remarks

Retrieve an instance of this class using the Geoposition.Coordinate property.

Values for the Latitude, Longitude, and Accuracy properties are always provided. Values for the Altitude, AltitudeAccuracy, Heading, and Speed properties are provided if available. If they are not available, they will be null in JavaScript code.

Properties

Accuracy Accuracy Accuracy Accuracy

The accuracy of the location in meters.

public : double Accuracy { get; }
public double Accuracy { get; }
Public ReadOnly Property Accuracy As double
var double = geocoordinate.accuracy;
Value
double double double double

The accuracy in meters.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location ID_CAP_LOCATION [Windows Phone]

Remarks

Location services accuracy depends on the location data available. For example, if Wi-Fi is available, data is accurate to within 50 meters. If Wi-Fi is not available, the data could be accurate to within 10 miles or larger.

A GNSS device can provide data accurate to within a few meters. However, its accuracy can vary if the GNSS sensor is obscured by buildings, trees, or cloud cover. GNSS data may not be available at all within a building.

Altitude Altitude Altitude Altitude

Note

Altitude may be altered or unavailable after Windows 8.1 and Windows Phone 8.1. Instead, use Geocoordinate.Point.

The altitude of the location, in meters.

public : IReference<double> Altitude { get; }
public Nullable<double> Altitude { get; }
Public ReadOnly Property Altitude As Nullable<double>
var nullable = geocoordinate.altitude;
Value
IReference<double> Nullable<double> Nullable<double> Nullable<double>

The altitude in meters.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location ID_CAP_LOCATION [Windows Phone]

Remarks

This optional property will be set if it is available. If the property is not available, the value will be NULL or NaN (depending on the operating system version). We recommend that your app checks for both of these possibilities.

AltitudeAccuracy AltitudeAccuracy AltitudeAccuracy AltitudeAccuracy

The accuracy of the altitude, in meters.

public : IReference<double> AltitudeAccuracy { get; }
public Nullable<double> AltitudeAccuracy { get; }
Public ReadOnly Property AltitudeAccuracy As Nullable<double>
var nullable = geocoordinate.altitudeAccuracy;
Value
IReference<double> Nullable<double> Nullable<double> Nullable<double>

The accuracy of the altitude.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location ID_CAP_LOCATION [Windows Phone]

Remarks

This optional property will be set if it is available. If the property is not available, the value will be NULL.

Heading Heading Heading Heading

The current heading in degrees relative to true north.

public : IReference<double> Heading { get; }
public Nullable<double> Heading { get; }
Public ReadOnly Property Heading As Nullable<double>
var nullable = geocoordinate.heading;
Value
IReference<double> Nullable<double> Nullable<double> Nullable<double>

The current heading in degrees relative to true north.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location ID_CAP_LOCATION [Windows Phone]

Remarks

This optional property will be set if it is available. If the property is not available, the value will be NULL or NaN (depending on the operating system version). We recommend that your app checks for both of these possibilities.

Latitude Latitude Latitude Latitude

Note

Latitude may be altered or unavailable after Windows 8.1 and Windows Phone 8.1. Instead, use Geocoordinate.Point.

The latitude in degrees.

public : double Latitude { get; }
public double Latitude { get; }
Public ReadOnly Property Latitude As double
var double = geocoordinate.latitude;
Value
double double double double

The latitude in degrees. The valid range of values is from -90.0 to 90.0.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location ID_CAP_LOCATION [Windows Phone]

Longitude Longitude Longitude Longitude

Note

Longitude may be altered or unavailable after Windows 8.1 and Windows Phone 8.1. Instead, use Geocoordinate.Point.

The longitude in degrees.

public : double Longitude { get; }
public double Longitude { get; }
Public ReadOnly Property Longitude As double
var double = geocoordinate.longitude;
Value
double double double double

The longitude in degrees. The valid range of values is from -180.0 to 180.0.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location ID_CAP_LOCATION [Windows Phone]

Point Point Point Point

The location of the Geocoordinate.

public : Geopoint Point { get; }
public Geopoint Point { get; }
Public ReadOnly Property Point As Geopoint
var geopoint = geocoordinate.point;
Value
Geopoint Geopoint Geopoint Geopoint

The location of the Geocoordinate.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location

PositionSource PositionSource PositionSource PositionSource

Gets the source used to obtain a Geocoordinate.

public : PositionSource PositionSource { get; }
public PositionSource PositionSource { get; }
Public ReadOnly Property PositionSource As PositionSource
var positionSource = geocoordinate.positionSource;
Value
PositionSource PositionSource PositionSource PositionSource

Gets the source used to obtain a Geocoordinate.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
ID_CAP_LOCATION [Windows Phone] location locationHistory

PositionSourceTimestamp PositionSourceTimestamp PositionSourceTimestamp PositionSourceTimestamp

Gets the time at which the associated Geocoordinate position was calculated.

public : IReference<DateTime> PositionSourceTimestamp { get; }
public Nullable<DateTimeOffset> PositionSourceTimestamp { get; }
Public ReadOnly Property PositionSourceTimestamp As Nullable<DateTimeOffset>
var nullable = geocoordinate.positionSourceTimestamp;
Value
IReference<DateTime> Nullable<DateTimeOffset> Nullable<DateTimeOffset> Nullable<DateTimeOffset>

The time at which the associated Geocoordinate position was calculated.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location

Remarks

When this property is not available, the value will be NULL.

The timestamp returned by this property depends on how the location was obtained and may be completely unrelated to the system time on the device. For example, if the position is obtained from the Global Navigation Satellite System (GNSS) the timestamp would be obtained from the satellites. If the position was is obtained from Secure User Plane Location (SUPL), the timestamp would be obtained from SUPL servers. This means that the timestamps obtained from these services will be precise and, most importantly, consistent across all devices regardless of whether the system time on the devices is set correctly.

SatelliteData SatelliteData SatelliteData SatelliteData

Gets information about the satellites used to obtain a Geocoordinate.

public : GeocoordinateSatelliteData SatelliteData { get; }
public GeocoordinateSatelliteData SatelliteData { get; }
Public ReadOnly Property SatelliteData As GeocoordinateSatelliteData
var geocoordinateSatelliteData = geocoordinate.satelliteData;
Value
GeocoordinateSatelliteData GeocoordinateSatelliteData GeocoordinateSatelliteData GeocoordinateSatelliteData

Gets information about the satellites used to obtain a Geocoordinate.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location ID_CAP_LOCATION [Windows Phone]

Speed Speed Speed Speed

The speed in meters per second.

public : IReference<double> Speed { get; }
public Nullable<double> Speed { get; }
Public ReadOnly Property Speed As Nullable<double>
var nullable = geocoordinate.speed;
Value
IReference<double> Nullable<double> Nullable<double> Nullable<double>

The speed in meters per second.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location ID_CAP_LOCATION [Windows Phone]

Remarks

This optional property will be set if it is available. If the property is not available, the value will be NULL or NaN (depending on the operating system version). We recommend that your app checks for both of these possibilities.

Timestamp Timestamp Timestamp Timestamp

The system time at which the location was determined.

public : DateTime Timestamp { get; }
public DateTimeOffset Timestamp { get; }
Public ReadOnly Property Timestamp As DateTimeOffset
var dateTimeOffset = geocoordinate.timestamp;
Value
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The system time at which the location was determined.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
location ID_CAP_LOCATION [Windows Phone]