Geolocation 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.
Provides a way to get the current ___location of the device.
public ref class Geolocation abstract sealed
public static class Geolocation
type Geolocation = class
Public Class Geolocation
- Inheritance
-
Geolocation
Properties
Default |
Provides the default implementation for static usage of this API. |
IsEnabled |
Returns true when the device's ___location services are enabled |
IsListeningForeground |
Indicates if currently listening to ___location updates while the app is in foreground. |
Methods
GetLastKnownLocationAsync() |
Returns the last known ___location of the device. |
GetLocationAsync() |
Returns the current ___location of the device. |
GetLocationAsync(GeolocationRequest, CancellationToken) |
Returns the current ___location of the device. |
GetLocationAsync(GeolocationRequest) |
Returns the current ___location of the device. |
StartListeningForegroundAsync(GeolocationListeningRequest) |
Starts listening to ___location updates using the LocationChanged event or the ListeningFailed event. Events may only sent when the app is in the foreground. Requests Permissions.LocationWhenInUse from the user. |
StopListeningForeground() |
Stop listening for ___location updates when the app is in the foreground.
Has no effect when not listening and IsListeningForeground
is currently |
Events
ListeningFailed |
Occurs when an error during listening for ___location updates arises. When the event is fired, listening for further ___location updates has been stopped and no further LocationChanged events are sent. |
LocationChanged |
Occurs while listening to ___location updates. |