StyleManager class

Interface for managing style of the map.

Available extensions

Constructors

StyleManager({BinaryMessenger? binaryMessenger})
Constructor for StyleManager. The binaryMessenger named argument is available for dependency injection. If it is left null, the default BinaryMessenger will be used which routes to the host platform.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addPersistentStyleLayer(String arg_properties, LayerPosition? arg_layerPosition) Future<void>
Adds a new style layer.
addStyleImage(String arg_imageId, double arg_scale, MbxImage arg_image, bool arg_sdf, List<ImageStretches?> arg_stretchX, List<ImageStretches?> arg_stretchY, ImageContent? arg_content) Future<void>
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.
addStyleLayer(String arg_properties, LayerPosition? arg_layerPosition) Future<void>
Adds a new style layer.
addStyleSource(String arg_sourceId, String arg_properties) Future<void>
Adds a new style source.
getProjection() Future<String>
Function to get the projection provided by the Style Extension.
getStyleDefaultCamera() Future<CameraOptions>
Returns the map style's default camera, if any, or a default camera otherwise. The map style's default camera is defined as follows:
getStyleImage(String arg_imageId) Future<MbxImage?>
Get an image from the style.
getStyleJSON() Future<String>
Get the JSON serialization string of the current style in use.
getStyleLayerProperties(String arg_layerId) Future<String>
Gets style layer properties.
getStyleLayerProperty(String arg_layerId, String arg_property) Future<StylePropertyValue>
Gets the value of style layer property.
getStyleLayers() Future<List<StyleObjectInfo?>>
Returns the existing style layers.
getStyleLightProperty(String arg_property) Future<StylePropertyValue>
Gets the value of a style light property.
getStyleSourceProperties(String arg_sourceId) Future<String>
Gets style source properties.
getStyleSourceProperty(String arg_sourceId, String arg_property) Future<StylePropertyValue>
Gets the value of style source property.
getStyleSources() Future<List<StyleObjectInfo?>>
Returns the existing style sources.
getStyleTerrainProperty(String arg_property) Future<StylePropertyValue>
Gets the value of a style terrain property.
getStyleTransition() Future<TransitionOptions>
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 overriden via setStyleTransition, but the options are reset once a new style has been loaded.
getStyleURI() Future<String>
Get the URI of the current style in use.
hasStyleImage(String arg_imageId) Future<bool>
Checks whether an image exists.
invalidateStyleCustomGeometrySourceRegion(String arg_sourceId, CoordinateBounds arg_bounds) Future<void>
Invalidate region for provided custom geometry source.
invalidateStyleCustomGeometrySourceTile(String arg_sourceId, CanonicalTileID arg_tileId) Future<void>
Set tile data of a custom geometry.
isStyleLayerPersistent(String arg_layerId) Future<bool>
Checks if a style layer is persistent.
isStyleLoaded() Future<bool>
Check if the style is completely loaded.
localizeLabels(String arg_locale, List<String?>? arg_layerIds) Future<void>
Function to localize style labels.
moveStyleLayer(String arg_layerId, LayerPosition? arg_layerPosition) Future<void>
Moves an existing style layer
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeStyleImage(String arg_imageId) Future<void>
Removes an image from the style.
removeStyleLayer(String arg_layerId) Future<void>
Removes an existing style layer.
removeStyleSource(String arg_sourceId) Future<void>
Removes an existing style source.
setProjection(String arg_projection) Future<void>
Function to set the projection provided by the Style Extension.
setStyleJSON(String arg_json) Future<void>
Load the style from a provided JSON string.
setStyleLayerProperties(String arg_layerId, String arg_properties) Future<void>
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.
setStyleLayerProperty(String arg_layerId, String arg_property, Object arg_value) Future<void>
Sets a value to a style layer property.
setStyleLight(String arg_properties) Future<void>
Sets the style global light properties.
setStyleLightProperty(String arg_property, Object arg_value) Future<void>
Sets a value to the the style light property.
setStyleSourceProperties(String arg_sourceId, String arg_properties) Future<void>
Sets style source properties.
setStyleSourceProperty(String arg_sourceId, String arg_property, Object arg_value) Future<void>
Sets a value to a style source property. Note: When setting the data property of a geojson source, this method never returns an error. In case of success, a map-loaded event will be propagated. In case of errors, a map-loading-error event will be propagated instead.
setStyleTerrain(String arg_properties) Future<void>
Sets the style global terrain properties.
setStyleTerrainProperty(String arg_property, Object arg_value) Future<void>
Sets a value to the the style terrain property.
setStyleTransition(TransitionOptions arg_transitionOptions) Future<void>
Overrides the map style's transition options with user-provided options.
setStyleURI(String arg_uri) Future<void>
Load style from provided URI.
styleLayerExists(String arg_layerId) Future<bool>
Checks whether a given style layer exists.
styleSourceExists(String arg_sourceId) Future<bool>
Checks whether a given style source exists.
toString() String
A string representation of this object.
inherited
updateStyleImageSourceImage(String arg_sourceId, MbxImage arg_image) Future<void>
Updates the image of an image style source.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

codec → const MessageCodec<Object?>