@Beta(2020, 12) interface StyleSettings : Style, UIMapSettings
Advanced settings for style manipulation. To obtain this interface, call TomtomMap#getStyleSettings()
abstract fun addImage(image: Image): Unit
Adds an image to the style. |
|
abstract fun addLayer(layer: Layer): Unit
Adds a layer to the style. The layer is added above all existing layers. |
|
abstract fun addSource(source: Source): Unit
Adds a source to the style. |
|
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. |
|
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. |
|
abstract fun findLayersById(regex: String): MutableList<Layer!>
Provides access to all layers whose id matches the provided Regex. |
|
abstract fun findLayersBySourceLayerId(regex: String): MutableList<Layer!>
Provides access to all layers whose source layers have an id matching the provided Regex. |
|
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. |
|
abstract fun getLayers(): MutableList<Layer!>
Provides access to all layers in the style. |
|
abstract fun loadDefaultStyle(): Unit
Loads the style with the default URL based on |
|
abstract fun moveLayerBehind(id: String, referenceLayerId: String): Unit
Moves the layer behind the reference layer. |
|
abstract fun removeImage(id: String): Unit
Removes an image with a provided id from the style. |
|
abstract fun removeLayer(id: String): Unit
Removes the layer with a provided id from the style. |
|
abstract fun removeSource(id: String): Unit
Removes the source with the provided id from the style. |
|
abstract fun setStyleJson(styleJson: String!): Unit
Sets the JSON content of the style used to display the map and reloads the style asynchronously. NOTE: This is an asynchronous operation. The user of this API needs to ensure that no methods of the StyleSettings interface are called before the style is reloaded. TomtomMapCallback.OnMapChangedListener.onDidFinishLoadingStyle is called when reloading the style is finished. An OnMapChangedListener can be registered using TomTomMap.addOnMapChangedListener. abstract fun setStyleJson(styleJson: String!, layerSetConfiguration: LayerSetConfiguration!): Unit
Sets the JSON content of the style used to display the map and reloads the style asynchronously with the custom |
|
abstract fun setStyleUrl(styleUrl: String!): Unit
Sets the URL to the style used to display the map and reloads the style asynchronously. NOTE: This is an asynchronous operation. The user of this API needs to ensure that no methods of the StyleSettings interface are called before the style is reloaded. TomtomMapCallback.OnMapChangedListener.onDidFinishLoadingStyle is called when reloading the style is finished. An OnMapChangedListener can be registered using TomTomMap.addOnMapChangedListener. abstract fun setStyleUrl(styleUrl: String!, layerSetConfiguration: LayerSetConfiguration!): Unit
Sets the URL to the style used to display the map and reloads the style asynchronously with a custom |