Skip to content

Commit

Permalink
Modification des chaussées désignées en lignes pointillées. Début du …
Browse files Browse the repository at this point in the history
…travail pour ajouter une légende selon les différentes couches affichées.
  • Loading branch information
jeremieboudreault committed Jul 2, 2021
1 parent 2cd1f27 commit 79da2d2
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions R/prepare_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ lines_qc$COL[lines_qc$TYPE == map_names["BC"]] <- "green"
lines_qc$COL[lines_qc$TYPE == map_names["CD"]] <- "green"


# Adjust dash.
lines_qc$DASH <- ""
lines_qc$DASH[lines_qc$TYPE == map_names["PC"]] <- ""
lines_qc$DASH[lines_qc$TYPE == map_names["BC"]] <- ""
lines_qc$DASH[lines_qc$TYPE == map_names["CD"]] <- "4"


# Extract <WINTER> and <FUTUR> -------------------------------------------------


Expand Down Expand Up @@ -143,7 +150,7 @@ leaflet::addPolylines(
color = ~COL,
weight = ~LWD,
opacity = 1L,
dashArray = NULL,
dashArray = ~DASH,
smoothFactor = 1
) %>%

Expand All @@ -155,11 +162,12 @@ leaflet::addPolylines(
color = "#EB5E28",
weight = ~LWD,
opacity = 0.95,
dashArray = NULL,
dashArray = ~DASH,
smoothFactor = 1,
label = ~NOM_TOPOGR,
labelOptions = leaflet::labelOptions(noHide = TRUE),
popup = ~DESC
#label = ~DESC,
#labelOptions = leaflet::labelOptions(noHide = TRUE, minZoom = 12L),
popup = ~DESC,
popupOptions = leaflet::popupOptions(maxWidth = 200L)
) %>%

# Add the "Winter".
Expand Down Expand Up @@ -196,3 +204,14 @@ leaflet::addLayersControl(
options = layersControlOptions(collapse = FALSE)
)

# Add legend.
# leaflet::addLegend("bottomright",
# colors = c("darkgreen", "darkgreen", "green"),
# labels = unlist(map_names[c("PC", "BC", "CD")], use.names = FALSE),
# group = map_names[["RCE"]]
#
# )

map


0 comments on commit 79da2d2

Please sign in to comment.