sdk-maps / com.tomtom.online.sdk.map.style / Style

Style

@Beta(2020, 12) interface Style

An interface that represents map style.

Functions

addImage

abstract fun addImage(image: Image): Unit

Adds an image to the style.

addLayer

abstract fun addLayer(layer: Layer): Unit

Adds a layer to the style. The layer is added above all existing layers.

addSource

abstract fun addSource(source: Source): Unit

Adds a source to the style.

findImageById

abstract fun findImageById(id: String!): Optional<Image!>

Provides access to the image with the provided id if such an image is present in the style.

findLayerById

abstract fun findLayerById(id: String): Optional<Layer!>

Provides access to the layer with a provided id if such a layer is present in the style.

findLayersById

abstract fun findLayersById(regex: String): MutableList<Layer!>

Provides access to all layers whose id matches the provided Regex.

findLayersBySourceLayerId

abstract fun findLayersBySourceLayerId(regex: String): MutableList<Layer!>

Provides access to all layers whose source layers have an id matching the provided Regex.

findSourceById

abstract fun findSourceById(id: String): Optional<Source!>

Provides access to the source with the provided id if such a source is present in the style.

getLayers

abstract fun getLayers(): MutableList<Layer!>

Provides access to all layers in the style.

moveLayerBehind

abstract fun moveLayerBehind(id: String, referenceLayerId: String): Unit

Moves the layer behind the reference layer.

removeImage

abstract fun removeImage(id: String): Unit

Removes an image with a provided id from the style.

removeLayer

abstract fun removeLayer(id: String): Unit

Removes the layer with a provided id from the style.

removeSource

abstract fun removeSource(id: String): Unit

Removes the source with the provided id from the style.

Inheritors

StyleSettings

interface StyleSettings : Style, UIMapSettings

Advanced settings for style manipulation. To obtain this interface, call TomtomMap#getStyleSettings().