Geolocation.GetLocationAsync Method

Definition

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
CancellationToken

A token for cancelling the operation.

Returns

Returns the location.

Applies to