DefaultMarkerClusterDatastore<T> class

A MarkerDatastore that clusters markers to avoid cluttering the map.

This datastore wraps another MarkerDatastore and groups nearby markers into a single ClusterMarker when they are too close to each other at the current zoom level.

Inheritance

Constructors

DefaultMarkerClusterDatastore({required MarkerDatastore<T> markerDatastore, int clusterDistance = 50})
Creates a new DefaultMarkerClusterDatastore.

Properties

disposed bool
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addMarker(Marker marker) → void
Adds a single marker to the datastore.
override
addMarkers(Iterable<Marker> markers) → void
Adds multiple markers to the datastore in a batch operation.
override
askChangeBoundingBox(int zoomlevel, BoundingBox boundingBox) → void
Called when the map view moves to a new area at the same zoom level.
override
askChangeZoomlevel(int zoomlevel, BoundingBox boundingBox, PixelProjection projection) → void
Called when the map zoom level changes.
override
askRetrieveMarkersToPaint() Iterable<Marker>
Returns the markers that should be rendered on the current screen.
override
clearMarkers() → void
Removes all markers from the datastore.
override
dispose() → void
Disposes of the datastore and releases any held resources.
override
getTappedMarkers(TapEvent event) List<Marker>
Returns markers that intersect with the given tap event area.
override
markerChanged(Marker marker) → void
Notifies the datastore that a marker's properties have changed.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeMarker(Marker marker) → void
Removes a specific marker from the datastore.
override
requestRepaint() → void
Requests a repaint of the marker overlay.
inherited
toString() String
A string representation of this object.
inherited

Operators

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