Supplies location data that is based on latitude and longitude coordinates.
Assembly: System.Device (in System.Device.dll)
The requested accuracy level for the location data that is provided by the.
Indicates whether permission to access location data from location providers has been granted or denied.
Gets the GeoCoordinate which indicates the current location.
Gets the current status of the.
Releases all resources that are used by the current instance of theclass.
Releases all resources used by the current instance of theclass.
Determines whether the specified object is equal to the current object.(Inherited from Object.)
Frees resources and performs other cleanup operations before the Object::Finalize().)is reclaimed by garbage collection.(Overrides
Serves as the default hash function. (Inherited from Object.)
Called when a PositionChanged event occurs.
Called when a StatusChanged event occurs.
Called when a property of thechanges.
Stops thefrom providing location data and events.
Returns a string that represents the current object.(Inherited from Object.)
Initiates the acquisition of data from the current location provider. This method returns synchronously.
Indicates that the location data has changed.
Indicates that the status of the location provider has changed.
Theclass supplies coordinate-based location data from the current location provider. The current location provider is prioritized as the highest on the computer, based on a number of factors, such as the age and accuracy of the data from all providers, the accuracy requested by location applications, and the power consumption and performance impact associated with the location provider. The current location provider might change over time, for instance, when a GPS device loses its satellite signal indoors and a Wi-Fi triangulation provider becomes the most accurate provider on the computer.
The Status property can be checked to determine if data is available. If data is available, you can get the location one time from the Position property, or receive continuous location updates by handling the PositionChanged event.
In Windows 7, all the System.Device.Location classes are fully functional if a location provider is installed and able to resolve the computer's location.
On Windows 7 Starter Edition, the only supported location provider is the Default Location Provider in Control Panel, and an add-in must be installed to specify latitude and longitude.
Note In versions of Windows prior to Windows 7, the following conditions apply:
The following program shows how to create aand start acquiring data by using an initialization timeout. The code then prints the coordinates of the location, if known.
The following program shows how to receive continuous location updates by subscribing to PositionChanged events.
Available since 4.0
Windows Phone Silverlight
Available since 7.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.