async public Task LoadSearchOffers(string q) { if (string.IsNullOrWhiteSpace(q)) { return; } if (IsSearchOffersLoading) { return; } HasSearchOffers = null; IsSearchOffersLoading = true; var options = new EtaApiQueryStringParameterOptions(); options.AddParm(EtaApiConstants.EtaApi_Latitude, UserViewModel.Location.Latitude.ToString("0.00000")); options.AddParm(EtaApiConstants.EtaApi_Longitude, UserViewModel.Location.Longitude.ToString("0.00000")); options.AddParm(EtaApiConstants.EtaApi_LocationDetermined, UNIXTime.GetTimestamp(DateTime.Now)); options.AddParm(EtaApiConstants.EtaApi_Geocoded, UserViewModel.Location.IsGeoCoded ? "0" : "0"); options.AddParm(EtaApiConstants.EtaApi_Accuracy, "1");//userModel.Location.Accuracy.ToString()); options.AddParm(EtaApiConstants.EtaApi_Ditance, UserViewModel.Distance.ToString()); var response = await Api.GetOfferSearchAsync(options, q); await Deployment.Current.Dispatcher.InvokeAsync(() => { if (OffersSearch.Any()) { OffersSearch.Clear(); } if (response.HasErrors) { IsSearchLoaded = false; } else { foreach (var offer in response.Result) { OffersSearch.Add(offer); } IsSearchLoaded = true; } HasSearchOffers = OffersSearch.Any(); IsSearchOffersLoading = false; }); }