MapLayer

interface MapLayer<DataType : TileData, RenderContext : LayerRenderContext<Any>> : MapEventObserver, EventSource

Inheritors

Types

Link copied to clipboard
data class SourceEventHandler(val event: String, val handler: (Any?) -> Unit)
Link copied to clipboard
data class TimeSeriesData(val loading: Boolean = false, val valid: Boolean = false)

Properties

Link copied to clipboard
abstract var alpha: Float
Link copied to clipboard
abstract var animator: TimeSeriesAnimator<Data>?
Link copied to clipboard
abstract var enabled: Boolean
Link copied to clipboard
Link copied to clipboard
abstract val id: String
Link copied to clipboard
abstract var invertMaskLayer: Boolean

Whether to invert the mask layer's output.

Link copied to clipboard
abstract var isDirty: Boolean
Link copied to clipboard
Link copied to clipboard

The map controller that this layer is associated with.

Link copied to clipboard
abstract var numH: Int
Link copied to clipboard
abstract var numW: Int
Link copied to clipboard
abstract var paint: LayerPaint
Link copied to clipboard
abstract var renderer: LayerRenderer<Any>
Link copied to clipboard
abstract var source: TileSource<DataType>
Link copied to clipboard
abstract var timeSeries: AnyTimeSeries?

The time series associated with the layer, if any.

Link copied to clipboard
abstract var timing: LayerTiming

The layer's timing configuration.

Link copied to clipboard
abstract var type: LayerType

The type of layer.

Link copied to clipboard
abstract val viewport: Viewport?
Link copied to clipboard
val MapLayer<*, *>.viewport: Viewport?
Link copied to clipboard
abstract var visible: Boolean

Functions

Link copied to clipboard
open fun addSourceEventHandler(event: String, handler: (e: Any?) -> Unit, once: Boolean = false)
Link copied to clipboard

Returns the time series data provider to use for animating the layer, if any.

Link copied to clipboard
abstract fun getVisibleTileCoords(latLonBounds: LatLonBounds, tileBounds: TileBounds, zoom: Double, wrap: Boolean): List<TileCoord>
Link copied to clipboard
open fun hide()
Link copied to clipboard
open fun onAdd(context: Context, controller: MapController)
abstract fun onAdd()
abstract fun onAdd(context: RenderContext<Any>, tileLayer: TileLayer, controller: MapboxMapController)
Link copied to clipboard
abstract fun onClick()
Link copied to clipboard
open override fun onHidden()
Link copied to clipboard
abstract suspend fun onMove()
Link copied to clipboard
abstract suspend fun onMoveEnd()
Link copied to clipboard
abstract fun onMoveStart()
Link copied to clipboard
open fun onReady()
Link copied to clipboard
abstract fun onRemove()
Link copied to clipboard
abstract fun onResize()
Link copied to clipboard
open fun onSourceMetadata()

Called when the data source's metadata has been loaded.

Link copied to clipboard
open override fun onVisible()
Link copied to clipboard
abstract fun prerender(elapsedTime: Double)
Link copied to clipboard
inline fun <EventType : Event> EventSource.publisher(eventType: Class<EventType>): Flow<EventType>
Link copied to clipboard
open fun refresh(clear: Boolean = false)

Refreshes the layer by re-rendering it. If a complete refresh is needed including triggering the associated data source to reload, then pass an argument of true when calling the method. Otherwise, existing cached data will be used when the layer is re-rendered.

Link copied to clipboard
abstract fun render(texUnit: <Error class: unknown class><String, Int>, camera: Camera)
Link copied to clipboard
open fun setNeedsUpdate(force: Boolean = false)

Flags the layer as dirty so that it is updated during the next render frame.

Link copied to clipboard
open fun show()
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
abstract suspend fun update()