-
-
Notifications
You must be signed in to change notification settings - Fork 638
feat(stac): add PMTiles assets to the map #1950
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
dcf9166
refactor(map): build every PMTiles store layer through one shared shaper
clintonlunn 9bcf079
feat(stac): add PMTiles assets to the map
clintonlunn 1db5118
i18n: list PMTiles in the STAC unsupported-asset tooltip across all 1…
clintonlunn 3969cfe
fix(stac): fail a PMTiles add without an app, and queue pending layer…
clintonlunn 04ee08d
fix(stac): let a declared media type outrank an extension, and fail a…
clintonlunn fe844cf
docs(plugins): record why the pending-name disposer is for the failur…
clintonlunn e91faa0
docs(stac): attach the format table's comment to the table
clintonlunn b2e7d83
docs(map): stop claiming a reason for the layer-id percent swap
clintonlunn 319bc59
fix(plugins): take PMTiles adds one at a time, since the control hold…
clintonlunn 76aee52
fix(stac): fail a GeoJSON add without an app, and drop a PMTiles add …
clintonlunn 9986e57
fix(plugins): match a pending PMTiles name to its archive so a panel …
clintonlunn 06690d0
Merge branch 'main' into feat/stac-pmtiles-assets
clintonlunn 419782b
Merge remote-tracking branch 'origin/main' into feat/stac-pmtiles-assets
clintonlunn c3cbdca
refactor(stac): name a PMTiles layer after adding it, and honor the s…
clintonlunn 031b8a1
refactor(stac): build the PMTiles layer directly instead of driving t…
clintonlunn 44a6d67
fix(map): read an MLT archive as vector and tell MapLibre how to deco…
clintonlunn 437939f
fix(map): follow a caller's fill colour with the outline unless it se…
clintonlunn 63632b0
fix(stac): refuse a PMTiles archive with no layers instead of adding …
clintonlunn 3af75bf
fix(stac): localize the no-layers message, and forward the tile encod…
clintonlunn ec9214a
fix(map): carry a caller's abort signal into the archive header read
clintonlunn 55a50ad
refactor(map): read tile types from the pmtiles enum instead of literals
clintonlunn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
createPMTilesStoreLayercall doesn't forwardinfo.encoding, unlike the equivalent call instac-layers.ts(addPMTilesAsset), which does...(info.encoding ? { encoding: info.encoding } : {}).readPMTilesArchiveInfo(used a few lines up) now returnsencoding: "mlt"for MLT-encoded vector archives, andensurePMTilesExternalLayerinlayer-sync.tsonly addsencoding: "mlt"to the MapLibre source whenlayer.source.encoding === "mlt". Without forwarding it here, an MLT-encoded archive extracted/opened through this flat-overlay path will have its source added withoutencoding, and MapLibre will try to decode the tiles as plain MVT — likely producing broken/garbled rendering rather than the placeholder-vs-render distinction this PR is otherwise careful about.Confidence: medium — I can't confirm from this environment whether OpenFreeMap/CARTO-derived archives (the likely inputs to this extractor) are ever MLT-encoded in practice, but the type-level gap and the asymmetry with the sibling call site look like an oversight rather than a deliberate choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 3af75bf: the extract path forwards info.encoding too, so an MLT archive is added with encoding: "mlt" there as well.