Skip to content

Commit a9aad36

Browse files
committed
Changed the tile layer in the Leaflet map from CARTO as this now requires an API key. Adjusted the mix and max zoom accordingly.
1 parent 5e73bda commit a9aad36

2 files changed

Lines changed: 1139 additions & 579 deletions

File tree

index.Rmd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ sd_table <- select(df, name, headteacher, website, nursery_provision, sixth_form
3636
```
3737

3838
```{r, map}
39-
map <- leaflet(sd, width = "100%", height = 350) %>%
40-
addTiles(urlTemplate = "https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png", attribution = '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors &copy; <a href="https://carto.com/attributions">CARTO</a> | <a href="https://www.ons.gov.uk/methodology/geography/licences">Contains OS data © Crown copyright and database right (2020)</a> | Data: <a href="https://get-information-schools.service.gov.uk" target="_blank">Department for Education</a>', options = tileOptions(minZoom = 11, maxZoom = 18)) %>%
39+
map <- leaflet(sd, width = "100%", height = 350, options = leafletOptions(zoomControl = TRUE, minZoom = 10, maxZoom = 16)) %>%
40+
addTiles(urlTemplate = "", attribution = '<a href="https://www.ons.gov.uk/methodology/geography/licences">Contains OS data © Crown copyright and database right (2023)</a> | <a href="https://www.trafforddatalab.io">@traffordDataLab</a>') %>%
41+
addProviderTiles(providers$Esri.WorldGrayCanvas) %>% # Base map tiles
4142
addPolygons(data = sf, fillColor = "#CCCCCC", weight = 0.8, opacity = 1, color = "#212121") %>%
4243
addAwesomeMarkers(popup = df$popup, icon = ~makeAwesomeIcon(icon = "fas fa-school", library = "fa", iconColor = "#FFFFFF", markerColor = "purple")) %>%
4344
addFullscreenControl()

0 commit comments

Comments
 (0)