Style
The general class to interact with Styles in the Modular Mapbox Maps SDK for Android. It exposes the entry point for all methods related to the Style. You cannot instantiate Style object directly, rather, you must obtain one from the getStyleAsync() method on MapboxMap.
Note: Similar to a View object, a Style should only be read and modified from the main thread.
Types
Functions
addImage
Link copied to clipboard
addPersistentStyleCustomLayer
Link copied to clipboard
open override fun addPersistentStyleCustomLayer(layerId: String, layerHost: CustomLayerHost, layerPosition: LayerPosition?): Expected<String, None>
Content copied to clipboard
addPersistentStyleLayer
Link copied to clipboard
open override fun addPersistentStyleLayer(properties: Value, layerPosition: LayerPosition?): Expected<String, None>
Content copied to clipboard
addStyleCustomGeometrySource
Link copied to clipboard
open override fun addStyleCustomGeometrySource(sourceId: String, options: CustomGeometrySourceOptions): Expected<String, None>
Content copied to clipboard
addStyleCustomLayer
Link copied to clipboard
open override fun addStyleCustomLayer(layerId: String, layerHost: CustomLayerHost, layerPosition: LayerPosition?): Expected<String, None>
Content copied to clipboard
addStyleImage
Link copied to clipboard
open override fun addStyleImage(imageId: String, scale: Float, image: Image, sdf: Boolean, stretchX: List<ImageStretches>, stretchY: List<ImageStretches>, content: ImageContent?): Expected<String, None>
Content copied to clipboard
addStyleLayer
Link copied to clipboard
open override fun addStyleLayer(parameters: Value, position: LayerPosition?): Expected<String, None>
Content copied to clipboard
addStyleSource
Link copied to clipboard
equals
Link copied to clipboard
getStyleDefaultCamera
Link copied to clipboard
getStyleImage
Link copied to clipboard
getStyleJSON
Link copied to clipboard
getStyleLayerProperties
Link copied to clipboard
open override fun getStyleLayerProperties(layerId: String): Expected<String, Value>
Content copied to clipboard
getStyleLayerProperty
Link copied to clipboard
open override fun getStyleLayerProperty(layerId: String, property: String): StylePropertyValue
Content copied to clipboard
getStyleLayers
Link copied to clipboard
getStyleLightProperty
Link copied to clipboard
open override fun getStyleLightProperty(property: String): StylePropertyValue
Content copied to clipboard
getStyleSourceProperties
Link copied to clipboard
open override fun getStyleSourceProperties(sourceId: String): Expected<String, Value>
Content copied to clipboard
getStyleSourceProperty
Link copied to clipboard
open override fun getStyleSourceProperty(sourceId: String, property: String): StylePropertyValue
Content copied to clipboard
getStyleSources
Link copied to clipboard
getStyleSourcesAttribution
Link copied to clipboard
getStyleTerrainProperty
Link copied to clipboard
open override fun getStyleTerrainProperty(property: String): StylePropertyValue
Content copied to clipboard
getStyleTransition
Link copied to clipboard
getStyleURI
Link copied to clipboard
invalidateStyleCustomGeometrySourceRegion
Link copied to clipboard
open override fun invalidateStyleCustomGeometrySourceRegion(sourceId: String, coordinateBounds: CoordinateBounds): Expected<String, None>
Content copied to clipboard
invalidateStyleCustomGeometrySourceTile
Link copied to clipboard
open override fun invalidateStyleCustomGeometrySourceTile(sourceId: String, tileId: CanonicalTileID): Expected<String, None>
Content copied to clipboard
isStyleLayerPersistent
Link copied to clipboard
open override fun isStyleLayerPersistent(layerId: String): Expected<String, Boolean>
Content copied to clipboard
isStyleLoaded
Link copied to clipboard
moveStyleLayer
Link copied to clipboard
open override fun moveStyleLayer(layerId: String, layerPosition: LayerPosition?): Expected<String, None>
Content copied to clipboard
removeStyleImage
Link copied to clipboard
open override fun removeStyleImage(imageId: String): Expected<String, None>
Content copied to clipboard
removeStyleLayer
Link copied to clipboard
open override fun removeStyleLayer(layerId: String): Expected<String, None>
Content copied to clipboard
removeStyleSource
Link copied to clipboard
open override fun removeStyleSource(sourceId: String): Expected<String, None>
Content copied to clipboard
setStyleCustomGeometrySourceTileData
Link copied to clipboard
open override fun setStyleCustomGeometrySourceTileData(sourceId: String, tileId: CanonicalTileID, featureCollection: MutableList<Feature>): Expected<String, None>
Content copied to clipboard
setStyleJSON
Link copied to clipboard
setStyleLayerProperties
Link copied to clipboard
setStyleLayerProperty
Link copied to clipboard
setStyleLight
Link copied to clipboard
open override fun setStyleLight(parameters: Value): Expected<String, None>
Content copied to clipboard
setStyleLightProperty
Link copied to clipboard
setStyleSourceProperties
Link copied to clipboard
setStyleSourceProperty
Link copied to clipboard
setStyleTerrain
Link copied to clipboard
open override fun setStyleTerrain(properties: Value): Expected<String, None>
Content copied to clipboard
setStyleTerrainProperty
Link copied to clipboard
setStyleTransition
Link copied to clipboard
open override fun setStyleTransition(transitionOptions: TransitionOptions)
Content copied to clipboard
setStyleURI
Link copied to clipboard
styleLayerExists
Link copied to clipboard
styleSourceExists
Link copied to clipboard
subscribe
Link copied to clipboard
open override fun subscribe(observer: Observer, events: MutableList<String>)
Content copied to clipboard
unsubscribe
Link copied to clipboard
open override fun unsubscribe(observer: Observer, events: MutableList<String>)
Content copied to clipboard
updateStyleImageSourceImage
Link copied to clipboard
Properties
pixelRatio
Link copied to clipboard
the scale ratio of the style, default the device pixel ratio