StyleInterface

interface StyleInterface : StyleManagerInterface

Defines the style interface that can be used to interact with the map's style.

Functions

addImage
Link copied to clipboard
abstract fun addImage(imageId: String, bitmap: Bitmap): Expected<String, None>

Adds an image to be used in the style. This API can also be used for updating an image. If the image \a id was already added, it gets replaced by the new image.

addPersistentStyleCustomLayer
Link copied to clipboard
abstract fun addPersistentStyleCustomLayer(@NonNull p0: String, @NonNull p1: CustomLayerHost, @Nullable p2: LayerPosition?): Expected<String, None>
addPersistentStyleLayer
Link copied to clipboard
abstract fun addPersistentStyleLayer(@NonNull p0: Value, @Nullable p1: LayerPosition?): Expected<String, None>
addStyleCustomGeometrySource
Link copied to clipboard
addStyleCustomLayer
Link copied to clipboard
abstract fun addStyleCustomLayer(@NonNull p0: String, @NonNull p1: CustomLayerHost, @Nullable p2: LayerPosition?): Expected<String, None>
addStyleImage
Link copied to clipboard
abstract fun addStyleImage(@NonNull p0: String, p1: Float, @NonNull p2: Image, p3: Boolean, @NonNull p4: MutableList<ImageStretches>, @NonNull p5: MutableList<ImageStretches>, @Nullable p6: ImageContent?): Expected<String, None>
addStyleLayer
Link copied to clipboard
abstract fun addStyleLayer(@NonNull p0: Value, @Nullable p1: LayerPosition?): Expected<String, None>
addStyleModel
Link copied to clipboard
abstract fun addStyleModel(@NonNull p0: String, @NonNull p1: String): Expected<String, None>
addStyleSource
Link copied to clipboard
abstract fun addStyleSource(@NonNull p0: String, @NonNull p1: Value): Expected<String, None>
getStyleAtmosphereProperty
Link copied to clipboard
abstract fun getStyleAtmosphereProperty(@NonNull p0: String): StylePropertyValue
getStyleDefaultCamera
Link copied to clipboard
abstract fun getStyleDefaultCamera(): CameraOptions
getStyleImage
Link copied to clipboard
abstract fun getStyleImage(@NonNull p0: String): Image?
getStyleJSON
Link copied to clipboard
abstract fun getStyleJSON(): String
getStyleLayerProperties
Link copied to clipboard
abstract fun getStyleLayerProperties(@NonNull p0: String): Expected<String, Value>
getStyleLayerProperty
Link copied to clipboard
abstract fun getStyleLayerProperty(@NonNull p0: String, @NonNull p1: String): StylePropertyValue
getStyleLayers
Link copied to clipboard
abstract fun getStyleLayers(): MutableList<StyleObjectInfo>
getStyleLightProperty
Link copied to clipboard
abstract fun getStyleLightProperty(@NonNull p0: String): StylePropertyValue
abstract fun getStyleLightProperty(@NonNull p0: String, @NonNull p1: String): StylePropertyValue
getStyleLights
Link copied to clipboard
abstract fun getStyleLights(): MutableList<StyleObjectInfo>
getStyleProjectionProperty
Link copied to clipboard
abstract fun getStyleProjectionProperty(@NonNull p0: String): StylePropertyValue
getStyleSourceProperties
Link copied to clipboard
abstract fun getStyleSourceProperties(@NonNull p0: String): Expected<String, Value>
getStyleSourceProperty
Link copied to clipboard
abstract fun getStyleSourceProperty(@NonNull p0: String, @NonNull p1: String): StylePropertyValue
getStyleSources
Link copied to clipboard
abstract fun getStyleSources(): MutableList<StyleObjectInfo>
getStyleTerrainProperty
Link copied to clipboard
abstract fun getStyleTerrainProperty(@NonNull p0: String): StylePropertyValue
getStyleTransition
Link copied to clipboard
abstract fun getStyleTransition(): TransitionOptions
getStyleURI
Link copied to clipboard
abstract fun getStyleURI(): String
hasStyleImage
Link copied to clipboard
abstract fun hasStyleImage(@NonNull p0: String): Boolean
hasStyleModel
Link copied to clipboard
abstract fun hasStyleModel(@NonNull p0: String): Boolean
invalidateStyleCustomGeometrySourceTile
Link copied to clipboard
isStyleLayerPersistent
Link copied to clipboard
abstract fun isStyleLayerPersistent(@NonNull p0: String): Expected<String, Boolean>
isStyleLoaded
Link copied to clipboard
abstract fun isStyleLoaded(): Boolean
isValid
Link copied to clipboard
abstract fun isValid(): Boolean

