示例#1
0
 public async Task <ILocation> GetLocationAsync(IGeolocationRequest request, CancellationToken cancelToken)
 {
     return(new Location(await Xamarin.Essentials.Geolocation.GetLocationAsync(BuildRequest(request), cancelToken)));
 }
示例#2
0
 private static GeolocationRequest BuildRequest(IGeolocationRequest request)
 {
     return(new GeolocationRequest((GeolocationAccuracy)request.DesiredAccuracy, request.Timeout));
 }
示例#3
0
 public async Task <ILocation> GetLocationAsync(IGeolocationRequest request)
 {
     return(new Location(await Xamarin.Essentials.Geolocation.GetLocationAsync(BuildRequest(request))));
 }