public class BasicClusterGenerator extends ClusterGenerator
This cluster generator will make images for grouped clusters of markers/labels.
baseController
Constructor and Description |
---|
BasicClusterGenerator(android.graphics.Bitmap bitmap,
int clusterNumber,
Point2d markerSize,
float textSize,
BaseController viewC,
android.app.Activity activity) |
BasicClusterGenerator(int[] colors,
int clusterNumber,
Point2d markerSize,
BaseController viewC,
android.app.Activity activity)
Initialize with a list of colors.
|
Modifier and Type | Method and Description |
---|---|
Point2d |
clusterLayoutSize()
The size of the cluster that will be created.
|
int |
clusterNumber()
The Cluster number is referenced by screen markers.
|
void |
endClusterGroup()
Called at the end of clustering.
|
ClusterGroup |
makeClusterGroup(ClusterInfo clusterInfo)
Generate a cluster group for a given collection of markers.
|
double |
markerAnimationTime()
How long to animate markers the join and leave a cluster
|
boolean |
selectable()
Set this if you want cluster to be user selectable.
|
void |
shutdown() |
void |
startClusterGroup()
Called at the start of clustering.
|
makeClusterGroupJNI
public BasicClusterGenerator(int[] colors, int clusterNumber, Point2d markerSize, BaseController viewC, android.app.Activity activity)
Each order of magnitude will use another color. Must provide at least 1.
public BasicClusterGenerator(android.graphics.Bitmap bitmap, int clusterNumber, Point2d markerSize, float textSize, BaseController viewC, android.app.Activity activity)
public void shutdown()
public void startClusterGroup()
ClusterGenerator
Called right before we start generating clusters. Do you setup here if need be.
startClusterGroup
in class ClusterGenerator
public ClusterGroup makeClusterGroup(ClusterInfo clusterInfo)
ClusterGenerator
Generate an image and size to represent the number of marker/labels we're consolidating.
makeClusterGroup
in class ClusterGenerator
public void endClusterGroup()
ClusterGenerator
If you were doing optimization (for image reuse, say) clean it up here.
endClusterGroup
in class ClusterGenerator
public int clusterNumber()
ClusterGenerator
clusterNumber
in class ClusterGenerator
public Point2d clusterLayoutSize()
ClusterGenerator
This is the biggest cluster you're likely to create. We use it to figure overlaps between clusters.
clusterLayoutSize
in class ClusterGenerator
public boolean selectable()
ClusterGenerator
selectable
in class ClusterGenerator
public double markerAnimationTime()
ClusterGenerator
markerAnimationTime
in class ClusterGenerator