Marker class

Defines an icon placed at a specified position on a map.

Annotations

Constructors

Marker({required MarkerId markerId, required LatLng position, InfoWindow infoWindow = InfoWindow.noText, Offset anchor = const Offset(0.5, 1.0), bool draggable = false, bool flat = false, BitmapDescriptor icon = BitmapDescriptor.defaultMarker, double rotation = 0.0, double alpha = 1.0, bool visible = true, double zIndex = 0.0, bool clickable = false, bool clusterable = false, VoidCallback? onClick, ValueChanged<LatLng>? onDragEnd, ValueChanged<LatLng>? onDragStart, ValueChanged<LatLng>? onDrag, List animationSet = const <dynamic>[]})
Creates a Marker object.
const

Properties

alpha double
Opacity.
final
anchor Offset
Anchor point of a marker.
final
animationSet List
Animations.
final
clickable bool
Indicates whether a marker can be tapped.
final
clusterable bool
Indicates whether a marker is clusterable or not.
final
draggable bool
Indicates whether a marker can be dragged.
final
flat bool
Indicates whether to flatly attach a marker to the map.
final
hashCode int
The hash code for this object.
no setteroverride
icon BitmapDescriptor
Marker icon to render.
final
infoWindow InfoWindow
Information window of a marker.
final
markerId MarkerId
Unique marker ID.
final
onClick VoidCallback?
Callback method executed when a marker is tapped.
final
onDrag ValueChanged<LatLng>?
Callback method executed while marker is dragging.
final
onDragEnd ValueChanged<LatLng>?
Callback method executed when marker dragging is finished.
final
onDragStart ValueChanged<LatLng>?
Callback method executed when marker dragging is started.
final
position LatLng
Position of a marker.
final
rotation double
Rotation angle of a marker, in degrees.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
visible bool
Indicates whether a marker is visible.
final
zIndex double
Z-index of a marker.
final

Methods

clone() Marker
Clones a Marker object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateCopy({LatLng? position, InfoWindow? infoWindow, Offset? anchor, bool? draggable, bool? flat, BitmapDescriptor? icon, double? rotation, double? alpha, bool? visible, double? zIndex, bool? clickable, bool? clusterable, VoidCallback? onClick, ValueChanged<LatLng>? onDragEnd, ValueChanged<LatLng>? onDragStart, ValueChanged<LatLng>? onDrag, List? animations}) Marker
Copies a Marker object and updates the specified attributes.

Operators

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