This content applies to a previous version of CARTO
In October 2021 we released a new version of our platform. You can find the latest documentation at docs.carto.com
How can I customize the basemap?
Introduction to basemaps in CARTO
Why do I need this?
- You want to learn about basemaps in CARTO.
- You want to customize labels.
- You want to use your own basemap.
What is a basemap?
Basemaps are image tiles that are used to render the graphical representation of your map background.
These tiles include natural and cultural features such as water bodies, topography, parks, terrain, roads, streets, and buildings. They also display text labels for cities, countries, and other geographical features.
Managing labels
CARTO basemaps (Voyager, Positron, and Dark Matter) offer three label options:
- Default or labels on top
- Labels below
- Lite or no labels
Builder
Select any of these three types from the basemap carousel in Builder.
CARTO.js
You can add labels on top of your data layer using tile layers with different z-index properties:
// Adding Voyager Basemap
L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png', {
maxZoom: 18
}).addTo(map);
// Adding Voyager Labels
L.tileLayer('https://{s}.basemaps.cartocdn.com/rastertiles/voyager_only_labels/{z}/{x}/{y}.png', {
maxZoom: 18,
zIndex: 10
}).addTo(map);
Using your own basemap
In Builder and CARTO.js, you can import external basemaps from Mapbox, WMS/WMTS, TileJSON, and NASA imagery sources. You can also apply a solid background color or use custom tilesets via XYZ URLs (supporting .png, .jpg, or .gif formats).
