diff --git a/app/main.R b/app/main.R index 44eddd7..96013f2 100644 --- a/app/main.R +++ b/app/main.R @@ -250,7 +250,7 @@ server <- function(id) { session_dir ) # Grassland pDT ---- - # grassland_main_server("grassland_main") + grassland_main_server("grassland_main") ces_server( "ces_main" diff --git a/app/view/ces/ces_main.R b/app/view/ces/ces_main.R index 891f8f4..66358e9 100644 --- a/app/view/ces/ces_main.R +++ b/app/view/ces/ces_main.R @@ -53,6 +53,8 @@ ces_server <- function(id) { moduleServer(id, function(input, output, session) { ns <- session$ns + # add observeEvent(input$tab) and put that value in reactiveVal variable, that will be passed to module servers, where You can observeEvent that value change. + # Check whether the data are not loaded twice: once in cer_rp, second time in ces_rp_biodiversity and same with biodiversity, then it would be better to load them here and pass them downstream ces_rp_server("ces_rp") ces_biodiversity_server("ces_biodiversity") diff --git a/app/view/ces/ces_rp_biodiversity.R b/app/view/ces/ces_rp_biodiversity.R index b3d3ab4..615f3d8 100644 --- a/app/view/ces/ces_rp_biodiversity.R +++ b/app/view/ces/ces_rp_biodiversity.R @@ -146,19 +146,25 @@ ces_rp_biodiversity_server <- function(id) { html = recreation_occurence_slider_html, position = "bottomright" ) |> + addTiles( + urlTemplate = "https://api.gbif.org/v2/map/occurrence/density/{z}/{x}/{y}@1x.png?style=orange.marker&bin=hex", + attribution = "GBIF", + group = "Biodiversity data" + ) |> addGroupedLayersControl( position = "bottomright", baseGroups = c("Open Street Map", "ESRI World Imagery", "Open Topo Map"), overlayGroups = list( "Recreationalist" = c("Nothing", "Hard", "Soft"), - "Biodiversity" = c("Biodiversity hotspots", "Focal species") + "Biodiversity" = c("Biodiversity data", "Focal species") ), options = groupedLayersControlOptions( collapsed = FALSE, exclusiveGroups = "Recreationalist", groupsCollapsable = FALSE ) - ) + ) |> + hideGroup("Biodiversity data") w$hide()