Whether the Style instance is valid.

moveStyleLayer
Link copied to clipboard
abstract fun moveStyleLayer(@NonNull p0: String, @Nullable p1: LayerPosition?): Expected<String, None>
removeStyleImage
Link copied to clipboard
abstract fun removeStyleImage(@NonNull p0: String): Expected<String, None>
removeStyleLayer
Link copied to clipboard
abstract fun removeStyleLayer(@NonNull p0: String): Expected<String, None>
removeStyleModel
Link copied to clipboard
abstract fun removeStyleModel(@NonNull p0: String): Expected<String, None>
removeStyleSource
Link copied to clipboard
abstract fun removeStyleSource(@NonNull p0: String): Expected<String, None>
setStyleAtmosphere
Link copied to clipboard
abstract fun setStyleAtmosphere(@NonNull p0: Value): Expected<String, None>
setStyleAtmosphereProperty
Link copied to clipboard
abstract fun setStyleAtmosphereProperty(@NonNull p0: String, @NonNull p1: Value): Expected<String, None>
setStyleCustomGeometrySourceTileData
Link copied to clipboard
abstract fun setStyleCustomGeometrySourceTileData(@NonNull p0: String, @NonNull p1: CanonicalTileID, @NonNull p2: MutableList<Feature>): Expected<String, None>
setStyleGeoJSONSourceData
Link copied to clipboard
abstract fun setStyleGeoJSONSourceData(@NonNull p0: String, @NonNull p1: GeoJSONSourceData): Expected<String, None>
abstract fun setStyleGeoJSONSourceData(@NonNull p0: String, @NonNull p1: String, @NonNull p2: GeoJSONSourceData): Expected<String, None>
setStyleJSON
Link copied to clipboard
abstract fun setStyleJSON(@NonNull p0: String)
setStyleLayerProperties
Link copied to clipboard
abstract fun setStyleLayerProperties(@NonNull p0: String, @NonNull p1: Value): Expected<String, None>
setStyleLayerProperty
Link copied to clipboard
abstract fun setStyleLayerProperty(@NonNull p0: String, @NonNull p1: String, @NonNull p2: Value): Expected<String, None>
setStyleLight
Link copied to clipboard
abstract fun setStyleLight(@NonNull p0: Value): Expected<String, None>
setStyleLightProperty
Link copied to clipboard
abstract fun setStyleLightProperty(@NonNull p0: String, @NonNull p1: Value): Expected<String, None>
abstract fun setStyleLightProperty(@NonNull p0: String, @NonNull p1: String, @NonNull p2: Value): Expected<String, None>
setStyleLights
Link copied to clipboard
abstract fun setStyleLights(@NonNull p0: Value): Expected<String, None>
setStyleProjection
Link copied to clipboard
abstract fun setStyleProjection(@NonNull p0: Value): Expected<String, None>
setStyleProjectionProperty
Link copied to clipboard
abstract fun setStyleProjectionProperty(@NonNull p0: String, @NonNull p1: Value): Expected<String, None>
setStyleSourceProperties
Link copied to clipboard
abstract fun setStyleSourceProperties(@NonNull p0: String, @NonNull p1: Value): Expected<String, None>
setStyleSourceProperty
Link copied to clipboard
abstract fun setStyleSourceProperty(@NonNull p0: String, @NonNull p1: String, @NonNull p2: Value): Expected<String, None>
setStyleTerrain
Link copied to clipboard
abstract fun setStyleTerrain(@NonNull p0: Value): Expected<String, None>
setStyleTerrainProperty
Link copied to clipboard
abstract fun setStyleTerrainProperty(@NonNull p0: String, @NonNull p1: Value): Expected<String, None>
setStyleTransition
Link copied to clipboard
abstract fun setStyleTransition(@NonNull p0: TransitionOptions)
setStyleURI
Link copied to clipboard
abstract fun setStyleURI(@NonNull p0: String)
styleLayerExists
Link copied to clipboard
abstract fun styleLayerExists(@NonNull p0: String): Boolean
styleSourceExists
Link copied to clipboard
abstract fun styleSourceExists(@NonNull p0: String): Boolean
subscribe
Link copied to clipboard
abstract fun subscribe(@NonNull p0: Observer, @NonNull p1: MutableList<String>)
unsubscribe
Link copied to clipboard
abstract fun unsubscribe(@NonNull p0: Observer)
abstract fun unsubscribe(@NonNull p0: Observer, @NonNull p1: MutableList<String>)
updateStyleImageSourceImage
Link copied to clipboard
abstract fun updateStyleImageSourceImage(@NonNull p0: String, @NonNull p1: Image): Expected<String, None>

