MapterhornEndpoints

Mapterhorn's two-tier PMTiles layout, ported from the sibling iOS app's mapterhorn-data-contract.md: a single global archive always available at low zoom, plus per-region high-res archives keyed by their own z6 tile coordinate, present only where source data coverage allows.

No API key, no documented rate limit (Cloudflare R2-backed, per docs.mapterhorn.com/data-access) — same no-auth, range-requestable shape as the base layer's Protomaps source.

Properties

Link copied to clipboard
const val ATTRIBUTION: String

What to show on screen whenever terrain (hillshade or contours) is actively rendering.

Link copied to clipboard
Link copied to clipboard
const val GLOBAL_MAX_ZOOM: Int = 12

Global coverage tops out at this zoom; deeper detail (if any) only exists in a regional archive.

Link copied to clipboard
Link copied to clipboard
const val REGIONAL_ARCHIVE_ZOOM: Int = 6

Each regional archive covers exactly one tile at this zoom.

Link copied to clipboard
const val REGIONAL_MAX_ZOOM: Int = 18

Regional archives never go deeper than this, even where source data would allow it.

Link copied to clipboard
const val REGIONAL_MIN_ZOOM: Int = 13

Regional archives start where global coverage ends.

Link copied to clipboard
const val TILES_MAX_ZOOM: Int = 16

Deepest zoom tileUrl serves. Deeper requests 404.

Functions

Link copied to clipboard

The regional archive for one z6 tile. Mapterhorn publishes one only where it has high-resolution data, so a 404 here means global-only terrain for that tile, not an error.

Link copied to clipboard
fun tileUrl(zoom: Int, x: Int, y: Int): String

Plain XYZ tiles, the endpoint Mapterhorn's own migration guide documents.