-
- All Implemented Interfaces:
-
com.google.maps.android.clustering.algo.Algorithm,com.google.maps.android.clustering.algo.ScreenBasedAlgorithm
public class ScreenBasedAlgorithmAdapter<T extends ClusterItem> extends AbstractAlgorithm<T> implements ScreenBasedAlgorithm<T>
-
-
Constructor Summary
Constructors Constructor Description ScreenBasedAlgorithmAdapter(Algorithm<T> algorithm)
-
Method Summary
Modifier and Type Method Description booleanshouldReclusterOnMapMovement()booleanaddItem(T item)Adds an item to the algorithm booleanaddItems(Collection<T> items)Adds a collection of items to the algorithm voidclearItems()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<out Cluster<T>>getClusters(float zoom)Collection<T>getItems()voidsetMaxDistanceBetweenClusteredItems(int maxDistance)intgetMaxDistanceBetweenClusteredItems()voidonCameraChange(CameraPosition cameraPosition)-
Methods inherited from class com.google.maps.android.clustering.algo.AbstractAlgorithm
lock, unlock -
Methods inherited from class com.google.maps.android.clustering.algo.ScreenBasedAlgorithm
onCameraChange -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
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
void 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<out Cluster<T>> getClusters(float zoom)
-
getItems
Collection<T> getItems()
-
setMaxDistanceBetweenClusteredItems
void setMaxDistanceBetweenClusteredItems(int maxDistance)
-
getMaxDistanceBetweenClusteredItems
int getMaxDistanceBetweenClusteredItems()
-
onCameraChange
void onCameraChange(CameraPosition cameraPosition)
-
-
-
-