Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


CartoDB basemaps

Subscribe to updates I use CartoDB-basemaps

Statistics on CartoDB-basemaps

Number of watchers on Github 44
Number of open issues 34
Average time to close an issue 4 months
Main language CartoCSS
Average time to merge a PR 14 days
Open pull requests 2+
Closed pull requests 7+
Last commit about 4 years ago
Repo Created almost 6 years ago
Repo Last Updated over 2 years ago
Size 28.2 MB
Homepage http://cartodb.co...
Organization / Authorcartodb
Page Updated
Do you use CartoDB-basemaps? Leave a review!
View open issues (34)
View CartoDB-basemaps activity
View on github
Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted)
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating CartoDB-basemaps for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

CartoDB Basemaps

This is the source code and styles for the CartoDB Basemaps, designed by Stamen.

The code and styles here are intended for serving the basemaps on your own local CartoDB instance and developing the styles, if you just want to use them for your own map, you should use our hosted version.

What does what?

This style is designed to work with CartoDB and Windshaft, so is structured differently than a standard CartoCSS project.

  • All CartoCSS styles live in /styles. Layers for a map style are defined in named YAML files in the root directory, and it selects layers from the layers catalog in layers.yml.

  • The map style layers file is combined with the catalog using cartodb-yaml

  • There's two places where database stuff (materialized views, PL/PGSQL functions) are defined.

    • global_functions.sql is where all the functions go. This needs to be loaded first.
    • generalizations.yml describes the materialized views, this is read by generalizations_sql.js to output either raw SQL or issue queries.


Install the required software with npm install


Create a the file config.json in this directory with your CartoDB host and API key. An example is config.json.template.

  "api_key": "API_KEY",
  "cdb_url": "https://myuser.cartodb.com"

You can find the API key at https://myuser.cartodb.com/your_apps

Loading data

Instructions for loading data into a CartoDB instance can be found in the data readme.


This style is intended to be used with the Atom text editor and CartoDB extension.

  1. Download and install Atom.
  2. Install the cartodb and language-carto packages.
  3. Set the CartoDB username (e.g. myuser) and API key
  4. Open a map YAML file, e.g. positron-all.yml.
  5. Under Packages -> CartoDB, open a preview

Named map creation

To let users access the basemap without an API key, the script create_named.js can be used.

For the six maps listed on the basemap page this can be done with

node create_named.js positron-all.yml light_all
node create_named.js positron-all-lowercase.yml light_all_lowercase
node create_named.js positron-no-labels.yml light_nolabels
node create_named.js positron-labels-only.yml light_only_labels
node create_named.js dark-matter-all.yml dark_all
node create_named.js dark-matter-all-lowercase.yml dark_all_lowercase
node create_named.js dark-matter-no-labels.yml dark_nolabels
node create_named.js dark-matter-labels-only.yml dark_only_labels


This project follows a MAJOR.MINOR.PATCH versioning system. In the context of a cartographic project you can expect the following:

PATCH: When a patch version is released, there would be no reason not to upgrade. PATCH versions contain only bugfixes e.g. stylesheets won't compile, features are missing by mistake, etc.

MINOR: These are routine releases. They will contain changes to what's shown on the map, how they appear, new features added and old features removed. They may rarely contain changes to assets i.e. shapefiles and fonts but will not contain changes that require software or database reloads. They may contain function or view changes that can be done without downtime or a reload.

MAJOR: Any change the requires reloading a database, or upgrading software dependecies will trigger a major version change.

The master branch only contains versions tagged and released, while work is merged to the develop branch.


Commits from the develop branch are automatically pushed to the develop basemap server by Travis. Releases require manually pushing to the production server with create_named.js.

CartoDB-basemaps open issues Ask a question     (View All Issues)
  • almost 4 years Misplaced label for Biggin Hill in London
  • about 4 years Incorrect labels at specific location
  • about 4 years Torn up rainbow in the Brooklyn CARTO Office
  • about 4 years Duplicate labels
  • about 4 years Label for Queens, NY never shows up
  • over 4 years Add 'nutibright' style to CartoDB style selection
  • over 4 years Label code duplicated between all and label only styles
  • over 4 years Mat view refresh time
  • over 4 years Incorrect island name in positron
  • over 4 years Use encrypted vars instead of config
  • over 4 years City label in Netherlands is not showing up
  • over 4 years Check for existing syncronizations when loading
  • over 4 years Use imposm config file
  • over 4 years Use update map call
  • over 4 years Materialized view refresh order
  • over 4 years zoom function returns wrong level for levels < 3
  • almost 5 years Fictional Location in Manchester labeled
  • almost 5 years Outdated label for Barbate (Cรกdiz)
  • almost 5 years Republic of Cyprus
  • almost 5 years Incorrect label hierarchy North Shore - Port Macquarie (Australia)
  • about 5 years positron: highway interchanges are missing at z12
  • about 5 years positron: reservoirs use text-placement: line
  • over 5 years Suggestion: add parameter to get OSM labels in different languages
  • over 5 years Incomplete state borders in Mexico
  • over 5 years State borders don't show over water
  • over 5 years Missing road segments when coincident with tram
  • over 5 years duplicated park names
  • over 5 years racetracks are not rendered
  • over 5 years How to show disputed boundaries?
CartoDB-basemaps open pull requests (View All Pulls)
  • demote North Shore to fix #31
  • Only labels styles for positron and dark matter
CartoDB-basemaps list of languages used
Other projects in CartoCSS
Powered by Autocode - Instant Webhooks, Scripts and APIs
Autocode logo wordmark