docker run \
--rm \
-p 3000:3000 \
-v "$(pwd)/data-mbtiles":/data-mbtiles \
ghcr.io/maplibre/martin /data-mbtiles
bash ./run_martin.sh
sudo vim /etc/nginx/sites-enabled/default
https://maplibre.org/martin/run-with-nginx.html#rewriting-urls
PBF files are cached for 1h
location ~ /mbtiles/v2/(?<fwd_path>.*) {
proxy_set_header X-Rewrite-URL $uri;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
proxy_pass http://127.0.0.1:3000/$fwd_path$is_args$args;
}
location ~ /mbtiles/v2/(?<fwd_path>.pbf) {
proxy_set_header X-Rewrite-URL $uri;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_redirect off;
add_header Cache-Control "public, max-age=3600";
proxy_pass http://127.0.0.1:3000/$fwd_path$is_args$args;
}
sudo systemctl restart nginx
-
Poland booking.com hotels
- data exported from booking.com
- converted to mbtiles using tippecanoe
-
Zanocuj w lesie
- velomapa.pl/mapy/zanocuj-w-lesie
- generate geojson:
npm run zanocuj-w-lese:geojson
- convert to mbtiles using tippecanoe
```bash
npm run zanocuj-w-lese:mbtiles
- Poland parks
- velomapa.pl/mapy/parki
- data extracted from osm
- converted to geojson with travelermap.net scripts
- converted to mbtiles using tippecanoe
https://github.com/felt/tippecanoe
tippecanoe -o data-mbtiles/zanocuj-w-lesie.mbtiles data-geojson/zanocuj-w-lesie.geojson --force
tippecanoe -z14 -o data-mbtiles/poland_bookingcom_hotels.mbtiles -r1 --cluster-distance=20 --cluster-maxzoom=13 data-geojson/poland_bookingcom_hotels.geojson --force