Tile Overlay
data class TileOverlay(val tileProvider: TileProvider, val transparency: Float = 0.0f, val zIndex: Float = 0.0f, val visible: Boolean = true, val fadeIn: Boolean = false, val tag: Any? = null)(source)
Represents a tile overlay layer on the map.
Tile overlays display additional tile-based content on top of or below the base map tiles. Common use cases include:
Weather overlays (temperature, precipitation, clouds)
Transportation overlays (railways, public transit)
Outdoor activity overlays (hiking trails, ski pistes)
Maritime overlays (nautical charts, depth contours)
Custom map styles or data visualizations
Tile overlays use the same 256×256 pixel tiling system as the base map, with tiles loaded dynamically based on the viewport and zoom level.
Example usage:
// Direct instantiation (Kotlin style)
val overlay = TileOverlay(
tileProvider = OpenSeaMapProvider(),
transparency = 0.0f,
zIndex = 1.0f,
visible = true
)
mapView.addTileOverlay(overlay)
// Builder pattern (Google Maps style)
val overlay = TileOverlayOptions()
.tileProvider(OpenSeaMapProvider())
.transparency(0.0f)
.zIndex(1.0f)
.visible(true)
mapView.addTileOverlay(overlay)Content copied to clipboard