How does VersaTiles work?
There are many excellent FLOSS solutions for generating, processing, serving, and rendering maps. But in the end, you have to combine several solutions and build a complete tech stack. That takes a lot of effort.
VersaTiles tackles this problem by defining a four-step process chain that defines how to process OpenStreetMap data and serve it as an interactive web map. It also provides a reference implementation of these four steps, but is flexible enough so that any step can be replaced by your preferred solution. For example, if you want to use a different tile source, server or frontend, you can simply replace the relevant part and still use the other steps.
The 4 steps of VersaTiles
The grey boxes represent data. The red boxes are steps that process the data. The whole process chain takes OSM data as input and produces a web map as output.
The process chain in more details:
We use the latest OSM dump. | |
Generator produces vector tiles. We use Tilemaker to generate vector tiles in shortbread schema. | |
a versatiles container, a much simpler and more efficient tile storage format than .mbtiles. | |
Server is serving the vector tiles. | |
... but only speaks HTTP, because ... | |
The Network handles the network stuff, like TLS certificates, caching, load balancing, etc. | |
Now we serve tiles to the internet ... | |
The Frontend loads and renders the vector tiles. | |
Enjoy. |
We combined permissively licensed open source software, data, schemas and styles, such as Tilemaker, Shortbread Tiles Schema and MapLibre.
VersaTiles lets you use OpenStreetMap-based vector tiles, without any restrictions, locked-in paid services or attribution requirements beyond OpenStreetMap. You can use the freely downloadable tilesets from VersaTiles on your own infrastructure, in any way you like. Our open spec, royalty-free and permissively licensed implementations work with virtually any architecture.
What tools do we provide?
- versatiles-generator provides scripts to generate tiles as VersaTiles containers. It uses a pre-built Docker image. We use the Generator regularly to generate tiles and upload them to download.versatiles.org.
- shortbread-tilemaker contains configuration files and scripts to configure Tilemaker to generate vector tiles in the Shortbread schema.
- node-versatiles-container is an NPM package for reading VersaTiles containers in Node.js.
- node-versatiles-google-cloud is a client written in Node.js to run a VersaTiles server in Google Cloud Run.
- node-versatiles-server is a server written in Node.js.
- versatiles-rs is a multitool written in Rust. It can convert, compress, extract and serve VersaTiles containers.
- versatiles-docker defines and builds multiple Docker images.
- maplibre-versatiles-styler is a MapLibre plugin for generating VersaTiles styles.
- versatiles-style generates and contains map styles and also provides an NPM package for generating styles in JavaScript.
- versatiles-fonts generates glyphs.
- versatiles-frontend builds frontend packages.
- versatiles-renderer a preliminary tool to render maps in the backend as SVG or PNG.
- versatiles-documentation contains all the documentation \o/.
Need more information?
We have collected some guides and explanations in our documentation repository, including a comprehensive compendium. Hopefully we will be able to integrate the documentation into the website in the near future.