Package-level declarations

Types

Link copied to clipboard

A source of CachedFeatureRows fetched in bulk — no tile axis. Used by WFS (one GetFeature pulls every visible feature) and Shapefile (one HTTP fetch pulls the entire .shp/.dbf/.prj triple).

Link copied to clipboard
@Serializable
data class CachedFeatureRow(val geometry: CachedGeometry?, val properties: String?)

One cached feature row. Null geometry is the sentinel that marks a tile as fetched-but-empty.

Link copied to clipboard
@Serializable
sealed class CachedGeometry

Platform-neutral geometry envelope for feature cache rows. Platform implementations convert to/from their native geometry (mil.nga.sf on JVM, JSON on JS). Z is altitude in meters.

Link copied to clipboard
class FeatureProperties(val properties: LinkedHashMap<String, Any?>)

Typed view of a feature's properties map. The view is a thin wrapper around the shared LinkedHashMap — mutating the map mutates the view. Property reads tolerate number-vs-string-vs-int variance per source (e.g. GeoJSON numbers can be Int or Double).

Link copied to clipboard

BulkFeatureSource over a static GeoJSON document. Parses text on each fetchAll call and emits one CachedFeatureRow per Feature in document order. Accepts the GeoJSON top-level shapes (FeatureCollection, Feature, bare Geometry, GeometryCollection); see parseGeoJsonAsFeatureRows for the flattening contract.

Link copied to clipboard
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.

Link copied to clipboard

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).

Link copied to clipboard
interface TileSource

A source of byte-encoded tiles indexed by slippy-map (z, x, y). Implementations:

Properties

Link copied to clipboard
const val DEFAULT_DENSITY: Float = 1.0f

Style attributes applied to feature renderables built from a properties map. Recognises the GeoJSON simplestyle-spec keys (stroke, fill, stroke-width, stroke-opacity, fill-opacity, icon, icon-scale, icon-offset, label-scale) plus a handful of feature-name aliases used by common sources (WFS, GeoJSON files). Other property keys are ignored — caller-side lambdas can read them directly from the same properties map for custom styling.

Link copied to clipboard
const val DEFAULT_IMAGE_SCALE: Double = 1.0
Link copied to clipboard
Link copied to clipboard

Feature-name property aliases. Common sources (WFS MapServer / GeoServer, GeoJSON fixtures) emit varying casing; the layer pipeline checks these aliases before falling back to a label-less Placemark.

Functions

Link copied to clipboard

Apply label-scale to a Label's text attributes.

fun Placemark.applyFeatureStyle(properties: LinkedHashMap<String, Any?>, density: Float = DEFAULT_DENSITY)

Apply icon URL + icon-offset + icon-scale (× density) to a Placemark, plus label-scale to its label-attributes. Invalid / non-HTTPS icon URLs are skipped.

fun AbstractShape.applyFeatureStyle(properties: LinkedHashMap<String, Any?>, defaultLineColor: Color? = null, defaultFillColor: Color? = null)

Apply simplestyle stroke / fill / stroke-width to a Path or Polygon's attributes. Writes outline / interior color only when there's an explicit value to apply — either the feature's stroke / fill property OR a non-null defaultLineColor / defaultFillColor. With both null (the default), an absent property leaves the renderable's existing color alone — important when the layer's shapeAttributes supplied an intentional template colour at construction time (e.g. Shapefile's translucent blue) that would otherwise be clobbered by auto-style.

Link copied to clipboard

Envelope-center (longitude, latitude) of this geometry — a deterministic representative point. Used to assign a feature to a single tile (the one containing its center), so a geometry that straddles a tile boundary renders in exactly one tile instead of every tile its envelope touches.