MarkersController<T extends Object, O> class
abstract
This class manages a set of MarkerControllers associated to a GoogleMapController.
- LegacyMarkersController implements the MarkersController for the
legacy
gmaps.Markerclass. - AdvancedMarkersController implements the MarkersController for the
advanced
gmaps.AdvancedMarkerElementclass.
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)
T must extend JSObject. It's not specified in code because our mocking
framework does not support mocking JSObjects.
- Implementers
Constructors
-
MarkersController({required StreamController<
MapEvent< stream, required ClusterManagersController<Object?> >T> clusterManagersController}) - Initialize the cache. The StreamController comes from the GoogleMapController, and is shared with other controllers.
Properties
- googleMap ↔ Map
-
The GMap instance that this controller operates on.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- mapId ↔ int
-
The map ID for events.
getter/setter pairinherited
-
markers
→ Map<
MarkerId, MarkerController< T, O> > -
Returns the cache of MarkerControllers. Test only.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addMarkers(
Set< Marker> markersToAdd) → Future<void> -
Adds a set of
Markerobjects to the cache. -
bindToMap(
int mapId, Map googleMap) → void -
Binds a
mapIdand thegmaps.Mapinstance to this controller.inherited -
changeMarkers(
Set< Marker> markersToChange) → Future<void> -
Updates a set of
Markerobjects with new options. -
createMarkerController(
Marker marker, O markerOptions, InfoWindow? gmInfoWindow) → Future< MarkerController< T, O> > -
Creates a MarkerController for the given
marker. -
hideMarkerInfoWindow(
MarkerId markerId) → void -
Hides the
InfoWindowof aMarkerId. -
isInfoWindowShown(
MarkerId markerId) → bool -
Returns whether or not the
InfoWindowof aMarkerIdis shown. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeMarkers(
Set< MarkerId> markerIdsToRemove) → void -
Removes a set of
MarkerIds from the cache. -
showMarkerInfoWindow(
MarkerId markerId) → void -
Shows the
InfoWindowof aMarkerId. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited