OfflineTerrainRegion

@Serializable
data class OfflineTerrainRegion(val south: Double, val west: Double, val north: Double, val east: Double, val maxZoom: Int, val hasRegionalDetail: Boolean, val tileCount: Long, val byteSize: Long, val sourceArchives: Map<String, String?> = emptyMap(), val downloadedAtEpochSeconds: Long? = null)(source)

What one downloaded offline-terrain region covers, persisted alongside its tiles as manifest.json.

Deliberately singular — OfflineTerrainRepository tracks at most one region at a time, replaced wholesale by the next download. Unlike the base map's own offline packs (which can be stacked, one per neighborhood, and MapLibre's native OfflineManager already carries that bookkeeping) terrain has no equivalent native API to lean on, and nothing in the F-Droid/Desktop UX yet asks for more than "the terrain around where I am" — see OfflineTerrainRepository's own doc comment for the fuller reasoning. Multi-region support, if ever needed, is an additive change: give this a generated id and the manifest a list.

Constructors

Link copied to clipboard
constructor(south: Double, west: Double, north: Double, east: Double, maxZoom: Int, hasRegionalDetail: Boolean, tileCount: Long, byteSize: Long, sourceArchives: Map<String, String?> = emptyMap(), downloadedAtEpochSeconds: Long? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

When the download finished; null for manifests written before it was recorded.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Each Mapterhorn archive URL the tiles came from, mapped to its ETag when the server gave one.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard