SuperclusterMutable<T> class

Inheritance

Constructors

SuperclusterMutable({required double getX(T), required double getY(T), String generateUuid()?, int? minZoom, int? maxZoom, int? minPoints, int? radius, int? extent, int nodeSize = 16, ClusterDataBase extractClusterData(T point)?})

Properties

extent int
finalinherited
extractClusterData → (ClusterDataBase Function(T point)?)
finalinherited
generateUuid String Function()
latefinal
getX double Function(T)
finalinherited
getY double Function(T)
finalinherited
hashCode int
The hash code for this object.
no setterinherited
maxZoom int
finalinherited
minPoints int
finalinherited
minZoom int
finalinherited
nodeSize int
finalinherited
points List<T>
no setter
radius int
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(T point) → void
Add point to this supercluster. Note that this may cause clusters to be created/changed. If you have multiple points to add this may be slow, you should use addAll instead. Alternatively if you do not need to retain existing points use load which is faster than addAll but clears existing points.
addAll(Iterable<T> points) → void
Add points to this supercluster. This is much faster than add when adding many points but slower than load. If you do not need to retain existing points you should use load instead.
aggregatedClusterData() ClusterDataBase?
override
childrenOf(LayerCluster<T> cluster) List<MutableLayerElement<T>>
Returns the children of the given LayerCluster
override
containsElement(LayerElement<T> element) bool
containsPoint(T point) bool
Returns whether the specified point is in the supercluster's index.
override
getLeaves() Iterable<T>
override
insert(T point) → void
layerPointOf(T point) MutableLayerPoint<T>?
Returns the LayerPoint, if any, which contains the given point.
override
load(List<T> points) → void
Replace any existing points with points and form clusters.
override
modifyPointData(T oldPoint, T newPoint, {bool updateParentClusters = true}) bool
An optimised function for changing a single point's data without changing the position of that point. Returns true if oldPoint is found and replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parentOf(LayerElement<T> element) MutableLayerCluster<T>?
Returns the parent cluster if element has one.
override
remove(T point) bool
Remove point from this supercluster. Returns true if the specified point is found and removed. Note that this may cause clusters to be split/changed. If you have multiple points to remove this may be slow, you should use removeAll instead. Alternatively if you want to remove all points the fastest way is to call load with an empty list.
removeAll(Iterable<T> points) bool
Remove points from this supercluster. This is much faster than remove when removing many points. If you want to remove all points you should call load with an empty list as it is faster.
replacePoints(List<T> newPoints) → void
This method exists for a very specific purpose. If you create a Supercluster index in a separate isolate and your points are Objects dart will create copies of the points rather than sharing them across isolates. This means that when the created index is returned to the root isolate the points are not the same instances as the original ones and will not have the same hashCodes or be equal to their original counterparts unless you have overriden hashCode/==.
override
override
toString() String
A string representation of this object.
inherited
treeAt(int zoom) → MutableLayer<T>

Operators

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