Skip to contents

CARTO's raster basemaps — leaflet's CartoDB.* providers and the first two of mapview's default basemaps — draw an "API KEY REQUIRED" watermark on every tile since Sep 2026. This attaches cc_vector_basemap_deps() to a Leaflet or mapview map, so each CARTO raster layer on the page is drawn instead from the same basemap's vector GL style (cc_basemap_style()). Provider names, layer groups and the layer control are unchanged; other tile layers (Esri, OpenStreetMap) pass through.

Usage

cc_vector_basemap(map)

Arguments

map

a leaflet::leaflet() widget or a mapview::mapview() object

Value

map, with the dependencies attached

Examples

library(leaflet)
leaflet() |>
  addProviderTiles("CartoDB.Positron") |>
  setView(-120.5, 33, zoom = 6) |>
  cc_vector_basemap()
# mapview's default basemaps include CartoDB.Positron and CartoDB.DarkMatter mapview::mapview(cc_grid_ctrs) |> cc_vector_basemap()