MarkerController<T, O> class abstract

The MarkerController class wraps a gmaps.AdvancedMarkerElement or gmaps.Marker, how it handles events, and its associated (optional) gmaps.InfoWindow widget.

Type parameters:

  • T - The marker type (e.g., gmaps.Marker or gmaps.AdvancedMarkerElement)
  • O - The options type used to configure the marker (e.g., gmaps.MarkerOptions or gmaps.AdvancedMarkerElementOptions)
Implementers

Constructors

MarkerController({required T marker, InfoWindow? infoWindow, bool consumeTapEvents = false, LatLngCallback? onDragStart, LatLngCallback? onDrag, LatLngCallback? onDragEnd, VoidCallback? onTap, ClusterManagerId? clusterManagerId})
Creates a MarkerController, which wraps a gmaps.AdvancedMarkerElement or gmaps.Marker object, its onTap/onDrag behavior, and its associated gmaps.InfoWindow.

Properties

clusterManagerId → ClusterManagerId?
Returns ClusterManagerId if marker belongs to cluster.
no setter
consumeTapEvents bool
Returns true if this Controller will use its own onTap handler to consume events.
no setter
hashCode int
The hash code for this object.
no setterinherited
infoWindow → InfoWindow?
Returns the gmaps.InfoWindow associated to the marker.
no setter
infoWindowShown bool
Returns true if the gmaps.InfoWindow associated to this marker is being shown.
no setter
marker → T?
Returns the marker associated to this controller.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addMarkerListener({required T marker, required LatLngCallback? onDragStart, required LatLngCallback? onDrag, required LatLngCallback? onDragEnd, required VoidCallback? onTap}) → void
Initializes the listener for the wrapped marker object.
hideInfoWindow() → void
Hide the associated gmaps.InfoWindow.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() → void
Disposes of the currently wrapped marker object.
setMap(Map map) → void
Sets the map of the wrapped marker object.
showInfoWindow() → void
Show the associated gmaps.InfoWindow.
toString() String
A string representation of this object.
inherited
update(O options, {HTMLElement? newInfoWindowContent}) → void
Updates the options of the wrapped marker object.

Operators

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