Geolocation.GetLocationAsync 方法

定義

多載

名稱 Description
GetLocationAsync()

回傳裝置目前的位置。

GetLocationAsync(GeolocationRequest)

依照指定條件回傳裝置的當前位置。

GetLocationAsync(GeolocationRequest, CancellationToken)

依照指定條件回傳裝置的當前位置。

GetLocationAsync()

回傳裝置目前的位置。

public static System.Threading.Tasks.Task<Xamarin.Essentials.Location> GetLocationAsync();

傳回

System.Threading.Tasks.Task<Location>

還原地點。

適用於

GetLocationAsync(GeolocationRequest)

依照指定條件回傳裝置的當前位置。

public static System.Threading.Tasks.Task<Xamarin.Essentials.Location> GetLocationAsync(Xamarin.Essentials.GeolocationRequest request);

參數

request
GeolocationRequest

判斷裝置位置時應採用的標準。

傳回

System.Threading.Tasks.Task<Location>

還原地點。

適用於

GetLocationAsync(GeolocationRequest, CancellationToken)

依照指定條件回傳裝置的當前位置。

public static System.Threading.Tasks.Task<Xamarin.Essentials.Location> GetLocationAsync(Xamarin.Essentials.GeolocationRequest request, System.Threading.CancellationToken cancelToken);

參數

request
GeolocationRequest

判斷裝置位置時應採用的標準。

cancelToken
System.Threading.CancellationToken

一個取消操作的代幣。

傳回

System.Threading.Tasks.Task<Location>

還原地點。

適用於