Skip to content

Commit

Permalink
merging a11ytest
Browse files Browse the repository at this point in the history
  • Loading branch information
csckata committed Oct 17, 2024
2 parents fa5c7fb + d52b1d9 commit 980168a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions app/view/ces/ces_main.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
10 changes: 8 additions & 2 deletions app/view/ces/ces_rp_biodiversity.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 980168a

Please sign in to comment.