AdvancedMarker class

Marks a geographical location on the map.

Extends Marker and provides additional features.

Inheritance
Annotations

Constructors

AdvancedMarker({required MarkerId markerId, double alpha = 1.0, Offset anchor = const Offset(0.5, 1.0), bool consumeTapEvents = false, bool draggable = false, bool flat = false, BitmapDescriptor icon = BitmapDescriptor.defaultMarker, InfoWindow infoWindow = InfoWindow.noText, LatLng position = const LatLng(0.0, 0.0), double rotation = 0.0, bool visible = true, ClusterManagerId? clusterManagerId, VoidCallback? onTap, ValueChanged<LatLng>? onDrag, ValueChanged<LatLng>? onDragStart, ValueChanged<LatLng>? onDragEnd, int zIndex = 0, MarkerCollisionBehavior collisionBehavior = MarkerCollisionBehavior.requiredDisplay})
Creates a set of marker configuration options.

Properties

alpha double
The opacity of the marker, between 0.0 and 1.0 inclusive.
finalinherited
anchor Offset
The icon image point that will be placed at the position of the marker.
finalinherited
clusterManagerId ClusterManagerId?
Marker clustering is managed by ClusterManager with clusterManagerId.
finalinherited
collisionBehavior MarkerCollisionBehavior
Indicates how the marker behaves when it collides with other markers.
final
consumeTapEvents bool
True if the marker icon consumes tap events. If not, the map will perform default tap handling by centering the map on the marker and displaying its info window.
finalinherited
draggable bool
True if the marker is draggable by user touch events.
finalinherited
flat bool
True if the marker is rendered flatly against the surface of the Earth, so that it will rotate and tilt along with map camera movements.
finalinherited
hashCode int
The hash code for this object.
no setteroverride
icon BitmapDescriptor
A description of the bitmap used to draw the marker icon.
finalinherited
infoWindow InfoWindow
A Google Maps InfoWindow.
finalinherited
mapsId MarkerId
A identifier for this object.
no setterinherited
markerId MarkerId
Uniquely identifies a Marker.
finalinherited
onDrag ValueChanged<LatLng>?
Signature reporting the new LatLng during the drag event.
finalinherited
onDragEnd ValueChanged<LatLng>?
Signature reporting the new LatLng at the end of a drag event.
finalinherited
onDragStart ValueChanged<LatLng>?
Signature reporting the new LatLng at the start of a drag event.
finalinherited
onTap VoidCallback?
Callbacks to receive tap events for markers placed on this map.
finalinherited
position LatLng
Geographical location of the marker.
finalinherited
rotation double
Rotation of the marker image in degrees clockwise from the anchor point.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
visible bool
True if the marker is visible.
finalinherited
zIndex double
The z-index of the marker, used to determine relative drawing order of map overlays.
no setterinherited
zIndexInt int
The z-index of the marker, used to determine relative drawing order of map overlays.
no setterinherited

Methods

clone() Marker
Creates a new Marker object whose values are the same as this instance.
inherited
copyWith({double? alphaParam, Offset? anchorParam, bool? consumeTapEventsParam, bool? draggableParam, bool? flatParam, BitmapDescriptor? iconParam, InfoWindow? infoWindowParam, LatLng? positionParam, double? rotationParam, bool? visibleParam, double? zIndexParam, int? zIndexIntParam, VoidCallback? onTapParam, ValueChanged<LatLng>? onDragStartParam, ValueChanged<LatLng>? onDragParam, ValueChanged<LatLng>? onDragEndParam, ClusterManagerId? clusterManagerIdParam, MarkerCollisionBehavior? collisionBehaviorParam, double? altitudeParam}) AdvancedMarker
Creates a new AdvancedMarker object whose values are the same as this instance, unless overwritten by the specified parameters.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Object
Converts this object to something serializable in JSON.
override
toString() String
A string representation of this object.
override

Operators

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