R/contours.R

Defines functions contours

Documented in contours

#' contours
#'
#' met les contours des régions sur la carte de la France
#'
#' @param map fond de carte
#'
#' @return leaflet object
#' @import leaflet
#' @export
#' @examples contours(map=fond_carte())

contours<-function(map){
  for (i in c(1:27)){
    block=blocks[[i]]
    region=matrix(block,ncol = 2, byrow = TRUE)
    index <- c(2, 1)
    region <- region[, index]
    map <- leaflet::addPolygons(map, data = region, color = "blue",
                                weight = 0.5, smoothFactor = 0.9, opacity = 3, fillOpacity = 0.2)
  }
  map
}
l-k-11235/projetMetiers documentation built on Dec. 8, 2019, 10:04 p.m.