Skip to contents

Style a leaflet map

Usage

addCouncilStyle(
  map,
  add_dists = FALSE,
  highlight_dists = NULL,
  dist_year = "2013",
  highlight_color = "#cdd9f1",
  minZoom = 10,
  maxZoom = 15
)

Arguments

map

A leaflet map

add_dists

Boolean. Add council districts?

highlight_dists

a vector including the numbers of council districts that you would like to use a non-standard color for the numeric label. Especially useful when using the "cool" palette with council districts as the label color here blends right in.

dist_year

Either "2013" (for 2013-2023 lines) or "2023" (for 2023-2033 lines).

highlight_color

used IF you specify a list of highlight_dists as the color for their text. Defaults to white

minZoom

Minimum zoom level for the map. Defaults to 10.

maxZoom

Maximum zoom level for the map. Defaults to 15.

Value

A leaflet map that in has City Council styles, including tiles, council district outlines, and fonts

Examples

library(leaflet)
#> 
#> Attaching package: ‘leaflet’
#> The following objects are masked from ‘package:councildown’:
#> 
#>     addPolygons, colorBin
library(councildown)
leaflet() %>%
 addCouncilStyle(add_dists=TRUE)
#> Error in loadNamespace(x): there is no package called ‘leaflet.extras’