StyleManager
Interface for managing style of the `map`.
Functions
addPersistentStyleCustomLayer
Link copied to clipboard
open fun addPersistentStyleCustomLayer(@NonNull layerId: String, @NonNull layerHost: CustomLayerHost, @Nullable layerPosition: LayerPosition): Expected<String, None>
Content copied to clipboard
Adds a new [style custom layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
addPersistentStyleLayer
Link copied to clipboard
open fun addPersistentStyleLayer(@NonNull properties: Value, @Nullable layerPosition: LayerPosition): Expected<String, None>
Content copied to clipboard
Adds a new [style layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
addStyleCustomGeometrySource
Link copied to clipboard
open fun addStyleCustomGeometrySource(@NonNull sourceId: String, @NonNull options: CustomGeometrySourceOptions): Expected<String, None>
Content copied to clipboard
Adds a custom geometry to be used in the style.
addStyleCustomLayer
Link copied to clipboard
open fun addStyleCustomLayer(@NonNull layerId: String, @NonNull layerHost: CustomLayerHost, @Nullable layerPosition: LayerPosition): Expected<String, None>
Content copied to clipboard
Adds a new [style custom layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
addStyleImage
Link copied to clipboard
open fun addStyleImage(@NonNull imageId: String, scale: Float, @NonNull image: Image, sdf: Boolean, @NonNull stretchX: List<ImageStretches>, @NonNull stretchY: List<ImageStretches>, @Nullable content: ImageContent): Expected<String, None>
Content copied to clipboard
Adds an image to be used in the style.
addStyleLayer
Link copied to clipboard
open fun addStyleLayer(@NonNull properties: Value, @Nullable layerPosition: LayerPosition): Expected<String, None>
Content copied to clipboard
Adds a new [style layer](https://docs.mapbox.com/mapbox-gl-js/style-spec/#layers).
addStyleModel
Link copied to clipboard
addStyleSource
Link copied to clipboard
getStyleAtmosphereProperty
Link copied to clipboard
open fun getStyleAtmosphereProperty(@NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of a style atmosphere property.
getStyleDefaultCamera
Link copied to clipboard
Returns the map style's default camera, if any, or a default camera otherwise.
getStyleImage
Link copied to clipboard
Get an `image` from the style.
getStyleJSON
Link copied to clipboard
Get the JSON serialization string of the current style in use.
getStyleLayerProperties
Link copied to clipboard
getStyleLayerProperty
Link copied to clipboard
open fun getStyleLayerProperty(@NonNull layerId: String, @NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of style layer property.
getStyleLayerPropertyDefaultValue
Link copied to clipboard
open fun getStyleLayerPropertyDefaultValue(@NonNull layerType: String, @NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the default value of style layer property
getStyleLayers
Link copied to clipboard
Returns the existing style layers.
getStyleLightProperty
Link copied to clipboard
open fun getStyleLightProperty(@NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of a style light property.
open fun getStyleLightProperty(@NonNull id: String, @NonNull property: String): StylePropertyValue
Content copied to clipboard
getStyleLights
Link copied to clipboard
getStyleProjectionProperty
Link copied to clipboard
open fun getStyleProjectionProperty(@NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of a style projection property.
getStyleSourceProperties
Link copied to clipboard
getStyleSourceProperty
Link copied to clipboard
open fun getStyleSourceProperty(@NonNull sourceId: String, @NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of style source property.
getStyleSourcePropertyDefaultValue
Link copied to clipboard
open fun getStyleSourcePropertyDefaultValue(@NonNull sourceType: String, @NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the default value of style source property.
getStyleSources
Link copied to clipboard
Returns the existing style sources.
getStyleTerrainProperty
Link copied to clipboard
open fun getStyleTerrainProperty(@NonNull property: String): StylePropertyValue
Content copied to clipboard
Gets the value of a style terrain property.
getStyleTransition
Link copied to clipboard
Returns the map style's transition options.
getStyleURI
Link copied to clipboard
Get the URI of the current style in use.
hasStyleImage
Link copied to clipboard
Checks whether an image exists.
hasStyleModel
Link copied to clipboard
Checks whether a model exists.
invalidateStyleCustomGeometrySourceRegion
Link copied to clipboard
open fun invalidateStyleCustomGeometrySourceRegion(@NonNull sourceId: String, @NonNull bounds: CoordinateBounds): Expected<String, None>
Content copied to clipboard
Invalidate region for provided custom geometry source.
invalidateStyleCustomGeometrySourceTile
Link copied to clipboard
open fun invalidateStyleCustomGeometrySourceTile(@NonNull sourceId: String, @NonNull tileId: CanonicalTileID): Expected<String, None>
Content copied to clipboard
Invalidate tile for provided custom geometry source.
isStyleLayerPersistent
Link copied to clipboard
isStyleLoaded
Link copied to clipboard
Check if the style is completely loaded.
moveStyleLayer
Link copied to clipboard
open fun moveStyleLayer(@NonNull layerId: String, @Nullable layerPosition: LayerPosition): Expected<String, None>
Content copied to clipboard
Moves an existing style layer
removeStyleImage
Link copied to clipboard
removeStyleLayer
Link copied to clipboard
removeStyleModel
Link copied to clipboard
removeStyleSource
Link copied to clipboard
setStyleAtmosphere
Link copied to clipboard
setStyleAtmosphereProperty
Link copied to clipboard
setStyleCustomGeometrySourceTileData
Link copied to clipboard
setStyleGeoJSONSourceData
Link copied to clipboard
Content copied to clipboard
setStyleJSON
Link copied to clipboard
Load the style from a provided JSON string.
setStyleLayerProperties
Link copied to clipboard
setStyleLight
Link copied to clipboard
setStyleLightProperty
Link copied to clipboard
Sets a value to the the style light property.
setStyleLights
Link copied to clipboard
setStyleProjection
Link copied to clipboard
setStyleProjectionProperty
Link copied to clipboard
setStyleSourceProperties
Link copied to clipboard
setStyleTerrain
Link copied to clipboard
setStyleTerrainProperty
Link copied to clipboard
setStyleTransition
Link copied to clipboard
open fun setStyleTransition(@NonNull transitionOptions: TransitionOptions)
Content copied to clipboard
Overrides the map style's transition options with user-provided options.
setStyleURI
Link copied to clipboard
Load style from provided URI.
styleLayerExists
Link copied to clipboard
Checks whether a given style layer exists.
styleSourceExists
Link copied to clipboard
Checks whether a given style source exists.
unsubscribe
Link copied to clipboard
Unsubscribes an `observer` from all events.
updateStyleImageSourceImage
Link copied to clipboard