-
- All Implemented Interfaces:
-
com.google.maps.android.clustering.algo.Algorithm,com.google.maps.android.clustering.algo.ScreenBasedAlgorithm
public final class ScreenBasedAlgorithmAdapter<T extends ClusterItem> extends AbstractAlgorithm<T> implements ScreenBasedAlgorithm<T>
-
-
Field Summary
Fields Modifier and Type Field Description private final Collection<T>itemsprivate IntegermaxDistanceBetweenClusteredItems
-
Constructor Summary
Constructors Constructor Description ScreenBasedAlgorithmAdapter(Algorithm<T> algorithm)
-
Method Summary
Modifier and Type Method Description Collection<T>getItems()IntegergetMaxDistanceBetweenClusteredItems()UnitsetMaxDistanceBetweenClusteredItems(Integer maxDistanceBetweenClusteredItems)BooleanshouldReclusterOnMapMovement()BooleanaddItem(T item)Adds an item to the algorithm BooleanaddItems(Collection<T> items)Adds a collection of items to the algorithm UnitclearItems()BooleanremoveItem(T item)Removes an item from the algorithm BooleanremoveItems(Collection<T> items)Removes a collection of items from the algorithm BooleanupdateItem(T item)Updates the provided item in the algorithm Set<Cluster<T>>getClusters(Float zoom)UnitonCameraChange(CameraPosition position)-
-
Method Detail
-
getItems
Collection<T> getItems()
-
getMaxDistanceBetweenClusteredItems
Integer getMaxDistanceBetweenClusteredItems()
-
setMaxDistanceBetweenClusteredItems
Unit setMaxDistanceBetweenClusteredItems(Integer maxDistanceBetweenClusteredItems)
-
shouldReclusterOnMapMovement
Boolean shouldReclusterOnMapMovement()
-
addItem
Boolean addItem(T item)
Adds an item to the algorithm
- Parameters:
item- the item to be added
-
addItems
Boolean addItems(Collection<T> items)
Adds a collection of items to the algorithm
- Parameters:
items- the items to be added
-
clearItems
Unit clearItems()
-
removeItem
Boolean removeItem(T item)
Removes an item from the algorithm
- Parameters:
item- the item to be removed
-
removeItems
Boolean removeItems(Collection<T> items)
Removes a collection of items from the algorithm
- Parameters:
items- the items to be removed
-
updateItem
Boolean updateItem(T item)
Updates the provided item in the algorithm
- Parameters:
item- the item to be updated
-
getClusters
Set<Cluster<T>> getClusters(Float zoom)
-
onCameraChange
Unit onCameraChange(CameraPosition position)
-
-
-
-