Package-level declarations
Types
Mixin for elevation source factories that can fetch one (z, x, y) tile through the cache-then-network pipeline with cache write-through. Implemented by every cached elevation factory — GpkgCachedElevationSourceFactory on JVM, CachedElevationSourceFactory on JS / iOS — so TiledElevationCoverage.launchBulkRetrieval can drive a bulk download without knowing the concrete factory type.
Typed key for bulk-opening cached content by category. The phantom T carries the return type all the way from the call site through earth.worldwind.util.open, so cm.open(CacheCategory.Tiles) returns List<TiledImageLayer> with no as? cast and no reified type argument at the call site.
Cache-first decorator over a BulkFeatureSource. On fetchAll:
Per-tile carrier emitted by CachedElevationSourceFactory.createElevationSource. Each platform's retrieveTileArray detects this via elevationSource.asUnrecognized() and dispatches into factory for the actual cache/network + transcoding flow.
Cross-platform ElevationSourceFactory backed by an ElevationStoreBackend + an optional upstream TileSource. Owns the source-format → storage-format transcoding pipeline (encode/decode via ElevationStorageCodec) so platforms (JS, iOS) don't have to reimplement it.
Cache identity for a tile / feature source — the key under which its bytes live in the cache plus the path of the underlying earth.worldwind.util.ContentManager. Layer extensions (TiledImageLayer.cachedSourceInfo, TiledElevationCoverage.cachedSourceInfo, etc.) walk the layer's source chain and return this when the layer is wired through a cache. null means "no cache wired" — the layer is network-only.
Mixin for cache-aware sources, factories, and stores that can report their underlying CachedSourceInfo. Implementations:
One stored tile pulled out of an ElevationStoreBackend: the encoded blob plus the per-tile (scale, offset) the codec needs to decode it. cachedAt is the epoch-millis the tile was written (for stale-while-revalidate); null when the backend doesn't track it. etag / lastModified are the stored HTTP validators for a conditional refresh.
Cache-first decorator over a TiledFeatureSource. On fetchTile:
Cache-first decorator over a TileSource. The lookup order is:
Metadata about one content entry in the cache — enough for the caller to decide whether to instantiate a layer from it. Produced by ContentManager.listEntries(); the caller turns one of these into a working layer via the reified openLayer<T>(key) / openElevationCoverage<T>(key) helpers (or by manually opening the store + source pair).
One per-content cache policy with two independent facets, threaded into every TileStore / FeatureStore. Defaults are unbounded — callers opt in to each axis.
Unified "one cached layer's content" view — size on disk, last-modified, clear/delete.
Cross-platform encode/decode for one elevation tile in the cache.
Storage backend for one elevation coverage's encoded tiles + their per-tile ancillary (scale, offset) metadata. Per-platform implementations bind one contentKey to the underlying medium:
Platform-neutral tile-buffer carrier. Concrete sample type stays explicit so the codec doesn't need a platform Buffer abstraction (the existing java.nio.Buffer shape on JVM and Float32Array shape on JS / iOS aren't expect/actual-friendly).
Persistent backing for cached feature data. Supports both shapes that the source layer may produce:
Filesystem-backed FeatureStore for iOS. One directory per content key under baseDirectory; layout:
Filesystem-backed TileStore for iOS. One root directory per content key under baseDirectory; tiles live at ${baseDirectory}/${contentKey}/${z}/${x}/${y}.bin.
GeoPackage-backed BlobStore following the OGC 3D Tiles GeoPackage Extension shape: one SQLite table per dataset, registered in gpkg_contents (data_type='3d-tiles') and gpkg_extensions (gpkg_3d_tiles). Row schema is GpkgBlobRow; the table lifecycle is owned by earth.worldwind.formats.gpkg.GpkgContentManager.openBlobStore.
GeoPackage-backed FeatureStore. One instance binds to one data_type='features' table (identified by content).
GeoPackage-backed TileStore. One instance binds to one tile-pyramid table — works for any data_type that uses the tile-user-data shape (image/png, image/jpeg, image/webp, gridded coverages, vector-tile protobuf).
Base for TileSource implementations that fetch bytes over HTTP. Owns one lazily-built HttpClient so subclasses only have to provide a URL for (z, x, y).
Filesystem-backed ContentManager for iOS. Everything persists under baseDirectory (defaults to ~/Library/Caches/worldwind-cache); one top-level directory per content key.
Opt-in marker for low-level cache plumbing on earth.worldwind.util.ContentManager.
Platform-specific wire-format decoder used by CachedElevationSourceFactory.fetchTile on cache miss. Each platform implements the same MIME dispatch table (BIL16 / BIL32 / TIFF / DTED → ElevationTileBuffer) — sharing the dispatch in commonMain would mean porting every per-platform decoder kernel here, which buys little vs. the per-platform footprint cost.
Always-empty store. Used as the earth.worldwind.util.ContentManager.openBlobStore default on platforms that haven't implemented persistence yet, so a layer that opts into caching silently falls back to network-only without crashing.
Mixin for cache-aware sources / factories that can flip between online and offline modes at runtime. Lets app-level "go offline" walks dispatch generically across CachedTileSource (image / vector / feature pyramids) and the elevation factories (CachedElevationSourceFactory, GpkgCachedElevationSourceFactory).
A cache-aware source that fires onTileRevalidated — off the render thread — after a stale tile has been re-downloaded and written through (the stale-while-revalidate refresh). The render layer wires this to drop the tile's cached texture / coverage entry and request a redraw, so the freshly-cached bytes appear on-screen without waiting for the next reload.
TileFactory adapter that produces ImageTiles whose imageSource reads bytes from a TileSource. Bridges the rendering pipeline's TileFactory contract (used by earth.worldwind.shape.TiledSurfaceImage for level-set iteration + mip-fallback) onto the cache redesign's source contract.
Persistent backing for CachedTileSource — read/write/evict tile blobs keyed by (z, x, y). The store is the cache; CachedTileSource is the cache-aware view that combines a store with an underlying network TileSource.
TileSource for slippy-map raster servers — image tiles addressed by (z, x, y) via a URL template, the same pattern every major XYZ-tile provider uses (Google, OSM, MapServer cgi-bin, Stamen, …). Supports the common template tokens {z}, {x}, {y}, {lang}, {rand=a,b,c}, {i} (the WorldWind dialect — see UrlTemplate).
IndexedDB-backed ContentManager for the JS target. Implements every method of the ContentManager contract — image / vector / coverage tile stores, feature stores (bulk + tile-addressed), and web-service metadata.
Persisted web-service metadata for a cached layer. Stored in the GeoPackage gpkg_web_service extension table so a layer can be reconstructed without contacting the originating server — capabilities XML / JSON in metadata survives across launches.
Properties
See TiledImageLayer.cachedSourceInfo — same shape for elevation coverages. The cache provider here is the elevation source factory, not a tile-source decorator.
See TiledImageLayer.cachedSourceInfo — same shape for WFS feature layers.
Cache identity of this layer's tile source, or null when the layer isn't wired through a cache (network-only). Walks the layer's tile factory chain, looking for a CachedSourceInfoProvider — typically a CachedTileSource that wraps an IDB / gpkg / filesystem TileStore.
See TiledImageLayer.cachedSourceInfo — same shape for OSM buildings.
See TiledImageLayer.cachedSourceInfo — same shape for MVT vector-tile layers.
Functions
Register a tiled image layer (WMS / WMTS / WebMercator).
Register a vector layer. Dispatches by concrete subtype to record the right service-identity row:
Register a tiled elevation coverage.
Construct a platform-specific ImageSource backed by source for tile (z, x, y). The platform actual returns an ImageSource.ImageFactory that fetches via TileSource.fetchTile and decodes the resulting bytes (PNG/JPEG/WebP/…) into the platform's native bitmap type.
Construct a platform-specific ImageSource backed by source for tile (z, x, y). The platform actual returns an ImageSource.ImageFactory that fetches via TileSource.fetchTile and decodes the resulting bytes (PNG/JPEG/WebP/…) into the platform's native bitmap type.
Construct a platform-specific ImageSource backed by source for tile (z, x, y). The platform actual returns an ImageSource.ImageFactory that fetches via TileSource.fetchTile and decodes the resulting bytes (PNG/JPEG/WebP/…) into the platform's native bitmap type.
Construct a platform-specific ImageSource backed by source for tile (z, x, y). The platform actual returns an ImageSource.ImageFactory that fetches via TileSource.fetchTile and decodes the resulting bytes (PNG/JPEG/WebP/…) into the platform's native bitmap type.
Construct a platform-specific ImageSource backed by source for tile (z, x, y). The platform actual returns an ImageSource.ImageFactory that fetches via TileSource.fetchTile and decodes the resulting bytes (PNG/JPEG/WebP/…) into the platform's native bitmap type.
Elevation-coverage counterpart of TiledImageLayer.contentEntry — coverages have no "self-contained file factory" case in the current factory set, so this is just the ContentManager adapter behind a uniform call site.
One-stop accessor for "this image layer's content view." Lookup order:
Wrap one contentKey inside this ContentManager as a ContentEntry. Mirrors findEntry(key) for read-only inspection plus clearEntry / deleteEntry for lifecycle, behind one uniform surface.
Download every OSM-Buildings feature tile intersecting sector into the layer's feature store — the "save a region for offline use" flow.
Download every elevation tile that intersects sector across every tile matrix whose pixel-resolution falls in resolution, writing each tile through to the coverage's cache.
Download every tile within sector across the resolution range into the layer's underlying TileStore (when the layer was constructed with a CachedTileSource). Returns the launched Job for cancellation; returns null when the layer's tile factory isn't backed by a TileSourceFactoryAdapter (i.e. no source-based wiring, so bulk-via-source is impossible).
Download every MVT tile intersecting sector across the resolution range into the layer's vector-tile store — the "save a region for offline use" flow. Takes the same resolution: ClosedRange<Angle> as TiledImageLayer.launchBulkRetrieval (raster) and TiledElevationCoverage.launchBulkRetrieval (elevation) for a uniform bulk API across layer types; the range is mapped to a slippy zoom range via SlippyTiles.zoomForResolution (nearest-neighbor, matching LevelSet.levelForResolution) and clamped to the layer's MvtVectorLayer.minZoom..MvtVectorLayer.maxZoom.
Download every tile that intersects sector across every level whose resolution falls in resolution — typically used by "save a region for offline use" flows. Returns the launched Job so the caller can cancel mid-download.
See setOfflineOnly on TiledImageLayer. The OfflineToggleable lives on the coverage's elevationSourceFactory (the platform-specific CachedElevationSourceFactory / GpkgCachedElevationSourceFactory both implement it). No-op when the coverage is wired to a network-only factory.
Toggle the cache-only flag on a cache-attached layer or coverage.
See setOfflineOnly on TiledImageLayer. Dispatches by VectorLayer subtype to reach the right source field. No-op for unknown subtypes.
Total number of OSM-Buildings feature tiles launchBulkRetrieval would fetch for sector — the slippy analog of LevelSet.tileCount, for sizing a download before committing to it. Counts a single slippy zoom (OsmBuildingsLayer.tileZoom), the only zoom the renderer reads.
Total number of MVT tiles launchBulkRetrieval would fetch for sector across the resolution range — the slippy analog of LevelSet.tileCount, for sizing a download before committing to it. Uses the same zoom mapping and clamp as launchBulkRetrieval, so the result matches the total later reported to that call's onProgress.