StyleManager class
Interface for managing style of the map.
- Available extensions
Constructors
- StyleManager({BinaryMessenger? binaryMessenger})
-
Constructor for StyleManager. The
binaryMessengernamed 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
-
addLayer(
Layer layer) → Future< void> -
Available on StyleManager, provided by the StyleLayer extension
Add a layer the the current style. -
addLayerAt(
Layer layer, LayerPosition position) → Future< void> -
Available on StyleManager, provided by the StyleLayer extension
Add a layer to the current style in a specific position. -
addPersistentStyleLayer(
String arg_properties, LayerPosition? arg_layerPosition) → Future< void> - Adds a new style layer.
-
addSource(
Source source) → Future< void> -
Available on StyleManager, provided by the StyleSource extension
-
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
imageIdwas 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.
-
getLayer(
String layerId) → Future< Layer?> -
Available on StyleManager, provided by the StyleLayer extension
Get a previously added layer from the current style. -
getProjection(
) → Future< String> - Function to get the projection provided by the Style Extension.
-
getSource(
String sourceId) → Future< Source?> -
Available on StyleManager, provided by the StyleSource extension
Get the source with sourceId from the current style. -
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
imagefrom 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.
-
setLight(
Light light) → Future< void> -
Available on StyleManager, provided by the StyleLight extension
-
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
propertiesvalue 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 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
dataproperty of ageojsonsource, this method never returns an error. In case of success, amap-loadedevent will be propagated. In case of errors, amap-loading-errorevent 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
-
updateLayer(
Layer layer) → Future< void> -
Available on StyleManager, provided by the StyleLayer extension
Update an exsiting layer in the style. -
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?>