MarkerSpec class

One native marker to publish: its object id, where it goes, what to rasterise and how to anchor it.

id is an object id of the publishing layer (MapLayerState.objectId), so taps are routed back to it. iconKey identifies the bitmap of child at size: markers sharing it share one rasterised icon. alignment follows flutter_map's Marker.alignment; rotate true keeps the icon upright when the map rotates. zIndex is added to the layer's z-index; keep it in [0, 1) so the marker stays below the next layer's. tappable false lets taps on the marker through to the map (MapOptions.onTap, the shapes' hit notifiers), as a flutter_map marker without a gesture detector. nativeParams carries the native-only settings (rotation, opacity, drag, info window...); its callbacks are called for this marker's native events.

child is rasterised with the map's themes, text scale and brightness: when they change, every icon is rasterised again. Anything else the bitmap depends on must be part of iconKey.

Annotations

Constructors

MarkerSpec({required String id, required LatLng position, required Object iconKey, required Widget child, required Size size, Alignment alignment = Alignment.center, bool rotate = false, double zIndex = 0, bool tappable = true, NativeMarkerParams? nativeParams})
const

Properties

alignment → Alignment
final
child → Widget
final
hashCode → int
The hash code for this object.
no setterinherited
iconKey → Object
final
id → String
final
nativeParams → NativeMarkerParams?
final
position → LatLng
final
rotate → bool
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → Size
final
tappable → bool
final
zIndex → double
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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