SuperclusterImmutable<T> class
- Inheritance
-
- Object
- Supercluster<
T> - SuperclusterImmutable
Constructors
- SuperclusterImmutable({required double getX(T), required double getY(T), int? minZoom, int? maxZoom, int? minPoints, int? radius, int? extent, int nodeSize = 64, ClusterDataBase extractClusterData(T point)?})
Properties
- extent → int
-
finalinherited
- extractClusterData → (ClusterDataBase Function(T point)?)
-
finalinherited
- getX → double Function(T)
-
finalinherited
- getY → double Function(T)
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- length → int
-
no setter
- maxZoom → int
-
finalinherited
- minPoints → int
-
finalinherited
- minZoom → int
-
finalinherited
- nodeSize → int
-
finalinherited
- radius → int
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
aggregatedClusterData(
) → ClusterDataBase? -
override
-
childrenOf(
LayerCluster< T> cluster) → List<ImmutableLayerElement< T> > -
Returns the children of the given LayerCluster
override
-
childrenOfById(
int clusterId) → List< ImmutableLayerElement< T> > -
containsPoint(
T point) → bool -
Returns whether the specified point is in the supercluster's index.
override
-
expansionZoomOf(
int clusterId) → int -
getLeaves(
) → Iterable< T> -
override
-
getOriginZoom(
int clusterId) → int - Returns the zoom level at which the cluster with the given id appears
-
layerPointOf(
T point) → ImmutableLayerPoint< T> ? -
Returns the LayerPoint, if any, which contains the given
point
.override -
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.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parentOf(
LayerElement< T> element) → ImmutableLayerCluster<T> ? -
Returns the parent cluster if
element
has one.override -
pointsWithin(
int clusterId, {int limit = 10, int offset = 0}) → List< ImmutableLayerPoint< T> > -
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
-
search(
double westLng, double southLat, double eastLng, double northLat, int zoom) → List< ImmutableLayerElement< T> > -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited