PMTiles icon indicating copy to clipboard operation
PMTiles copied to clipboard

Viewer that accept cloudflare worker style URLs?

Open shawaj opened this issue 2 years ago • 3 comments

In your (fantastic!) guide here... https://docs.protomaps.com/deploy/cloudflare#_3-create-worker-route

You have the URL format for the worker of: https://subdomain.mydomain.com/FILENAME/0/0/0.mvt https://subdomain.mydomain.com/FILENAME.json

Is there a viewer that can accept these kind of URLs for testing?

I know you have the viewer that can take the pmtiles files, however as those can't be cached at cloudflare, I was hoping to do some testing with a viewer that can accept the cached formats.

Thanks in advance :-)

shawaj avatar Nov 09 '23 02:11 shawaj

the viewer right now is specific to pmtiles files, the worker turns it into a plain z/x/y URL which does not require any specialized pmtiles-related code. What functionality were you looking to get out of the viewer in particular?

bdon avatar Nov 09 '23 04:11 bdon

What I was thinking is just a way you can put in either an URL like https://tiles.example.com/20231108 or an URL scheme like https://tiles.example.com/20231108/{z}/{x}/{y}.mvt and it would populate the map using those tiles.

Really just as a quick way to test that the CF worker is up and running and caching is working etc without having to spin up maplibre-gl or anything else.

Maybe having ability to put in a maplibre-gl style JSON with link to the tile source embedded or similar might also be useful for demoing styles etc

Hope that makes sense.

shawaj avatar Nov 09 '23 19:11 shawaj

Yeah, that should just be a matter of letting the MapLibre-based viewer take plain ZXY urls. I need to split out the "tile inspector" functionality - afterwards I'll add that.

bdon avatar Nov 13 '23 00:11 bdon

Will do in the rework of https://pmtiles.io - consolidating on issue https://github.com/protomaps/PMTiles/issues/49#issuecomment-2601740890

bdon avatar Jan 20 '25 08:01 bdon

Will do in the rework of https://pmtiles.io - consolidating on issue #49 (comment)

Awesome, thanks @bdon 🙏

shawaj avatar Jan 20 '25 08:01 shawaj

FYI https://maps.protomaps.com now supports TileJSON e.g. https://aaa.cloudfront.net/example.json provided that your tileset being served is designed to be used with the Protomaps basemaps styles and has the right CORS configuration.

This is a subset of how pmtiles.io will eventually work which is inspecting .pmtiles or .json with x-ray views independent of the tile contents.

bdon avatar Jan 20 '25 09:01 bdon

pmtiles.io now supports TileJSON too, e.g.:

https://pmtiles.io/#url=https%3A%2F%2Fvector.openstreetmap.org%2Fshortbread_v1%2Ftilejson.json&map=2.99/40.54/-6.93

bdon avatar Apr 22 '25 14:04 bdon