Tileserver
docker-compose setup for tileserver-gl.
Screenshot
Install
Install docker and docker-compose.
sudo apt-get install docker-compose
Ensure Fonts
By default there are some special fonts that are required for rasterized tiles. Run this to install them:
make install_fonts
Build & Run
This will docker-compose up
the tileserver and expose it on http://localhost:8085. Feel free to change ports in docker-compose.yml
.
make up
Obtain Datasets:
By default, it will download the demo dataset zurich_switzerland.mbtiles
to ./data
.
You may want to add more datasets:
There are some TOS items to agree to, but they're all basically free.
Usage
I can recommend using react-leaflet to load up these tiles.
- Admin panel: http://localhost:8085/
- Basic style pattern:
- Example: http://localhost:8085/styles/klokantech-basic/13/4292/2868.png
- Leaflet Tilelayer url: http://localhost:8085/styles/klokantech-basic/{z}/{x}/{y}.png
- OSM Bright style pattern:
- Example: http://localhost:8085/styles/osm-bright/13/4292/2868.png
- Leaflet Tilelayer url: http://localhost:8085/styles/osm-bright/{z}/{x}/{y}.png