OSM Cyclo Bright
A Mapbox GL basemap style showcasing OpenStreetMap data for cyclists. It is using the vector tile schema of OpenMapTiles.
Static vector tiles
Build the style, create static vector tiles and start nginx as web server behind a reverse-proxy with a self-signed certificate:
make start-static-tileserver
Visit https://localhost to see a map with the OSM Cyclo Bright style.
Afterwards, the tileserver can be stopped with:
make stop
Vector and raster tiles
Build the style, create a single .mbtiles file and start mapbox-gl as server behind a reverse-proxy with a self-signed certificate:
make start-tileserver-gl
Visit https://localhost to see the TileServer GL overview page which redirects to raster and vector map previews. The raster tile map is less sharp and does not provide smooth zooming, but it can be viewed on webbrowsers without WebGL support.
Afterwards, the tileserver can be stopped with:
make stop
Configuration
To create the tiles for a different region, one can either adjust the variables at the head of the Makefile or override them as shown in the following.
Example for the city Oulu, Finnland
# Vector and raster tiles
make \
NAME=oulu \
REGION_URL='https://download.geofabrik.de/europe/finland-latest.osm.pbf' \
MIN_LON=24.37 \
MAX_LON=26.61 \
MIN_LAT=64.71 \
MAX_LAT=65.38 \
start-tileserver-gl
Visit https://localhost/styles/bicycle/#12.1/65.01029/25.47406
# Static vector tiles
make \
NAME=oulu \
REGION_URL='https://download.geofabrik.de/europe/finland-latest.osm.pbf' \
MIN_LON=24.37 \
MAX_LON=26.61 \
MIN_LAT=64.71 \
MAX_LAT=65.38 \
start-static-tileserver
Visit https://localhost
Example for Finnland
# Vector and raster tiles
make \
NAME=finland \
REGION_URL='https://download.geofabrik.de/europe/finland-latest.osm.pbf' \
MIN_LON=18.77 \
MAX_LON=32.0 \
MIN_LAT=59.32 \
MAX_LAT=70.27 \
start-tileserver-gl
Visit https://localhost/styles/bicycle/#12.1/65.01029/25.47406
# Static vector tiles
make \
NAME=finland \
REGION_URL='https://download.geofabrik.de/europe/finland-latest.osm.pbf' \
MIN_LON=18.77 \
MAX_LON=32.0 \
MIN_LAT=59.32 \
MAX_LAT=70.27 \
start-static-tileserver
Visit https://localhost
Edit the Style
Local Maputnik installation
Use the Maputnik CLI to edit and develop the style.
make style.json
maputnik --watch --file style.json
After you've started Maputnik open the editor on http://localhost:8000.
Maputnik Docker container
Alternatively, start Maputnik as Docker container and upload style.json from the web interface.
make style.json
sudo docker run -it --rm -p 8888:8888 maputnik/editor
After you've started Maputnik open the editor on http://localhost:8888.