async void InitializeData() { Coordinate coords = await LocationUtil.GetCurrentLocation(); Entry = new PointEntry { Title = "Test Entry", Id = Guid.NewGuid().ToString(), Latitude = coords.Latitude, Longitude = coords.Longitude, Category = "Café" }; }
protected async override void OnAppearing() { base.OnAppearing(); Coordinate location = await LocationUtil.GetCurrentLocation(); Item.Latitude = location.Latitude; Item.Longitude = location.Longitude; }
async void AddItem_Clicked(object sender, EventArgs e) { await Navigation.PushModalAsync(new NavigationPage(new ItemDetailPage())); Coordinate location = await LocationUtil.GetCurrentLocation(); PointEntry item = new PointEntry { Title = "Test", Category = "Café", Latitude = location.Latitude, Longitude = location.Longitude }; //MessagingCenter.Send(this, "AddItem", item); }