public City() { Id = Guid.NewGuid(); CityName = ""; DestinationPoint = false; MuseumType = ""; NeedsMuseum = false; NeedsRestaurant = false; RestaurantType = ""; StartPoint = false; Location = new LocationDTO(); SelectedMuseum = new GoogleTextSearchDTO(); SelectedRestaurant = new GoogleTextSearchDTO(); UserId = ""; }
protected async Task RestaurantSelected(GoogleTextSearchDTO restaurant) { this.Cities[Cities.Count() - 1].SelectedRestaurant = restaurant; this.RestaurantSearches.Clear(); if (this.MuseumSearches.Count == 0 && this.RestaurantSearches.Count == 0) { var serializedCities = JsonConvert.SerializeObject(this.Cities); await LocalStorageManagerService.DeletePermanentItemAsync("Cities"); await LocalStorageManagerService.SavePermanentItemAsync("Cities", serializedCities); } await JSRuntime.InvokeVoidAsync("hideLocation"); ShowSuccessAlert("Restaurant selected"); StateHasChanged(); }
protected async Task HideLocation(GoogleTextSearchDTO place) { await JSRuntime.InvokeVoidAsync("hideLocation"); }
protected async Task ShowLocation(GoogleTextSearchDTO place) { await JSRuntime.InvokeVoidAsync("showLocation", new LocationDTO { lat = place.geometry.location.lat, lng = place.geometry.location.lng }); }