StyleManager class
Interface for managing style of the map
.
- Available extensions
Constructors
- StyleManager({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
-
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 properties, LayerPosition? layerPosition) → Future< void> - Adds a new style layer.
-
addStyleImage(
String imageId, double scale, MbxImage image, bool sdf, List< ImageStretches?> stretchX, List<ImageStretches?> stretchY, ImageContent? 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 properties, LayerPosition? layerPosition) → Future< void> - Adds a new style layer.
-
addStyleModel(
String modelId, String modelUri) → Future< void> -
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. -
addStyleSource(
String sourceId, String properties) → Future< void> - Adds a new style source.
-
getProjection(
) → Future< StyleProjection?> - 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 imageId) → Future< MbxImage?> -
Get an
image
from the style. -
getStyleImportConfigProperties(
String importId) → Future< Map< String?, StylePropertyValue?> > - Gets style import config.
-
getStyleImportConfigProperty(
String importId, String config) → Future< StylePropertyValue> - Gets the value of style import config.
-
getStyleImports(
) → Future< List< StyleObjectInfo?> > - Returns the list containing information about existing style import objects.
-
getStyleImportSchema(
String importId) → Future< Object> - Gets the style import schema.
-
getStyleJSON(
) → Future< String> - Get the JSON serialization string of the current style in use.
-
getStyleLayerProperties(
String layerId) → Future< String> - Gets style layer properties.
-
getStyleLayerProperty(
String layerId, String property) → Future< StylePropertyValue> - Gets the value of style layer property.
-
getStyleLayers(
) → Future< List< StyleObjectInfo?> > - Returns the existing style layers.
-
getStyleLightProperty(
String id, String property) → Future< StylePropertyValue> - Gets the value of a style light property.
-
getStyleLights(
) → Future< List< StyleObjectInfo?> > - Returns an ordered list of the current style lights.
-
getStyleSourceProperties(
String sourceId) → Future< String> - Gets style source properties.
-
getStyleSourceProperty(
String sourceId, String property) → Future< StylePropertyValue> - Gets the value of style source property.
-
getStyleSources(
) → Future< List< StyleObjectInfo?> > - Returns the existing style sources.
-
getStyleTerrainProperty(
String 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 imageId) → Future< bool> - Checks whether an image exists.
-
invalidateStyleCustomGeometrySourceRegion(
String sourceId, CoordinateBounds bounds) → Future< void> - Invalidate region for provided custom geometry source.
-
invalidateStyleCustomGeometrySourceTile(
String sourceId, CanonicalTileID tileId) → Future< void> - Set tile data of a custom geometry.
-
isStyleLayerPersistent(
String layerId) → Future< bool> - Checks if a style layer is persistent.
-
isStyleLoaded(
) → Future< bool> - Check if the style is completely loaded.
-
localizeLabels(
String locale, List< String?> ? layerIds) → Future<void> - Function to localize style labels.
-
moveStyleLayer(
String layerId, LayerPosition? layerPosition) → Future< void> - Moves an existing style layer
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeStyleImage(
String imageId) → Future< void> - Removes an image from the style.
-
removeStyleImport(
String importId) → Future< void> - Removes an existing style import.
-
removeStyleLayer(
String layerId) → Future< void> - Removes an existing style layer.
-
removeStyleModel(
String modelId) → Future< void> - Removes a model from the style.
-
removeStyleSource(
String sourceId) → Future< void> - Removes an existing style source.
-
setLight(
FlatLight flatLight) → Future< void> - Set global directional lightning.
-
setLights(
AmbientLight ambientLight, DirectionalLight directionalLight) → Future< void> - Set dynamic lightning.
-
setProjection(
StyleProjection projection) → Future< void> - Function to set the projection provided by the Style Extension.
-
setStyleImportConfigProperties(
String importId, Map< String?, Object?> configs) → Future<void> - Sets style import config. This method can be used to perform batch update for a style import configurations.
-
setStyleImportConfigProperty(
String importId, String config, Object value) → Future< void> - Sets a value to a style import config.
-
setStyleJSON(
String json) → Future< void> - Load the style from a provided JSON string.
-
setStyleLayerProperties(
String layerId, String 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 alayer type
(https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#type) is not allowed. -
setStyleLayerProperty(
String layerId, String property, Object value) → Future< void> - Sets a value to a style layer property.
-
setStyleLightProperty(
String id, String property, Object value) → Future< void> - Sets a value to the the style light property.
-
setStyleSourceProperties(
String sourceId, String properties) → Future< void> - Sets style source properties.
-
setStyleSourceProperty(
String sourceId, String property, Object value) → Future< void> -
Sets a value to a style source property.
Note: When setting the
data
property of ageojson
source, this method never returns an error. In case of success, amap-loaded
event will be propagated. In case of errors, amap-loading-error
event will be propagated instead. -
setStyleTerrain(
String properties) → Future< void> - Sets the style global terrain properties.
-
setStyleTerrainProperty(
String property, Object value) → Future< void> - Sets a value to the the style terrain property.
-
setStyleTransition(
TransitionOptions transitionOptions) → Future< void> - Overrides the map style's transition options with user-provided options.
-
setStyleURI(
String uri) → Future< void> - Load style from provided URI.
-
styleLayerExists(
String layerId) → Future< bool> - Checks whether a given style layer exists.
-
styleSourceExists(
String sourceId) → Future< bool> - Checks whether a given style source exists.
-
toString(
) → String -
A string representation of this object.
inherited
-
updateStyleImageSourceImage(
String sourceId, MbxImage image) → Future< void> - Updates the image of an image style source.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
pigeonChannelCodec
→ const MessageCodec<
Object?>