StyleController class abstract interface Basic

The StyleController can be used to manipulate the style of a MapLibreMap. It can be accessed via MapController.style.

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

addImage(String id, Uint8List bytes) Future<void>
Add an image to the map.
addImages(Map<String, Uint8List> images) Future<void>
Add multiple images to the map in a single batch operation. This is significantly faster than calling addImage multiple times.
addLayer(StyleLayer layer, {String? belowLayerId}) Future<void>
Add a new layer to the map. The source must be added before adding it to the map.
addSource(Source source) Future<void>
Add a new source to the map.
addSprite(String spriteJson, Uint8List spriteImage) Future<void>
Load a sprite sheet and add all icons natively. This is the fastest method - all extraction happens in native code.
dispose() → void
Clean up resources.
getAttributions() Future<List<String>>
Get a list of all attributions from the map style.
getAttributionsSync() List<String>
Get a list of all attributions from the map style.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeImage(String id) Future<void>
Removes an image from the map
removeLayer(String id) Future<void>
Removes the layer with the given ID from the map's style.
removeSource(String id) Future<void>
Removes the source with the given ID from the map's style.
setProjection(MapProjection projection) → void
Set the map projection.
toString() String
A string representation of this object.
inherited
updateGeoJsonSource({required String id, required String data}) Future<void>
Update the data of a GeoJSON source.

Operators

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