If you already have a custom map style package, you can proceed. Skip this configuration if you are comfortable using the default maps. Or, prepare your own map package for offline use and come back.
Add your map package to the map/data folder. You can prepare your own or download our default map package here. Your map/data folder structure should look like:
The three files that are absolutely required are style.json, config.json, and one or more tile sources (in mbtiles or pmtiles format). Fonts and sprites are only needed if your style is using them.
Your style specification must include reference to the name of your style:
{"sources": { "terrastories-map": { // This MUST be terrastories-map OR you MUST update the config.json file to reflect your chosen name
"type":"vector",// or raster "url": "pmtiles://tiles.pmtiles" // or "mbtiles://tiles.mbtiles". If your tile filename has a different name instead of "tiles", then change that too.
} },"sprite": "sprite", // optional, only needed if your style utilizes sprites by name"glyphs": "{fontstack}/{range}.pbf", // optional, only needed if your style utilizes fonts by name// the rest of your style specifications}
For more information on custom maps, please see the Github repository README.md.
Use a custom Tileserver
If you are already hosting your own Tileserver, update compose.yaml file to remove the tileserver service and update the TILESERVER_URL to point to your hosted Tileserver: