Generating fake XYZ Tiles using a Service Worker

The orange tiles in the map above are generated client-side using a service worker.

The service worker intercepts tile requests, generates a tile image using the Canvas API, then serves the result.

Learn more about this technique in my article Using a Service Worker to generate diagnostic XYZ tiles on Medium.

By Joel Malone (