Open burritojustice opened 3 years ago
+1
From what I can tell https://github.com/protomaps/PMTiles needs to be brought in as a dependency, because Tangram does not expose an API to extend source
s at runtime, it's a small bit of code but fast moving at the moment.
Teach Tangram how to natively decipher 'serverless' PMTiles.
https://github.com/protomaps/PMTiles
"PMTiles is a single-file archive format for tiled data. A PMTiles archive can be hosted on a commodity storage platform such as S3, and enables low-cost, zero-maintenance map applications that are "serverless" - free of a custom tile backend or third party provider."
"PMTiles is a binary serialization format designed for two main access patterns: over the network, via HTTP 1.1 Byte Serving (Range: requests), or via memory-mapped files on disk."
via https://protomaps.com/blog/dynamic-maps-static-storage/
200 line JS decoder library: https://github.com/protomaps/PMTiles/blob/master/js/index.mjs
Perhaps something like
though this does not give an indication of the tile type, which would likely be pbf or png given the environment.