Share via


PositionStatus Enum

Definition

Indicates the ability of the Geolocator object to provide ___location data.

public enum class PositionStatus
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class PositionStatus
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum PositionStatus
var value = Windows.Devices.Geolocation.PositionStatus.ready
Public Enum PositionStatus
Inheritance
PositionStatus
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)
App capabilities
___location ID_CAP_LOCATION [Windows Phone]

Fields

Name Value Description
Ready 0

Location data is available.

Initializing 1

Location services is initializing. This is the status if a GPS is the source of ___location data and the GPS receiver does not yet have the required number of satellites in view to obtain an accurate position.

NoData 2

No ___location data is available from any source. LocationStatus will have this value if the application calls GetGeopositionAsync or registers an event handler for the PositionChanged event, before data is available from a ___location sensor. Once data is available LocationStatus transitions to the Ready state.

Disabled 3

Location settings are turned off. This status indicates that the user has not granted the application permission to access ___location.

NotInitialized 4

An operation to retrieve ___location has not yet been initialized. LocationStatus will have this value if the application has not yet called GetGeopositionAsync or registered an event handler for the PositionChanged event. LocationStatus may also have this value if your app doesn’t have permission to access ___location.

Important

Starting in Windows 10, call RequestAccessAsync before accessing the user's ___location. At that time, your app must be in the foreground and RequestAccessAsync must be called from the UI thread. Until the user grants your app permission to their ___location, your app can't access ___location data.

NotAvailable 5

Location services is not available on this version of Windows.

Applies to

See also