This documentation is archived and is not being maintained.

GeoPositionStatus Enumeration

Indicates the ability of the location provider to provide location updates.

Namespace:  System.Device.Location
Assembly:  System.Device (in System.Device.dll)

Public Enumeration GeoPositionStatus

Member nameDescription
ReadyA location provider is ready to supply new data.
InitializingThe location provider is initializing. For example, a GPS that is still obtaining a fix has this status.
NoDataNo location data is available from any location provider.

If the conditions for Disabled do not apply, GeoCoordinateWatcher has this status before it has been started and after it has been stopped.

DisabledThe location provider is disabled. On Windows 7, this is the case when the Sensor and Location platform has been disabled by group policy.

The following example shows how to handle StatusChanged events and print out the current GeoPositionStatus.

Imports System.Device.Location
Module GetLocationEvent

    Sub ShowStatusUpdates()
        Dim Watcher As GeoCoordinateWatcher
        Watcher = New GeoCoordinateWatcher()
        AddHandler Watcher.StatusChanged, AddressOf watcher_StatusChanged

        Console.WriteLine("Enter any key to quit.")
    End Sub

    Sub watcher_StatusChanged(ByVal sender As Object, ByVal e As GeoPositionStatusChangedEventArgs)
        Select Case e.Status
            Case GeoPositionStatus.Initializing
                Console.WriteLine("Working on location fix")
            Case GeoPositionStatus.Ready
                Console.WriteLine("Have location")
            Case GeoPositionStatus.NoData
                Console.WriteLine("No data")
            Case GeoPositionStatus.Disabled
        End Select
    End Sub

    Public Sub Main()
    End Sub
End Module

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.