addStyleCustomLayer

open override fun addStyleCustomLayer(layerId: String, layerHost: CustomLayerHost, layerPosition: LayerPosition?): Expected<String, None>

Adds a new style custom layer.

style-spec#layers

Runtime style layers are valid until they are either removed or a new style is loaded.

Note: Custom layers are only valid on OpenGL rendering backend. Attempting to add a custom layer on Metal rendering backend results in undefined behavior.

Return

A string describing an error if the operation was not successful, or empty otherwise.

Parameters

layerHost

Style custom layer host.

layerId

Style layer id.

layerPosition

The position of the layer