Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self hosting #472

Closed
ethicnology opened this issue Oct 5, 2024 · 3 comments
Closed

Self hosting #472

ethicnology opened this issue Oct 5, 2024 · 3 comments

Comments

@ethicnology
Copy link

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
@bdon
Copy link
Member

bdon commented Oct 7, 2024

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

@ethicnology
Copy link
Author

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.

@bdon
Copy link
Member

bdon commented Oct 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants