PMTiles Show: Generate an encoded URL that will quickly take you to PMTiles.io #229
+6
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Minor feature enhancement to
pmtiles show
pmtiles show
now generates an encoded URL that will quickly take you to PMTiles.io with your archive passed in.open -a <browser_name>
Test on S3 compatible PMTile
# log an element "xray:" pmtiles show https://demo-bucket.protomaps.com/v4.pmtiles
Result
Output looks something like:
pmtiles spec version: 3
tile type: mvt
...
xray: https://pmtiles.io/#url=https%3A%2F%2Fdemo-bucket.protomaps.com%2Fv4.pmtiles
Test on local PMTile
For the case of a local file, the "xray: " log element is disabled.
# Show works as before pmtiles show pmtiles/fixtures/test_fixture_1.pmtiles
Future ideas with other
pmtiles
commands:tile
pmtiles tile
to link to the tile inspector"local file +
serve
pmtiles show
for a local file: "Maybe provide a hint that the Go tool can also serve a folder":pmtiles serve pmtiles/fixtures
pmtiles serve
could also log a link to the locally servedTileJSON:https://pmtiles.io/#url=http%3A%2F%2Flocalhost%3A8080%2Ftest_fixture_1.json
pmtiles serve pmtiles/fixtures --public-url=http://localhost:8080