Closed jon4hz closed 1 month ago
I like this change, something I do not have to implement for my own. ;-)
General information for the ones they want to use the upload function. The "local" tiles used here are from swisstopo: https://api3.geo.admin.ch/services/sdiservices.html#gettilesets https://www.geo.admin.ch/en/vector-tiles-service-available-services-and-data The variant ch.swisstopo.leichte-basiskarte.vt.mbtiles is used.
The tiles from swisstopo are in mbtiles format (an SQLite db file). To get "own" corresponding pmtiles file you need to download and convert it:
wget https://vectortiles.geo.admin.ch/tiles/ch.swisstopo.leichte-basiskarte.vt/v3.0.0/ch.swisstopo.leichte-basiskarte.vt.mbtiles
or
wget https://vectortiles.geo.admin.ch/tiles/ch.swisstopo.base.vt/v1.0.0/ch.swisstopo.base.vt.mbtiles
wget https://github.com/protomaps/go-pmtiles/releases/download/v1.19.1/go-pmtiles_1.19.1_Linux_x86_64.tar.gz
tar -xf go-pmtiles_1.19.1_Linux_x86_64.tar.gz
./pmtiles convert ch.swisstopo.leichte-basiskarte.vt.mbtiles ch.swisstopo.leichte-basiskarte.vt.pmtiles
or
./pmtiles convert ch.swisstopo.leichte-basiskarte.vt.mbtiles ch.swisstopo.leichte-basiskarte.vt.pmtiles
PS: it would also be possible to limit the range converted if file size is an issue for you, see pmtiles documentation https://github.com/protomaps/go-pmtiles/
Thanks a lot for the instructions on how to build the .pmtiles
, I was already wondering how you got them :)
In case anyone wants to test this without building the pmtiles themselves, they can download the file here: https://zskarte.blob.core.windows.net/etienne/ch.swisstopo.pmtiles
That's the url hardcoded in the source code here.
Hi,
This PR improves how the
zskarte
handles local map data:.pmtiles
file. This allows you to upload the map locally if you suddenly loose connection to the internet and didn't download the local map earlier.In 87c0ec40561a5d07754707f587ff3c0ace7ff925 I've added the
devcontainer.json
which I used so I can work using github codespaces. If you don't want this in your codebase, let me know and I'll remove it.