Technology
One file, one bucket, no tile server
Most map infrastructure is a database, a rendering service and a cache you have to babysit. Ours is a single archive on object storage and a small Worker that reads byte ranges out of it. Here is exactly how it works and what it costs.
136 GB
One PMTiles archive, the whole planet
0
Tile servers and databases to maintain
z0-15
Zoom range, vector all the way down
13
Styles generated from the same tiles
From OpenStreetMap to a pixel on your screen
Four hops. Nothing in this chain is a black box, and every hop is something we can inspect and change.
The planet becomes one file
OpenStreetMap data is packed into a PMTiles archive: an entire tile pyramid, zoom 0 through 15, in a single file with an index at the front. No database. Ours is 136 GB and lives in Cloudflare R2 object storage.
planet.pmtiles · 136,627,786,308 bytesA Worker reads byte ranges
When a browser asks for tile z/x/y, our Cloudflare Worker looks it up in the archive index and reads only those bytes back from R2 with a range request. It never downloads the archive, and there is nothing to keep warm.
GET /planet/{z}/{x}/{y}.mvtThe edge caches the answer
The tile is cached at the Cloudflare location nearest to the visitor for 24 hours. A visitor in Sao Paulo and a visitor in Istanbul each get the map from a few milliseconds away, and R2 is not touched again.
Cache-Control: public, max-age=86400The browser draws the map
MapLibre GL takes the vector tiles and the style JSON and renders the map on the GPU. Nothing is a picture: the map is sharp on every screen, rotates and scales without blurring, and its appearance is decided entirely by the style.
maplibre-gl · WebGLWhy vector tiles and not images
The style is data, not a render
With raster tiles, the colors are baked into a picture on someone else's server. With vector tiles, the browser gets the geometry and decides how to paint it. That is the entire reason a custom brand style is possible at all.
Sharp on every display
Vector geometry scales to any pixel density and any zoom fraction. There is no blurry intermediate zoom and no second set of retina tiles to store and serve.
Your data joins the same canvas
Markers, routes and polygons are drawn by the same renderer, in the same scene, at the same time. They do not float above a picture; they are part of the map.
Why PMTiles instead of a tile server
A classic tile server answers millions of tiny questions: give me tile z/x/y. That means a process to run, patch, scale and monitor. PMTiles inverts it. All the tiles are packed into one archive with an index, and the client asks for byte ranges of that one file. Object storage and CDNs are extremely good at serving byte ranges.
- Nothing to keep running, so nothing to wake up at 3am for
- Storage is pennies per gigabyte and reads are fractions of a cent per million
- The same file works on any S3-compatible storage, or on a laptop
- Cloudflare R2 charges no egress, so traffic growth does not grow the bill
The edge is the whole distribution strategy
The hard part of map infrastructure is not the data, it is delivery. Serving tiles from a single server in Istanbul to a visitor in Tokyo means a map that stutters as it loads. We keep the archive in Cloudflare storage and serve it from Cloudflare's global network, so the map always arrives from the location nearest the visitor. Egress is free at any volume, which is exactly why the price can be a flat monthly plan instead of a per-request meter.
Keeping the data fresh
We refresh from OpenStreetMap on a monthly cycle. New roads, buildings and place names added by the community flow into your map with that refresh, and your custom style follows automatically because the style is generated from a colour object, not hand-edited. There is no service interruption during the update.
OpenStreetMap data is licensed under ODbL. Attribution is mandatory, so the credit in the corner of the map stays visible. We do not offer a way to hide it, because it belongs to the volunteers who mapped your street.
How the licence is enforced
There is no API key. The Worker checks the requesting domain against a licence list before it serves anything, and an unlicensed domain gets a 403 with a link to request access. That means nothing to rotate, nothing to leak in client-side code, and no token accidentally committed to a public repository.
This is a domain check, not a cryptographic guarantee. A determined actor with a server-side proxy can forge headers, exactly as they can with any client-side map service. We would rather tell you that than pretend otherwise.
The stack, named
OpenStreetMap
The open geographic data everything is built on
PMTiles
The single-file tile archive format
Cloudflare R2
Object storage, no egress fees
Cloudflare Workers
The tile endpoint at the edge
MapLibre GL
The open source renderer in the browser
Want the same stack on your own infrastructure?
Everything above is built from open formats and open source. We publish guides on how to run it yourself, and we will happily set it up inside your own Cloudflare account under an Enterprise agreement.