protected override async void OnAppearing() { base.OnAppearing(); var locator = CrossGeolocator.Current; var position = await locator.GetPositionAsync(); LMap.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(position.Latitude, position.Longitude), Distance.FromMiles(1))); }
public async void GetDonorProfile(string id) { ApiService apiService = new ApiService(); var donor = await apiService.GetDonor(id); var bloodType = await apiService.GetBloodType(id); var organType = await apiService.GetOrganType(id); ImgProfile.Source = donor.FullLogoPath; LblName.Text = donor.Name; LblLocation.Text = donor.Location; Lblblood.Text = bloodType.BloodType; LblRegion.Text = donor.Region; Lstvw.ItemsSource = organType; _email = donor.Email; _number = donor.Phone; LMap.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(donor.Latitude, donor.Longitude), Distance.FromMiles(1))); Overlay.IsVisible = false; }