TileBlob

data class TileBlob(val bytes: ByteArray, val etag: String? = null, val lastModified: String? = null, val contentType: String? = null, val cachedAt: Long? = null)

One tile of raw bytes plus optional HTTP revalidation headers. The byte payload is what the server returned: PNG/JPEG/WebP for image layers, GeoTIFF/Int16/Float32 for elevation, Mapbox Vector Tile protobuf for MVT. The cache stores blobs as-is — decoding happens in the layer that consumes the source. etag / lastModified ride alongside so a subsequent network fetch can issue a conditional GET.

Constructors

Link copied to clipboard
constructor(bytes: ByteArray, etag: String? = null, lastModified: String? = null, contentType: String? = null, cachedAt: Long? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Epoch-millis the cached tile was written, for a stale-while-revalidate read. Set by a cache store when freshness tracking is enabled (finite eviction staleAfter); null on network responses and on cache reads where freshness isn't tracked. CachedTileSource uses it to decide whether to kick a background refresh after serving the cached blob.

Link copied to clipboard

MIME-type the server reported for bytes (e.g. application/bil16, image/png, application/vnd.ogc.se_xml). Set when the bytes came from a fresh HTTP response; null for cache-only reads (cache stores typically don't persist the header).

Link copied to clipboard
val etag: String?
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int