pf-wikis/mapping

".pbf.json" tiles are intentional and a symptom of GitHub Pages hosting

Closed this issue · 1 comments

//rename extensions for github pages gzipping

FileUtils.moveFile(f, new File(f.getParentFile(), f.getName()+".json"));

This tricks GitHub Pages into serving the PBFs gzipped, getting around Pages not setting headers and mime-db refusing to add PBF. But it also breaks tools that receive a JSON MIME type from the server, believe it, and then complain that the JSON is invalid.

  1. Pull the repo
  2. Modify the tooling to remove --no-tile-compression from the tippecanoe invocation and don't rename the tile extensions
  3. Host the tiles on Netlify/a droplet/a home server
  4. Point the picky tools at that