CustomLayer

Layer with custom rendering implementation.

With the power of CustomLayerHost you can implement your own Open GL ES rendering behaviour and manipulate layer as a usual one.

Parameters

layerId

mandatory custom layer id.

host

an instance of user-defined OpenGL ES renderer. Note: there is no API to get instance of CustomLayerHost from CustomLayer after setting it here so this instance should be cached on user's end if needed.

Constructors

Link copied to clipboard
fun CustomLayer(layerId: String, host: CustomLayerHost)

Types

Link copied to clipboard
object Companion

Static methods and variables.

Functions

Link copied to clipboard
fun bindTo(delegate: MapboxStyleManager)

Bind the layer to the Style.

open override fun bindTo(delegate: MapboxStyleManager, position: LayerPosition?)

Bind the layer to the map controller.

Link copied to clipboard
open override fun maxZoom(maxZoom: Double): CustomLayer

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

Link copied to clipboard
open override fun minZoom(minZoom: Double): CustomLayer

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

Link copied to clipboard
open override fun slot(slot: String): CustomLayer

The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.

Link copied to clipboard
open override fun toString(): String

Returns a human readable string that includes the cached properties of the layer.

Link copied to clipboard
open override fun visibility(visibility: Expression): CustomLayer
open override fun visibility(visibility: Visibility): CustomLayer

Whether this layer is displayed.

Properties

Link copied to clipboard
open override val layerId: String
Link copied to clipboard
open override val maxZoom: Double?

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

Link copied to clipboard
open override val minZoom: Double?

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

Link copied to clipboard
open override val slot: String?

The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.

Link copied to clipboard
open override val visibility: Visibility?

Whether this layer is displayed.

Link copied to clipboard

Whether this layer is displayed.

Extensions

Link copied to clipboard

Get the persistent property as Boolean.