TerrainTileFetcher

actual class TerrainTileFetcher(pmtilesUrl: String) : AutoCloseable(source)

Fetches individual tiles from a remote PMTiles archive by range request — never the whole archive, just the bytes of the tile asked for. Backed by ch.poole.geo.pmtiles:Reader (MIT-licensed), the same library the base offline layer uses for Protomaps; here it's pointed at Mapterhorn's Terrarium elevation archives instead.

A plain Java library, so its wrapper is duplicated between androidMain and jvmMain rather than living once in commonMain — see this module's build.gradle.kts for why.

expect class TerrainTileFetcher(pmtilesUrl: String) : AutoCloseable(source)

Fetches individual tiles from a remote PMTiles archive by range request — never the whole archive, just the bytes of the tile asked for. Backed by ch.poole.geo.pmtiles:Reader (MIT-licensed), the same library the base offline layer uses for Protomaps; here it's pointed at Mapterhorn's Terrarium elevation archives instead.

A plain Java library, so its wrapper is duplicated between androidMain and jvmMain rather than living once in commonMain — see this module's build.gradle.kts for why.

actual class TerrainTileFetcher(pmtilesUrl: String) : AutoCloseable(source)

Fetches individual tiles from a remote PMTiles archive by range request — never the whole archive, just the bytes of the tile asked for. Backed by ch.poole.geo.pmtiles:Reader (MIT-licensed), the same library the base offline layer uses for Protomaps; here it's pointed at Mapterhorn's Terrarium elevation archives instead.

A plain Java library, so its wrapper is duplicated between androidMain and jvmMain rather than living once in commonMain — see this module's build.gradle.kts for why.

Constructors

Link copied to clipboard
actual constructor(pmtilesUrl: String)
expect constructor(pmtilesUrl: String)
actual constructor(pmtilesUrl: String)

Functions

Link copied to clipboard
actual open override fun close()
expect open override fun close()
actual open override fun close()
Link copied to clipboard
actual fun fetchTile(zoom: Int, x: Int, y: Int): ByteArray?

Raw tile bytes (WebP, Terrarium-encoded) at zoom/x/y — google/osm XYZ convention — or null if absent.

expect fun fetchTile(zoom: Int, x: Int, y: Int): ByteArray?

Raw tile bytes (WebP, Terrarium-encoded) at zoom/x/y — google/osm XYZ convention — or null if absent.

actual fun fetchTile(zoom: Int, x: Int, y: Int): ByteArray?

Raw tile bytes (WebP, Terrarium-encoded) at zoom/x/y — google/osm XYZ convention — or null if absent.