Geoserver and other map servers can be used to create map tiles. Often, these tiles are created on the fly, which is ideal for keeping the storage to a minimum, but less ideal for clients who may have to wait a long time before seeing something on the map. This tool allows you to query the map server, triggering it to create all tiles within a certain boundary. Optionally, you can cache the tiles too, which is ideal for offline use.
Usage: prerender-map-tiles [options] <server> <minLon> <maxLon> <minLat> <maxLat>
Pre-render map tiles for a map server within specified bounding box, and optionally cache them to disk.
Arguments:
server Server URL (e.g., http://localhost:8080)
minLon Minimum longitude
maxLon Maximum longitude
minLat Minimum latitude
maxLat Maximum latitude
Options:
-m, --min-zoom <number> Minimum zoom level (default: "8")
-z, --max-zoom <number> Maximum zoom level (default: "18")
-o, --output <dir> Output directory for cached tiles
-c, --concurrency <number> Number of concurrent requests (default: "5")
-d, --delay <number> Delay between requests in ms (default: "100")
-t, --timeout <number> Request timeout in seconds (default: "120")
-f, --format <string> Format for cached tiles (default: "pbf")
--osm Use OSM/Google tile schema instead of (default) TMS (default: false)
-h, --help display help for commandbun installTo build the project, run the following command:
bun buildTo prerender map tiles, run the following command:
bun src/index.mts --server=http://localhost:8080 --minLon=-122 --maxLon=-120 --minLat=37 --maxLat=38 --maxZoom=12 --output=tiles