Self hosting
Hello, protomaps looks an amazing project but when it comes to self-hosting without using a listed provider or caddy there is not so much informations.
After using the command pmtiles serve and then trying to load the URL into pmtiles viewer it doesn't display anything (offset is outside the bounds of the DataView) while my logs display :
2024/10/05 12:54:13 main.go:154: served 204 %2F in 62.207µs
2024/10/05 12:54:30 main.go:154: served 204 %2F in 25.889µs
2024/10/05 12:55:02 main.go:154: served 204 %2F in 21.801µs
2024/10/05 12:55:36 main.go:154: served 204 %2F in 19.316µs
…
From pmtiles viewer I've tried, I'm serving --cors="*" 20241004.pmtiles:
- plain http on localhost:8080
- plain http on remote host
- https (ssl) on remote host
- https (ssl) through reverse proxy
the PMTiles viewer is designed for client-side decoding, if you are running pmtiles serve you can use any map renderer that supports ZXY urls like maputnik: http://maplibre.org/maputnik/
but I understand it may be convenient to view those: #286
without using a listed provider or caddy there is not so much informations.
What information would be helpful in addition to these?
https://docs.protomaps.com/pmtiles/cli#serve https://docs.protomaps.com/deploy/server
Thank you for your time and quick answer.
I guess once we use the command pmtiles serve what we want is to try the setup.
For example, I tried maputnik but I can't do much, I tried to open various URL on my self-hosted and then from protomaps api, they all fail.
https://api.protomaps.com/tiles/v3.json?key=with_my_key
https://api.protomaps.com/tiles/v3/{z}/{x}/{y}.mvt?key=with_my_key
I also tried to use .png because most libraries are compatible with this format but it doesn't seems to work either.
I tried maputnik but I can't do much
You need to add it as a TileJSON (vector) source
https://api.protomaps.com/tiles/v3.json?key=with_my_key
did you allow the CORS origin https://maplibre.org ?
I also tried to use .png because most libraries are compatible with this format but it doesn't seems to work either.
PMTiles only stores one tile type, if you store vector data you need to fetch vector data.