Geolocation.GetLocationAsync Method
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.
Overloads
GetLocationAsync() |
Returns the current location of the device. |
GetLocationAsync(GeolocationRequest) |
Returns the current location of the device using the specified criteria. |
GetLocationAsync(GeolocationRequest, CancellationToken) |
Returns the current location of the device using the specified criteria. |
GetLocationAsync()
Returns the current location of the device.
public static System.Threading.Tasks.Task<Xamarin.Essentials.Location> GetLocationAsync ();
Returns
Returns the location.
Applies to
GetLocationAsync(GeolocationRequest)
Returns the current location of the device using the specified criteria.
public static System.Threading.Tasks.Task<Xamarin.Essentials.Location> GetLocationAsync (Xamarin.Essentials.GeolocationRequest request);
Parameters
- request
- GeolocationRequest
The criteria to use when determining the location of the device.
Returns
Returns the location.
Applies to
GetLocationAsync(GeolocationRequest, CancellationToken)
Returns the current location of the device using the specified criteria.
public static System.Threading.Tasks.Task<Xamarin.Essentials.Location> GetLocationAsync (Xamarin.Essentials.GeolocationRequest request, System.Threading.CancellationToken cancelToken);
Parameters
- request
- GeolocationRequest
The criteria to use when determining the location of the device.
- cancelToken
- System.Threading.CancellationToken
A token for cancelling the operation.
Returns
Returns the location.