コード例 #1
0
        public override async Task Init()
        {
            FeedbackTypeList = (await DataRetrievalService.GetAllFeedbackTypes()).ToObservableCollection();
            VehicleList      = (await DataRetrievalService.GetAllVehicles()).ToObservableCollection();

            if (FeedbackTypeList.Any())
            {
                SelectedFeedbackType = FeedbackTypeList[0];
            }

            //SelectedVehicle = VehicleList[0];

            //use this opportunity to grab the long/lat.
            var request          = new GeolocationRequest(GeolocationAccuracy.Medium);
            var locationRealtime = await Geolocation.GetLocationAsync(request);

            location = (locationRealtime == null) ? await Geolocation.GetLastKnownLocationAsync() : locationRealtime;
        }