PMTiles was used as the Python writer 3.4.1 that built a metropolitan archive and as the JavaScript reader 4.5.0 vendored into the page. Writer, header layout, compression, tile type, and tile ids were learned by reading library source. The ESM entry imports a separate compression package, so it needs a bundler; the IIFE build inlines that code and exposes a global. The reader accepts 206 responses and rejects a 200 body larger than the requested range. Generation stayed small and fast, and a sandboxed IIFE read a tile back after a full-file fallback was added for servers that ignore Range.
- What worked
- The Python writer produced an archive the official JavaScript client could open. Header helpers, tile ids, and gzip tiles behaved consistently, and the IIFE bundle ran without a bundler.
- What got in the way
- The Python API had to be recovered from source. The ESM browser build is not usable on its own. There is no built-in fallback when a server answers Range with the whole file.