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

[Feature]: Add PMTiles Byte Range Request Support for Offline Maps (#7664 Follow-Up) #7789

Open
1 of 3 tasks
m345054 opened this issue Dec 3, 2024 · 2 comments
Open
1 of 3 tasks
Labels

Comments

@m345054
Copy link

m345054 commented Dec 3, 2024

Description

Support for .pmtiles in mediaExtensions within WebViewAssetHandler is needed to enable proper functionality of offline maps in Capacitor. Without this support, byte range requests (HTTP 206 Partial Content) required by PMTiles fail, resulting in errors when accessing bundled assets.

Platforms

  • iOS
  • Android
  • Web

Request or proposed solution

The feature involves adding .pmtiles to the list of supported extensions (mediaExtensions) in WebViewAssetHandler. This change ensures that .pmtiles assets can handle HTTP 206 Partial Content responses correctly.

An example project demonstrating the issue and validating the fix is available here: capacitor-pmtiles. Additionally, there is an existing pull request (#7663) that implements this fix.

This support is critical for applications using PMTiles for offline vector map tilesets.

Alternatives

No response

Additional Information

This request is a follow-up to the closed issue #7664, which was closed due to a lack of an example project. The example project linked above addresses this and provides a clear demonstration of the need for this feature.

Thank you for considering this important enhancement!

@m345054 m345054 added the triage label Dec 3, 2024
@leotohill
Copy link

I'm wondering why the support for range headers is limited to known types. Why not .zip, .data, .ogg, .pdf, ... which is to say, why not anything?

@petrot
Copy link

petrot commented Dec 22, 2024

Thanks for the example repo. I've been waiting for this update since I know how it can solve my offline pmtiles problems.

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

No branches or pull requests

3 participants