A named list of MapLibre-compatible style URLs for common open-source
basemaps. Pass any entry directly to the style argument of
maplamina.
Format
A named list of character strings (URLs).
- carto_positron
Light basemap with labels. Good default for thematic maps.
- carto_positron_nolabels
Light basemap without labels. Clean background for dense data.
- carto_dark_matter
Dark basemap with labels. Good for glowing point layers.
- carto_dark_matter_nolabels
Dark basemap without labels.
- carto_voyager
Colored basemap with labels. More geographic detail than Positron.
- carto_voyager_nolabels
Colored basemap without labels.
- openfreemap_liberty
OSM Liberty style hosted by OpenFreeMap. No API key required.
- openfreemap_bright
OSM Bright style hosted by OpenFreeMap. No API key required.
- openfreemap_positron
Positron style hosted by OpenFreeMap. No API key required.
- demotiles
MapLibre demo tiles. Lightweight, no API key, useful for testing.
Examples
# Polygons example (sf ships the nc shapefile)
if (requireNamespace("sf", quietly = TRUE)) {
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
maplamina(nc) |>
add_polygons(fill_color = color_quantile(~BIR74), stroke = FALSE)
maplamina(nc, style = base_tiles$carto_dark_matter) |>
add_polygons(fill_color = color_quantile(~BIR74, "Inferno"), stroke = FALSE)
}