Anchor

sealed interface Anchor(source)

Declares where the layers should be anchored, i.e. positioned in the list of layers in the map style.

This allows for layers declared in Compose to be inserted at any location of the layers defined in the base style JSON rather than exclusively on top of these.

See Anchor.Companion for Composable functions to use in the layers composition.

Inheritors

Types

Link copied to clipboard
data class Above(val layerId: String) : Anchor

Layer(s) are anchored above the layer with the given layerId, i.e. in front of it. See Anchor.Companion.Above to use this in the layers composition.

Link copied to clipboard
data class Below(val layerId: String) : Anchor

Layer(s) are anchored below the layer with the given layerId, i.e. behind it. See Anchor.Companion.Below to use this in the layers composition.

Link copied to clipboard
data object Bottom : Anchor

Layer(s) are anchored at the bottom, i.e. in behind of all other layers. See Anchor.Companion.Bottom to use this in the layers composition.

Link copied to clipboard
object Companion
Link copied to clipboard
data class Replace(val layerId: String) : Anchor

Layer(s) replace the layer with the given layerId, i.e. are shown instead of it. See Anchor.Companion.Replace to use this in the layers composition.

Link copied to clipboard
data object Top : Anchor

Layer(s) are anchored at the top, i.e. in front of all other layers. See Anchor.Companion.Top to use this in the layers composition.