public override async void Load(NavigationParameters navigationParameters) { base.Load(navigationParameters); try { IsMapSelectionEnable = false; TextSearched = "Busque aquí"; bool permissionsGranted = await _gpsService.GetPermissionsAsync(); if (permissionsGranted) { Coordinates coordinates = await _gpsService.GetCurrentPositionAsync(); CenterPosition = new Position(coordinates.Latitude, coordinates.Longitude); } } catch (Exception ex) { Debug.WriteLine("Error en Load() en MainPageViewModel:"); Debug.WriteLine(ex.Message); } finally { IsBusy = false; } }
private async Task GetPositionAsync() { CurrentPosition = await gpsService.GetCurrentPositionAsync(); }
private async Task GetPositionAsync() { var coordinate = await gpsService.GetCurrentPositionAsync(); }