Routo 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 getStyle(onStyleLoaded) method on MapboxMap.
Note: Similar to a View object, a Style should only be read and modified from the main thread.
Types
A convenience object to access the style ID strings of the professionally-designed map styles made by Mapbox.
Callback to be invoked when a style has finished loading.
Functions
Add features to the GeoJSON source. Call may take significant time for parsing and marshalling depending on the data size. Direct method use is not recommended, consider using GeoJsonSource.addGeoJSONSourceFeatures instead.
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.fetchTileFunction 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 id was already added, it gets replaced by the new image.
Adds a new style layer.
Adds a model to be used in the style. This API can also be used for updating a model. If the model for a given modelId
was already added, it gets replaced by the new model.
Adds a new style source.
Gets the value of a style atmosphere property.
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 style source parameters. In order to convert returned value to a json string please take a look at Value.toJson.
Gets the value of style source property.
Get 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, fallbacking 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.
Note! This is an experimental feature. It can be changed or removed in future versions.
Note! This is an experimental feature. It can be changed or removed in future versions.
Checks if a style layer is persistent.
Check if the style is completely loaded.
Moves an existing style layer.
Remove features from the GeoJSON source. Call may take significant time for parsing and marshalling depending on the data size. Direct method use is not recommended, consider using GeoJsonSource.removeGeoJSONSourceFeatures instead.
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.
Sets the style global atmosphere properties.
Sets a value to the the style atmosphere property.
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. Direct method use is not recommended, consider using GeoJsonSource.geometry, GeoJsonSource.feature, GeoJsonSource.featureCollection, GeoJsonSource.data, GeoJsonSource.url instead.
Sets style import config. This method can be used to perform batch update for a style import configurations.
Sets a value to a style import config.
Sets style layer metadata.
Sets a value to a style layer property.
Sets a value to the light property.
Sets lights to the style.
Sets the map's projection. If called with null
, the map will reset to Mercator.
Sets a value to the the style projection property.
Sets style source parameters. This method can be used to perform batch update for a style source parameters. The structure of a provided parameters
value must conform to Style Specification - Sources format for a corresponding source type. Modification of a source type https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/#type is not allowed.
Sets a value to a style source property.
Sets the style global terrain source properties.
Sets the value of a style terrain property.
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.
Update features in the GeoJSON source. Call may take significant time for parsing and marshalling depending on the data size. Direct method use is not recommended, consider using GeoJsonSource.updateGeoJSONSourceFeatures instead.
Updates the image of an image style source.