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.Markerorgmaps.AdvancedMarkerElement)O- The options type used to configure the marker (e.g.,gmaps.MarkerOptionsorgmaps.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 agmaps.AdvancedMarkerElementorgmaps.Markerobject, itsonTap/onDragbehavior, and its associatedgmaps.InfoWindow.
Properties
- clusterManagerId → ClusterManagerId?
-
Returns
ClusterManagerIdif marker belongs to cluster.no setter - consumeTapEvents → bool
-
Returns
trueif this Controller will use its ownonTaphandler to consume events.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- infoWindow → InfoWindow?
-
Returns the
gmaps.InfoWindowassociated to the marker.no setter - infoWindowShown → bool
-
Returns
trueif thegmaps.InfoWindowassociated 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