Raised when the location is updated.
Syntax
function onPositionChanged(eventArgs) { /* Your code */ } // addEventListener syntax geolocator.addEventListener("positionchanged", onPositionChanged); geolocator.removeEventListener("positionchanged", onPositionChanged); - or - geolocator.onpositionchanged = onPositionChanged;
Event information
| Delegate | TypedEventHandler<Geolocator, PositionChangedEventArgs> |
|---|
Remarks
The first use of the Geolocator object to subscribe to PositionChanged events must be made on the UI thread so that the consent prompt can be shown to the user. For more information, see Guidelines for devices that access personal data.
You can access information about the event with the PositionChangedEventArgs object that is passed to your event handler.
When in Connected Standby, Geolocator objects can always be instantiated but the Geolocator object will not find any sensors to aggregate and calls to GetGeopositionAsync will time out after 7 seconds, PositionChanged event listeners will never be called, and StatusChanged event listeners will be called once with the NoData status.
Requirements
|
Minimum supported client | Windows 8 |
|---|---|
|
Minimum supported server | Windows Server 2012 |
|
Minimum supported phone | Windows Phone 8 |
|
Namespace |
|
|
Metadata |
|
|
Capabilities |
|
See also
Build date: 2/25/2013