TileLayer

open class TileLayer(var id: String, var source: TileSource<TileData>, var paint: PaintStyle, var tileLayerRenderer: TileLayerRenderer<TileData, LayerRenderContext<Any>>, zoomOffset: Int) : MapLayer<TileData, LayerRenderContext<Any>>

Represents a layer that renders data from a tile-based data source. This is the base class for all tile-based layers and is not intended to be used directly.

Inheritors

Constructors

Link copied to clipboard
constructor(id: String, source: TileSource<TileData>, paint: PaintStyle, tileLayerRenderer: TileLayerRenderer<TileData, LayerRenderContext<Any>>, zoomOffset: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var alpha: Float
Link copied to clipboard
Link copied to clipboard
var bounds: LatLonBounds?
Link copied to clipboard
lateinit var drawContext: Context
Link copied to clipboard
open override val enabled: Boolean
Link copied to clipboard
Link copied to clipboard
override var id: String
Link copied to clipboard
open override var isDirty: Boolean
Link copied to clipboard
open override var layerRenderContext: LayerRenderContext<Any>
Link copied to clipboard
open override var mapController: MapController?
Link copied to clipboard
open override var numH: Int
Link copied to clipboard
open override var numW: Int
Link copied to clipboard
open override var paint: PaintStyle
Link copied to clipboard
val pyramid: TilePyramid<DataType>
Link copied to clipboard
open override var source: TileSource<TileData>
Link copied to clipboard
var tileLayerRenderer: TileLayerRenderer<TileData, LayerRenderContext<Any>>
Link copied to clipboard
open override val viewport: Viewport?
Link copied to clipboard
val MapLayer<*, *>.viewport: Viewport?
Link copied to clipboard
open override var visible: Boolean
Link copied to clipboard
var z: Double

Functions

Link copied to clipboard
open override fun getVisibleTileCoords(latLonBounds: LatLonBounds, tileBounds: TileBounds, zoom: Double, fromGetRenderables: Boolean): List<TileCoord>

Recieves LatLonBounds and zoom level

Link copied to clipboard
fun latToTile(lat: Double, zoom: Int): Int
Link copied to clipboard
open override fun onAdd()
open override fun onAdd(context: Context)
open override fun onAdd(context: RenderContext<Any>, tileLayer: TileLayer)
Link copied to clipboard
open override fun onClick()
Link copied to clipboard
open override fun onHidden()
Link copied to clipboard
open suspend override fun onMove()

Gets bounds and requests visible tiles

Link copied to clipboard
open suspend override fun onMoveEnd()
Link copied to clipboard
open override fun onMoveStart()
Link copied to clipboard
open override fun onRemove()
Link copied to clipboard
open override fun onResize()
Link copied to clipboard
open override fun onVisible()
Link copied to clipboard
open override fun prerender(elapsedTime: Double)
Link copied to clipboard
inline fun <EventType : Event> EventSource.publisher(eventType: Class<EventType>): Flow<EventType>
Link copied to clipboard
open override fun render(texUnit: HashMap<String, Int>, camera: Camera)

Called from LayerHost.render(), calls TileLayerRenderer.draw()

Link copied to clipboard
suspend fun requestVisibleTiles(bounds: LatLonBounds, force: Boolean = false, reload: Boolean = false)
Link copied to clipboard
fun setNeedsUpdate(force: Boolean = false)
Link copied to clipboard
inline suspend fun <EventType : Event> EventSource.subscribe(eventType: Class<EventType>, crossinline handler: (EventType) -> Unit)
Link copied to clipboard
Link copied to clipboard
open suspend override fun update()

Alternative to onMove() that requests visible tiles, but does not update bounds, .