Map tiles
It is possible to set various default tileLayer properties for zoomable map visualisations
Setting default tile layer§
The default tile layer is CartoDB.Positron
. You can change it to one of
CartoDB.Positron
, CartoDB.PositronOnlyLabels
, CartoDB.DarkMatter
, CartoDB.DarkMatterNoLabels
, CartoDB.Voyager
, CartoDB.VoyagerNoLabels
, CartoDB.VoyagerOnlyLabels
, ESRI.WorldImagery
, OpenStreetMap.Mapnik
, Stadia.OSMBright
by updating _config.[js|ts]
with e.g.:
site.use(oiLumeViz({
...
"map": {
"tileLayer": "CartoDB.DarkMatter"
},
...
}));
Setting new tile layers§
If you would like to set your default tile layer to something else, you can add it to the tile layers list by updating _config.[js|ts]
e.g.:
site.use(oiLumeViz({
...
"map": {
"tileLayers": {
"OpenPlanetary.Mars": {
"url": "https://cartocdn-gusc.global.ssl.fastly.net/opmbuilder/api/v1/map/named/opm-mars-basemap-v0-2/all/{z}/{x}/{y}.png",
"attribution": "Tiles © OpenPlanetaryMapd"
},
},
"tileLayer": "OpenPlanetary.Mars"
},
...
}));
This defines a tile layer named "OpenPlanetary.Mars" and then sets that as the default.