A port of OpenStreetMap Carto targeting client-side rendering with vector tiles.
Previous work has used tilelive which is a technical dead-end, used existing vector tile sets which didn't have the richness of OpenStreetMap Data that OpenStreetMap Carto shows, or has not been intended to be a continuation of the OpenStreetMap Carto project.
Install Tilekiln with
python3 -m venv venv
source venv/bin/activate
pip install tilekiln
Install Tilekiln. Generate tiles with tilekiln-generate area -d gis vector.yaml tiles/
.
You can't generate for just a bounding box until it is implemented in tilekiln so it helps to have database CPU to throw at this.
Make a TileJSON with information about the tiles with tilekiln-tilejson vector.yaml "http://localhost:8080/tiles/{id}/{z}/{x}/{y}.mvt" > tiles/dev.json
Serve up the tiles with ./serve.py
and you'll get a tilejson at http://localhost:8080/tiles/dev.json
and the stylesheet at http://localhost:8080/openstreetmap-cartographic.json
. Load the stylesheet into something like Fresco for a better editing experience.
If you get fancy and aren't loading tiles from localhost, make sure to set your CORS headers and update the URLs.
We're targeting deploying on the scale of tile.openstreetmap.org and pre-generation makes sense there. It's also way easier operationally.
The code and cartography is licensed under CC0 as described in LICENSE.txt.
OpenStreetMap is a trademark of the OpenStreetMap Foundation, and is used with their permission. This project is not endorsed by or affiliated with the OpenStreetMap Foundation.