go_tile serves prerendered OpenStreetMap tiles from the local filesystem prerendered by mod_tile. go_tile is a static binary based on 100 lines of Go which makes it easier to setup / reason about than Apache+mod_tile+renderd+mapnik. You don't have to worry about tile expirations, render configurations, database connections... at runtime(but of course during prerendering of the tiles).
The cache files created by mod_tile are METATILEs which can't be served directly through a webserver or e.g. S3.
Each tile in OSM is 64x64 pixels with many tiles only having ~100 bytes. mod_tile uses METATILEs to reduce the number of small files by grouping 8x8 tiles into one file.
With Docker:
docker run --rm -it -v $YOUR_TILE_FOLDER:/data -p 8080:8080 nielsole/go_tile
Now you can view your map at http://localhost:8080/. Tiles are served at http://localhost:8080/
If you prefer to run the binary directly you have the following options:
Usage of /tmp/go-build004735986/b001/exe/osm-tileserver:
-data string
Path to directory containing tiles (default "./data")
-port string
Listening port (default ":8080")
-static string
Path to static file directory (default "./static/")
-v $YOUR_TILE_FOLDER:/var/lib/mod_tiledocker exec -it $CONTAINER_NAME bashcurl -o render_list_geo.pl https://raw.githubusercontent.com/alx77/render_list_geo.pl/master/render_list_geo.plperl ./render_list_geo.pl -m ajt -n 3 -z 6 -Z 16 -x 2.5 -X 6.5 -y 49.4 -Y 51.6$YOUR_TILE_FOLDER.Content type
Image
Digest
Size
3.4 MB
Last updated
over 5 years ago
docker pull nielsole/go_tile