TiledFeatureSource

A source of CachedFeatureRows addressed by slippy-map (z, x, y). Used by OsmBuildings (one Overpass call per tile, features clipped to that tile's Sector).

Returns null from fetchTile to mean "the source confirms there are no features in this tile" — typically because the network call returned an empty result; the cache should remember the empty answer so the layer doesn't re-query every load.

Inheritors

Functions

Link copied to clipboard
open fun close()

Release any resources held by the source (HTTP client, etc.). Idempotent default no-op.

Link copied to clipboard
abstract suspend fun fetchTile(z: Int, x: Int, y: Int, sector: Sector): Flow<CachedFeatureRow>?
Link copied to clipboard
open suspend fun tryReadCachedTile(z: Int, x: Int, y: Int, sector: Sector): Flow<CachedFeatureRow>?

Cache-only fast-path read for (z, x, y). Default returns null — a plain network source has no cache to consult. Cache-backed sources override to read their store without going through the network-fetch concurrency budget. Empty flow is the negative-cache sentinel ("fetched, no features"); null is a true miss.