T
- public class NonHierarchicalViewBasedAlgorithm<T extends ClusterItem> extends NonHierarchicalDistanceBasedAlgorithm<T> implements ScreenBasedAlgorithm<T>
NonHierarchicalDistanceBasedAlgorithm
but works, only in
visible area. It requires to be reclustered on camera movement because clustering is done only for visible area.NonHierarchicalDistanceBasedAlgorithm.QuadItem<T extends ClusterItem>
Constructor and Description |
---|
NonHierarchicalViewBasedAlgorithm(int screenWidth,
int screenHeight) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Collection<NonHierarchicalDistanceBasedAlgorithm.QuadItem<T>> |
getClusteringItems(PointQuadTree<NonHierarchicalDistanceBasedAlgorithm.QuadItem<T>> quadTree,
float zoom) |
void |
onCameraChange(CameraPosition cameraPosition) |
boolean |
shouldReclusterOnMapMovement() |
void |
updateViewSize(int width,
int height)
Update view width and height in case map size was changed.
|
addItem, addItems, clearItems, getClusters, getItems, getMaxDistanceBetweenClusteredItems, removeItem, removeItems, setMaxDistanceBetweenClusteredItems, updateItem
lock, unlock
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addItem, addItems, clearItems, getClusters, getItems, getMaxDistanceBetweenClusteredItems, lock, removeItem, removeItems, setMaxDistanceBetweenClusteredItems, unlock, updateItem
public NonHierarchicalViewBasedAlgorithm(int screenWidth, int screenHeight)
public void onCameraChange(CameraPosition cameraPosition)
onCameraChange
in interface ScreenBasedAlgorithm<T extends ClusterItem>
protected java.util.Collection<NonHierarchicalDistanceBasedAlgorithm.QuadItem<T>> getClusteringItems(PointQuadTree<NonHierarchicalDistanceBasedAlgorithm.QuadItem<T>> quadTree, float zoom)
getClusteringItems
in class NonHierarchicalDistanceBasedAlgorithm<T extends ClusterItem>
public boolean shouldReclusterOnMapMovement()
shouldReclusterOnMapMovement
in interface ScreenBasedAlgorithm<T extends ClusterItem>
public void updateViewSize(int width, int height)
width
- map widthheight
- map height