-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
PMTiles URLs in MapLibre are not valid URLs #509
Comments
It also needs to work if no protocol is passed, which is interpreted as "the same protocol as the page, with path relative to the page" |
I'm in support of this, but we need to figure out a solution for protocol-relative URLs as I mentioned above. Right now if you have a static
Currently this behaves correctly because the underlying fetch will ask for Let's consider someone that uses HTTPS in local development, and pushes both index.html and example.pmtiles to GitHub pages. Under our proposed
Specify the pmtiles location in the style dynamically:
Internally we then need to make assumptions about the URL passed to interpret that as a relative URL and not a hostname with TLD Trying to think of workarounds... |
MapLibre Native supports |
@louwers Is this duplicate protocol pattern also used with |
No |
Currently the PMTiles URLs in MapLibre look like this:
pmtiles://https://example.com/tiles.pmtiles
These cannot be parsed by URL parsers correctly.
We could instead change it to this:
pmtiles+https://example.com/tiles.pmtiles
pmtiles+http://example.com/tiles.pmtiles
This would require changing the
addProtocol
call, using two for HTTP and HTTPS.The text was updated successfully, but these errors were encountered: