Package-level declarations

Types

Link copied to clipboard
@Serializable
data class CustomTileProviderConfig(val id: String = Uuid.random().toString(), val name: String, val urlTemplate: String, val localUri: String? = null)
Link copied to clipboard
data class CustomTileProviderLoadResult(val providers: List<CustomTileProviderConfig>, val isSuccessful: Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

How a raster-DEM source packs elevation into its pixels.

Link copied to clipboard

The tile sources the app offers, independent of which engine draws them.

Link copied to clipboard

A radar tile drawn smooth instead of in squares.

Link copied to clipboard
data class RasterBasemapSource(val id: String, val label: String, val spec: RasterTileSpec)

A raster basemap: XYZ tiles that stand in for the base map itself.

Link copied to clipboard
data class RasterOverlaySource(val id: String, val label: StringResource, val spec: RasterTileSpec, val demEncoding: DemEncoding? = null)

A raster layer composited over whichever basemap is selected.

Link copied to clipboard
data class RasterTileSpec(val tiles: List<String>, val tileSize: Int = DEFAULT_TILE_SIZE, val minZoom: Int = 0, val maxZoom: Int = DEFAULT_MAX_ZOOM, val attributionHtml: String? = null)

Tile-scheme description for one raster source.

Functions

Link copied to clipboard

The attribution string as plain text.

Link copied to clipboard

Answers from the app's network security config, the same check the HTTP stacks apply when they connect.

Whether this platform will open a plain http connection to host. A URL validator that accepts http where this is false saves a tile source or layer that can never load.

Whether this platform will open a plain http connection to host. A URL validator that accepts http where this is false saves a tile source or layer that can never load.

Link copied to clipboard
fun String.isRefusedCleartextTileUrl(cleartextPermitted: (host: String) -> Boolean = ::isCleartextPermitted): Boolean

Whether this is an otherwise usable http template whose host the platform refuses plain http to.

Link copied to clipboard
fun String.isValidTileUrlTemplate(cleartextPermitted: (host: String) -> Boolean = ::isCleartextPermitted): Boolean

Whether a tile URL template is one we are willing to request.

Link copied to clipboard

The credits owed for a basemap and whatever overlays are drawn over it, joined for a single line of text.

Link copied to clipboard
fun smoothedRadarTileSize(tilePixels: Int): Int

Pixels across a smoothed tile for a tile of tilePixels, for the tile size to report to the renderer.

Link copied to clipboard
fun RasterTileSpec.tileUrl(x: Int, y: Int, zoom: Int): String?

Resolves the URL of a single tile from a RasterTileSpec.