Supercluster<T> class abstract

Implementers

Constructors

Supercluster({required double getX(T), required double getY(T), required int nodeSize, int? minZoom, int? maxZoom, int? minPoints, int? radius, int? extent, ClusterDataBase extractClusterData(T point)?})

Properties

extent int
final
extractClusterData → (ClusterDataBase Function(T point)?)
final
getX double Function(T)
final
getY double Function(T)
final
hashCode int
The hash code for this object.
no setterinherited
maxZoom int
final
minPoints int
final
minZoom int
final
nodeSize int
final
radius int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

aggregatedClusterData() ClusterDataBase?
childrenOf(LayerCluster<T> cluster) List<LayerElement<T>>
Returns the children of the given LayerCluster
containsPoint(T point) bool
Returns whether the specified point is in the supercluster's index.
getLeaves() Iterable<T>
layerPointOf(T point) LayerPoint<T>?
Returns the LayerPoint, if any, which contains the given point.
load(List<T> points) → void
Remove any existing points and replace them with points. This will recreate the index completely and may take some time. If you want to add/remove points in an efficient manner you should use SuperclusterImmutable and call add/remove/modifyPointData.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parentOf(LayerElement<T> element) LayerCluster<T>?
Returns the parent cluster if element has one.
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/==.
toString() String
A string representation of this object.
inherited

Operators

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