Skip to content

Commit

Permalink
feat : Aquamaps and postive catch are not visible by default
Browse files Browse the repository at this point in the history
Issue #158
  • Loading branch information
PMHLambert committed May 10, 2023
1 parent 6381e59 commit a84e173
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions R/mod_a_first.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mod_first_ui <- function(id) {
)
)
),
tmap::tmapOutput(ns("raster"), width = "90%", height = "750px")
leaflet::leafletOutput(ns("raster"), width = "90%", height = "750px")
),
w3css::w3_col(
class = "s2",
Expand Down Expand Up @@ -89,7 +89,7 @@ mod_first_server <- function(id, r = r) {
r = loco
)

output$raster <- tmap::renderTmap({
output$raster <- leaflet::renderLeaflet({
req(loco$species)

tm_draw(
Expand Down
11 changes: 8 additions & 3 deletions R/mod_a_first_fct_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ tm_ices_rectangle <- function(ices_geom) {
#' @noRd
tm_ices_division <- function(ices_division) {
tm_shape(ices_division, bbox = bbox) +
tm_borders(col = 'grey10', lwd = 1)
tm_borders(col = 'grey10', lwd = 1.2)
}

#' @importFrom tmap tm_shape tm_polygons
Expand Down Expand Up @@ -226,7 +226,7 @@ tm_draw <- function(species_latin_name,
)(dataContinent)

# ------------------------------------------ display the map
tm_graticules() +
tm_all <- tm_graticules() +
tm_ices_rectangle +
tm_ices_division +
tm_positive_catch +
Expand All @@ -240,5 +240,10 @@ tm_draw <- function(species_latin_name,
main.title = species_latin_name, # suppress at the end
# legend.position = c("right", "center"),
legend.outside = TRUE
)
)

tm_all %>%
tmap_leaflet()%>%
leaflet::hideGroup("AquaMaps") %>%
leaflet::hideGroup("positive catch of at least one species")
}

0 comments on commit a84e173

Please sign in to comment.