MarkerSketches class Maps & 3D Scenes

A specialized, per-marker render configuration collection.

MarkerSketches extends MarkerCollection and allows per-marker render presets so each sketch can have a distinct visual style. These collections are singletons (one per MarkerType) and should be obtained using MapViewMarkerCollections.getSketches.

Typical use cases include temporary annotations, user-drawn markers, or per-item styling when a global MarkerCollectionRenderSettings is not sufficient.

Example:

final MarkerSketches sketches = controller.preferences.markers.getSketches(MarkerType.point);
final Marker marker = Marker()..add(Coordinates(latitude: 39.76741, longitude: -46.8962));
marker.name = 'HelloMarker';

sketches.addMarker(marker, settings: MarkerRenderSettings(labelTextSize: 3.0));

See also:

Inheritance

Properties

area RectangleGeographicArea
The geographic bounding rectangle that encloses all markers in the collection.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id int
The unique identifier assigned to this collection.
no setterinherited
mapId int
no setterinherited
name String
The collection's human-readable name.
getter/setter pairinherited
pointerId int
The pointer ID of the native object
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
Number of markers contained in this collection.
no setterinherited
type MarkerType
The MarkerType of markers stored in this collection.
no setterinherited

Methods

add(Marker marker, {int index = -1}) → void
Add a marker to this collection.
inherited
addMarker(Marker marker, {MarkerRenderSettings? settings, int index = -1}) → void
Add a new sketch with optional per-marker render settings.
clear() → void
Remove all markers from this collection.
inherited
delete(int index) → void
Remove the marker at index from this collection.
inherited
dispose() → void
Disposes the native object.
inherited
getMarkerAt(int index) Marker?
Retrieve the marker at index.
inherited
getMarkerById(int id) Marker?
Find a marker in the collection by its unique id.
inherited
getPointsGroupComponents(int groupId) List<Marker>
Return the components (members) of a points group identified by groupId.
inherited
getPointsGroupHead(int markerId) Marker?
Get the head marker for the points group that contains markerId.
inherited
getRenderSettings(int index) MarkerRenderSettings
Retrieve the render settings for the sketch at index.
hitTest(Coordinates coordinates, {Marker? ignoreMarker}) List<MarkerMatch>
Perform a hit test against all markers in this collection.
inherited
indexOf(Marker marker) int
Return the index of marker in this collection.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerAutoReleaseObject(int pointerId) → void
Registers an object for auto release.
inherited
save() Uint8List?
Serialize this collection to a binary buffer.
inherited
setRenderSettings(int index, MarkerRenderSettings settings) → void
Update the render settings for a sketch at index.
toString() String
A string representation of this object.
inherited

Operators

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