Properties

pixelRatio
Link copied to clipboard
abstract val pixelRatio: Float

The pixel ratio of the current display for the map to be rendered on, this value is initialised and can be overwritten at the Map's initialisation period.

Inheritors

Style
Link copied to clipboard

Extensions

addImage
Link copied to clipboard
fun StyleInterface.addImage(image: StyleContract.StyleImageExtension)

Extension function to add an image provided by the Style Extension to the Style.

addImage9Patch
Link copied to clipboard
fun StyleInterface.addImage9Patch(image: StyleContract.StyleImageExtension)

Extension function to add 9-patch image provided by the Style Extension to the Style.

fun StyleInterface.addImage9Patch(imageId: String, bitmap: Bitmap, scale: Float = pixelRatio, sdf: Boolean = false): Expected<String, None>

Adds an 9-patch image to be used in the style. X-stretches, Y-stretches and padding will be calculated from Bitmap.getNinePatchChunk.

addLayer
Link copied to clipboard
fun StyleInterface.addLayer(layer: StyleContract.StyleLayerExtension)

Extension function to add a Layer provided by the Style Extension to the Style.

addLayerAbove
Link copied to clipboard
fun StyleInterface.addLayerAbove(layer: StyleContract.StyleLayerExtension, above: String?)

Extension function to add a Layer provided by the Style Extension to the Style.

addLayerAt
Link copied to clipboard
fun StyleInterface.addLayerAt(layer: StyleContract.StyleLayerExtension, index: Int?)

Extension function to add a Layer provided by the Style Extension to the Style.

addLayerBelow
Link copied to clipboard
fun StyleInterface.addLayerBelow(layer: StyleContract.StyleLayerExtension, below: String?)

Extension function to add a Layer provided by the Style Extension to the Style.

addModel
Link copied to clipboard
fun StyleInterface.addModel(model: StyleContract.StyleModelExtension)

Extension function to add a model provided by the Style Extension to the Style.

addPersistentLayer
Link copied to clipboard
fun StyleInterface.addPersistentLayer(layer: Layer, position: LayerPosition? = null)

Add layer to the style persistently.

addSource
Link copied to clipboard
fun StyleInterface.addSource(source: StyleContract.StyleSourceExtension)

Extension function to add a Source provided by the Style Extension to the Style.

getAtmosphere
Link copied to clipboard
fun StyleInterface.getAtmosphere(): Atmosphere

Extension function to get the atmosphere provided by the Style Extension.

getLight
Link copied to clipboard
fun StyleInterface.getLight(): Light

Extension function to get the light provided by the Style Extension.

getProjection
Link copied to clipboard
fun StyleInterface.getProjection(): Projection

Extension function to get the projection provided by the Style Extension.

getTerrain
Link copied to clipboard
fun StyleInterface.getTerrain(sourceId: String): Terrain

Extension function to get the terrain provided by the Style Extension.

localizeLabels
Link copied to clipboard
fun StyleInterface.localizeLabels(locale: Locale, layerIds: List<String>? = null)

Extension function to localize style labels

removeAtmosphere
Link copied to clipboard
fun StyleInterface.removeAtmosphere()

Removes atmosphere from style if it was set.

removeTerrain
Link copied to clipboard
fun StyleInterface.removeTerrain()

Removes terrain from style if it was set.

setAtmosphere
Link copied to clipboard
fun StyleInterface.setAtmosphere(atmosphere: StyleContract.StyleAtmosphereExtension)

Extension function to set the Atmosphere provided by the Style Extension to the Style.

setLight
Link copied to clipboard
fun StyleInterface.setLight(light: StyleContract.StyleLightExtension)

Extension function to add a Light provided by the Style Extension to the Style.

setProjection
Link copied to clipboard
fun StyleInterface.setProjection(projection: Projection)

Extension function to set the Projection provided by the Style Extension to the Style.

setTerrain
Link copied to clipboard
fun StyleInterface.setTerrain(terrain: StyleContract.StyleTerrainExtension)

Extension function to set the Terrain provided by the Style Extension to the Style.