Mapbox Style Manager
Wrapper class for StyleManager allowing to expose style related methods for MapboxMap.
Constructors
Functions
Adds an image to be used in the style. This API can also be used for updating an image. If the image id was already added, it gets replaced by the new image.
Adds a new style custom layer.
Adds a new style layer.
Adds a custom geometry to be used in the style. To add the data, implement the CustomGeometrySourceOptions.Builder.fetchTile@CallSuper @MainThread open function callback in the options and call setStyleCustomGeometrySourceTileData
Adds a new style custom layer.
Note! This is an experimental feature. It can be changed or removed in future versions.
Adds an image to be used in the style. This API can also be used for updating an image. If the image for a given imageId was already added, it gets replaced by the new image.
Adds new import to current style, loaded from a JSON string.
Adds new import to current style, loaded from an URI.
Adds a new style layer.
Adds a new style source. Note: When adding a geojson source, this method does not synchronously parse the GeoJSON data. The events API shall be used to make sure the provided GeoJSON data is valid. In case the GeoJSON is valid, a MapLoaded event will be propagated. In case of errors, a MapLoadingError event will be propagated instead.
Returns the available featuresets in the currently loaded style.
Gets the value of a style atmosphere property.
Get the glyph URL of the current style in use.
Get an image from the style.
Gets style import config.
Gets the value of style import config.
Returns the existing style imports.
Gets style import schema.
Gets style layer properties.
Gets the value of style layer property.
Gets the value of the style light property.
Gets added lights to the style.
Gets the value of a style projection property.
Gets the value of a style rain property.
Gets the value of a style snow property.
Gets style source properties.
Gets the value of style source property.
Gets the value of a style terrain property.
Returns the map style's transition options. By default, the style parser will attempt to read the style default transition options, if any, fallback-ing to an immediate transition otherwise. Transition options can be overridden via setStyleTransition, but the options are reset once a new style has been loaded.
Checks whether an image exists.
Checks whether a model exists.
Invalidate region for provided custom geometry source.
Invalidate tile for provided custom geometry source.
Checks if a style layer is persistent.
Check if the style is completely loaded.
Moves import to position before another import, specified with beforeId
. Order of imported styles corresponds to order of their layers.
Moves an existing style layer
Removes an image from the style.
Removes an existing style import.
Removes an existing style layer.
Removes a model from the style.
Removes an existing style source.
Removes an existing style source without checking if it's being used by any other component.
Sets the style global atmosphere properties.
Set tile data of a custom geometry.
Note! This is an experimental feature. It can be changed or removed in future versions.
Set geojson source data. Call may take significant time for parsing and marshalling depending on the data size.
Load the style glyphs from a provided URL.
Sets style layer properties. This method can be used to perform batch update for a style layer properties. The structure of a provided properties value must conform to a format for a corresponding layer type. Modification of a layer id and/or a layer type (https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#type) is not allowed.
Sets lights to the style.
Sets the map's projection. If called with NULL, the map will reset to Mercator.
Experimental. Sets the style global rain properties.
Experimental. Sets the style global snow properties.
Sets a value to a style source property. Note: When setting the "data" property of a geojson source, this method does not synchronously parse the GeoJSON data. The events API shall be used to make sure the provided GeoJSON data is valid. In case the GeoJSON is valid, a MapLoaded event will be propagated. In case of errors, a MapLoadingError event will be propagated instead.
Sets the style global terrain properties.
Overrides the map style's transition options with user-provided options.
Checks whether a given style layer exists.
Checks whether a given style source exists.
Updates the image of an image style source.
Updates an existing import in the style. The function replaces the content of the import, with the content loaded from the provided data value. The configuration values of the import are merged with the configuration provided in the update.
Updates an existing import in the style. The function replaces the content of the import, with the content loaded from the provided URI. The configuration values of the import are merged with the configuration provided in the update.
Properties
Inheritors
Extensions
Extension function to add an image provided by the Style Extension to the Style.
Extension function to add 9-patch image provided by the Style Extension to the Style.
Adds an 9-patch image to be used in the style. X-stretches, Y-stretches and padding will be calculated from Bitmap.getNinePatchChunk.
Extension function to add a Layer provided by the Style Extension to the Style.
Extension function to add a Layer provided by the Style Extension to the Style.
Extension function to add a Layer provided by the Style Extension to the Style.
Extension function to add a Layer provided by the Style Extension to the Style.
Extension function to add a model provided by the Style Extension to the Style.
Add layer to the style persistently.
Extension function to add a Source provided by the Style Extension to the Style.
Extension function to get the atmosphere provided by the Style Extension.
Extension function to get a Layer provided by the Style Extension by layer id.
Tries to cast the Layer to T.
Extension function to get 3D Light that has been applied to the style.
Extension function to get the projection provided by the Style Extension.
Extension function to get the Rain provided by the Style Extension.
Extension function to get the Snow provided by the Style Extension.
Extension function to get a Source provided by the Style Extension by source id.
Tries to cast the Source to T.
Extension function to get the terrain provided by the Style Extension.
Extension function to localize style labels
Removes atmosphere from style if it was set.
Removes rain from style if it was set.
Removes snow from style if it was set.
Removes terrain from style if it was set.
Extension function to set the Atmosphere provided by the Style Extension to the Style.
Extension function to add dynamic light to the Style. dynamic light is built from AmbientLight and DirectionalLight.
Extension function to add the FlatLight to the Style.
Extension function to add list of lights.
Extension function to set the Projection provided by the Style Extension to the Style.
Extension function to set the Rain provided by the Style Extension to the Style.
Extension function to set the Snow provided by the Style Extension to the Style.
Extension function to set the Terrain provided by the Style Extension to the Style.