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

Add PMTiles support #4

Merged
merged 2 commits into from
Aug 28, 2023
Merged

Add PMTiles support #4

merged 2 commits into from
Aug 28, 2023

Conversation

docs: >
Geometry and web map links (PMTiles) from SpatioTemporal Asset Catalog (STAC) Collections can be rendered as layer group.

Note: The example doesn't work in Firefox due to restrictive CORS rules at the data host.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should either:

  • mirror the data in this GH repo or in some CORS-friendly bucket for other STAC assets
  • I can mirror this at a stable url like r2-public.protomaps.com/stac/foo.pmtiles

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be great, indeed!

@bdon
Copy link

bdon commented Aug 25, 2023

LGTM, examples work for me after I published ol-pmtiles 0.2.0

@bdon
Copy link

bdon commented Aug 28, 2023

@m-mohr are we blocked merging this until protomaps/PMTiles#112 is done?

It seems like in its current state it will only support PMTiles in public buckets with appropriate CORS headers.

If we change ol-pmtiles to take PMTiles objects instead of string URLs, we can implement auth via a custom Source that lives in ol-stac and is tied to the signing capabilities of ol-stac

Any rework of the PMTiles js itself (not ol-pmtiles) has a longer timeline...

@m-mohr
Copy link
Owner Author

m-mohr commented Aug 28, 2023

Thanks. Not blocking, I just need to document it.

But I also still want to find a better way to configure the sources generally, because the current way with so many get...SourceOptions callbacks doesn't scale very well...

@m-mohr m-mohr marked this pull request as ready for review August 28, 2023 13:03
@m-mohr
Copy link
Owner Author

m-mohr commented Aug 28, 2023

I refactored the source creation. So as long as I'd be able to pass the headers via the source options, I'd be fine.
See also protomaps/PMTiles#112 (comment)

Anyway, this can be merged, I think. The way it's handled here is now pretty much independant of the underlying implementation. Implementors need to check how the source options look like and adapt their implementation accordingly.

@m-mohr m-mohr merged commit 8dce79f into main Aug 28, 2023
@m-mohr m-mohr deleted the pmtiles branch August 28, 2023 13:23
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

Successfully merging this pull request may close these issues.

2 participants