A high-performance Rust static map renderer and tile proxy, following SwiftTileserverCache.
Uses Martin as a tileserver and MapLibre Native to render static maps.
GET/POST /staticmap: Render a single static map.GET/POST /staticmap/{template}: Render a static map using a Tera template.POST /multistaticmap: Render a grid of static maps.GET/POST /multistaticmap/{template}: Render a multistaticmap using a Tera template.GET /tiles/{id}/{z}/{x}/{y}: Mirror and cache external tile sources.
git clone https://github.com/ccev/rsts && cd rstscp docker-compose.example.yml docker-compose.yml && cp martin.example.yml martin.yml && cp rsts.example.toml rsts.tomldocker compose pull- We're now setting up martin. Refer to their docs for additional guidelines
- Get your desired mbtiles and put them into
data/mbtilesand call the file{source name}.mbtiles. You may create a syslink if you already have a file, or download them from openmaptiles - Get your desired styles.
- Go to https://maputnik.github.io/editor/
- Click
Open, choose your desired style, then clickExportandDownload - Put the downloaded json file in
data/styles. Call it{style name}.json - Now open the json, towards the top you will find
sources.openmaptiles.url. Change the url tohttps://your-public-domain.com/{source name}with{source name}being your name from step 5. - Under
spriteyou will find an url to a sprite repository. You could keep it, or host them yourself. Download the assets and put them indata/sprites/{style name}, then add this path tomartin.yml. Now replace the url withhttps://your-public-domain.com/sprite/{style name} - Replace the
glyphsurl withhttps://your-public-domain.com/font/{fontstack}/{range}, then serach fortext-fontin the json. You will find one, or multiple font families. Search the web for download links to them, then paste the files intodata/fonts. You may organize them into subdirectories.
docker compose up -dshould now start the server. You can checkhttp://url:3000for Martin's admin dashboard.- Make sure you either disable this admin dashboard for production use (uncomment
web_uiinmartin.yml) or put it behind basic auth - [TBD] Now, put both Martin and rsts behind a reverse proxy. You may also setup Cloudflare Cache rules
This project is entirely vibe-coded. Beware accordingly.