This is a sample project to demonstrate how to host Protomaps on Cloudflare Pages using only static .pmtiles files.
This is an exploration of how to host Protomaps on Cloudflare Pages without needing to host a separate Workers and R2 bucket. The official method to hose Protomaps on Cloudflare is following this GitHub: https://github.com/thomasgauvin/protomaps-on-cloudflare.
This project is made up of one React application, that intercepts HTTP Range Requests with Service Workers to cached static files.
- The MapLibre library makes a HTTP Range Request for an area of the map.
- The service worker intercepts the request and responds to it from bytes of a cached static .pmtiles file.