Basemap PMTiles generation and cartographic styles for OpenStreetMap data and more
See the codeBuild a cartographic "basemap" PMTiles from OpenStreetMap + other datasources, plus MapLibre styles for displaying them in a browser.
To get started, check out some basic examples:
This repository is organized into parts:
app: A single-page app, https://maps.protomaps.com for viewing and downloading basemap builds.tiles/: A Planetiler build profile that generates planet.pmtiles from OpenStreetMap and Natural Earth in 2-3 hours on a modest computer.styles/: A TypeScript package that generates MapLibre GL styles, in multiple color themes, that can be used via npm or exported as JSON.Assets such as fonts and sprites are hosted and downloadable at the basemaps-assets repository.
You will need Java 21+ and Maven installed, which is available in most package managers.
Generate and inspect a basemap PMTiles of any named area:
git clone [email protected]:protomaps/basemaps.git
tiles directory, download dependencies and compile the JAR:cd basemaps/tiles
mvn clean package
monaco.pmtiles in the current directory:java -jar target/*-with-deps.jar --download --force --area=monaco
app/ directory to run the map frontend:cd app
nvm use
npm ci
npm run dev
The locally generated pmtiles can be fetched from http://localhost:5173/monaco.pmtiles
mvn spotless:apply
Summary:
We kindly request that you attribute the Protomaps project if you use the basemap styles unmodified or with additions, but you are not required to do so. The visual design copyright of the maps is released under a Creative Commons Zero (CC0) license to eliminate ambiguity around derivative or combined works of map styling code, and to publish software, such as NPM packages, under the standard BSD-3 license.
The tilesets that power the Protomaps basemap are Produced Works of the OpenStreetMap dataset under the Open Database License. Web maps and native apps that use this Produced Work must visibly attribute © OpenStreetMap - for example, in the corner of the map display. If your map only uses the Map Styles with non-OpenStreetMap tilesets, this attribution is not required.
Example web map corner attribution:
<a href="https://github.com/protomaps/basemaps">Protomaps</a> © <a href="https://openstreetmap.org">OpenStreetMap</a>
Tilesets also include data from Natural Earth and other sources, which does not require corner attribution. Other data sources your map uses may require additional attribution: See LICENSE_DATA.md.
Depending on map style, MIT-licensed icons may also be included from the Tangram Icons repository.
The software in this repository is made available under a BSD 3-Clause License, and includes license notices related to Protomaps LLC, Mapzen, and the Linux Foundation. You must retain these license notices in software source code derived from this repository.
If you distribute a modified “fork” of these basemap styles or tilesets, or provide a tiles API based on them, you must name your product or service something different from Protomaps. Free and unmodified redistributions of tiles and styles are permitted to use the name. No restrictions apply to the underlying technology .pmtiles which is an open specification in the public domain.
These guidelines are subject to change with the addition of other open datasets. Any questions can be addressed to [email protected].
6,268 followers · starred May 2023
485 followers · starred Jul 2024
501 followers · starred Oct 2024
64 followers · starred May 2025
Basemap PMTiles generation and cartographic styles for OpenStreetMap data and more
See the codeBuild a cartographic "basemap" PMTiles from OpenStreetMap + other datasources, plus MapLibre styles for displaying them in a browser.
To get started, check out some basic examples:
This repository is organized into parts:
app: A single-page app, https://maps.protomaps.com for viewing and downloading basemap builds.tiles/: A Planetiler build profile that generates planet.pmtiles from OpenStreetMap and Natural Earth in 2-3 hours on a modest computer.styles/: A TypeScript package that generates MapLibre GL styles, in multiple color themes, that can be used via npm or exported as JSON.Assets such as fonts and sprites are hosted and downloadable at the basemaps-assets repository.
You will need Java 21+ and Maven installed, which is available in most package managers.
Generate and inspect a basemap PMTiles of any named area:
git clone [email protected]:protomaps/basemaps.git
tiles directory, download dependencies and compile the JAR:cd basemaps/tiles
mvn clean package
monaco.pmtiles in the current directory:java -jar target/*-with-deps.jar --download --force --area=monaco
app/ directory to run the map frontend:cd app
nvm use
npm ci
npm run dev
The locally generated pmtiles can be fetched from http://localhost:5173/monaco.pmtiles
mvn spotless:apply
Summary:
We kindly request that you attribute the Protomaps project if you use the basemap styles unmodified or with additions, but you are not required to do so. The visual design copyright of the maps is released under a Creative Commons Zero (CC0) license to eliminate ambiguity around derivative or combined works of map styling code, and to publish software, such as NPM packages, under the standard BSD-3 license.
The tilesets that power the Protomaps basemap are Produced Works of the OpenStreetMap dataset under the Open Database License. Web maps and native apps that use this Produced Work must visibly attribute © OpenStreetMap - for example, in the corner of the map display. If your map only uses the Map Styles with non-OpenStreetMap tilesets, this attribution is not required.
Example web map corner attribution:
<a href="https://github.com/protomaps/basemaps">Protomaps</a> © <a href="https://openstreetmap.org">OpenStreetMap</a>
Tilesets also include data from Natural Earth and other sources, which does not require corner attribution. Other data sources your map uses may require additional attribution: See LICENSE_DATA.md.
Depending on map style, MIT-licensed icons may also be included from the Tangram Icons repository.
The software in this repository is made available under a BSD 3-Clause License, and includes license notices related to Protomaps LLC, Mapzen, and the Linux Foundation. You must retain these license notices in software source code derived from this repository.
If you distribute a modified “fork” of these basemap styles or tilesets, or provide a tiles API based on them, you must name your product or service something different from Protomaps. Free and unmodified redistributions of tiles and styles are permitted to use the name. No restrictions apply to the underlying technology .pmtiles which is an open specification in the public domain.
These guidelines are subject to change with the addition of other open datasets. Any questions can be addressed to [email protected].
6,268 followers · starred May 2023
485 followers · starred Jul 2024
501 followers · starred Oct 2024
64 followers · starred May 2025