Tile Pyramid
TilePyramid.kt
Adapted from IOS version.
Author
Jason Suto on 12/18/23.
Types
Vestigial marker interface carried over from the iOS port's Collection-protocol conformance (see the class-level "Adapted from IOS version" note). Not currently implemented by TilePyramid or any other type in this codebase.
Vestigial marker interface carried over from the iOS port's Dictionary-protocol conformance (see the class-level "Adapted from IOS version" note). Not currently implemented by TilePyramid or any other type in this codebase.
Vestigial marker interface carried over from the iOS port's Sequence-protocol conformance (see the class-level "Adapted from IOS version" note). Not currently implemented by TilePyramid or any other type in this codebase.
Properties
The TileRequestOptions captured by ensureFormattedDate the first time it runs for this pyramid, retained for later fallback requests.
The bracketed ISO-8601 UTC date string (see bracketedRasterInterval) resolved by ensureFormattedDate; null until the first request pass runs.
Legacy per-layer interval cap; not consulted elsewhere in this class (superseded by the global caps in Timeline).
The TileCache.memUsage value observed on the last checkAndClearMemory call, used to detect memory-usage changes.
The TileSource backing this pyramid; delegates to (and stays in sync with) TileLayer.source.
Functions
Tracks TileCache.memUsage (updating memUsageLast) and logs it whenever it changes. The actual cache-trimming logic below is currently commented out, so this is presently a no-op beyond logging/bookkeeping.
Enables coord in pyramid syntax; delegates to tileSource's own containment check.
Read-only estimate of how many new encoded (coord×time) pairs would be queued for coords, using the same metadata, time filtering, and cache checks as requestTilesForDownload but without mutating caches, Timeline pending lists, or requesting bytes. Used to fix download % across multiple layers before any layer runs.
Determine which tiles are already downloaded, and request the ones that aren't