Add option to do non-range requests?
lordi opened this issue · comments
Use case: My development server does not support range requests, it would be nice if I could set an option to download the complete file, cache it, and then return the relevant parts of it on demand.
I'm working with the MapLibre and OpenLayers adapters.
What development server are you using? My preference would be to make it support range requests (part of the HTTP 1.1 specification) so it behaves the same way as production. Adding such an option would defeat the primary purpose of the pmtiles design, and wouldn't work for files more than a few megabytes.
If you really wanted to make it work this way, you could grab the whole file into an in-memory ArrayBuffer using plain fetch
and then write a custom JS Source
to grab pieces of that ArrayBuffer.
Thanks yea I see that this feature request is out of scope for this project.
We use the Django development server, that does not supports Range Requests for static files. I just hacked together a version that supports Range Requests with static files, so I'm fine for now.