NonHierarchicalViewBasedAlgorithm

Algorithm that can be used for managing large numbers of items (>1000 markers). This algorithm works the same way as NonHierarchicalDistanceBasedAlgorithm but works, only in visible area. It requires shouldReclusterOnMapMovement to be true in order to re-render clustering when camera movement changes the visible area.

Parameters

<T>

The ClusterItem type

Constructors

Link copied to clipboard
constructor(screenWidth: Int, screenHeight: Int)

Functions

Link copied to clipboard
open fun addItem(item: T): Boolean
Adds an item to the algorithm
Link copied to clipboard
open fun addItems(items: Collection<T>): Boolean
Adds a collection of items to the algorithm
Link copied to clipboard
open fun clearItems()
Link copied to clipboard
open fun getClusters(zoom: Float): Set<out Cluster<T>>
Link copied to clipboard
open fun getItems(): Collection<T>
Link copied to clipboard
open fun lock()
Link copied to clipboard
open fun onCameraChange(cameraPosition: CameraPosition)
Link copied to clipboard
open fun removeItem(item: T): Boolean
Removes an item from the algorithm
Link copied to clipboard
open fun removeItems(items: Collection<T>): Boolean
Removes a collection of items from the algorithm
Link copied to clipboard
Link copied to clipboard
open fun unlock()
Link copied to clipboard
open fun updateItem(item: T): Boolean
Updates the provided item in the algorithm
Link copied to clipboard
open fun updateViewSize(width: Int, height: Int)
Update view width and height in case map size was changed.