Starts an asynchronous operation to retrieve the location of the user's computer.
Syntax
geolocator.getGeopositionAsync().done( /* Your success and error handlers */ );
Parameters
This method has no parameters.
Return value
Type: IAsyncOperation<Geoposition>
Provides methods for starting the asynchronous request for location data and handling its completion.
Remarks
The first use of the Geolocator object to call GetGeopositionAsync 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.
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