Ejemplo n.º 1
0
        protected async override void OnAppearing()
        {
            base.OnAppearing();
            var locator  = CrossGeolocator.Current;
            var position = await locator.GetPositionAsync();

            var venues = await VenueLogic.GetVenuesAsync(position.Latitude, position.Longitude);

            venueListView.ItemsSource = venues;
        }
Ejemplo n.º 2
0
        protected override async void OnAppearing()
        {
            base.OnAppearing();

            //gets the user current location from the Geolocator obj
            var locator  = CrossGeolocator.Current;
            var position = await locator.GetPositionAsync();

            //uses the venuelogic class to build a list from the json source script
            var venues = await VenueLogic.GetVenuesAsync(position.Latitude, position.Longitude);

            //sets the itemsource to display the data in the listview control
            venuelistview.ItemsSource = venues;
        }