public class ClusterMarkerRenderer extends MarkerRenderer
| Modifier and Type | Class and Description |
|---|---|
static class |
ClusterMarkerRenderer.ClusterStyle
Class to wrap the cluster icon style properties
|
| Modifier and Type | Field and Description |
|---|---|
protected static int |
CLUSTER_MAXSIZE
Max number to display inside a cluster icon
|
protected static int |
MAP_MARKER_CLUSTER_SIZE_DP
Map Cluster Icon Size.
|
protected static Bitmap[] |
mClusterBitmaps
cached bitmaps database, we will cache cluster bitmaps from 1 to MAX_SIZE
and always use same bitmap for efficiency
|
protected int |
mStyleBackground |
protected int |
mStyleForeground |
mBox, mDefaultMarker, mItems, mMapPoint, mMarkerLayer, mSymbolLayer, mUpdatebuckets, log, mFlipOnDateLine, mInitialized, mMapPosition| Constructor and Description |
|---|
ClusterMarkerRenderer(MarkerLayer<MarkerInterface> markerLayer,
MarkerSymbol defaultSymbol,
ClusterMarkerRenderer.ClusterStyle style)
Constructs a clustered marker renderer
|
| Modifier and Type | Method and Description |
|---|---|
static MarkerRendererFactory |
factory(MarkerSymbol defaultSymbol,
ClusterMarkerRenderer.ClusterStyle style)
Convenience method for instantiating this renderer via a factory, so the layer construction semantic is more pleasing to the eye
|
protected Bitmap |
getClusterBitmap(int size)
Gets a bitmap for a given cluster size
|
protected void |
populate(int size) |
void |
update(GLViewport v)
Default implementation:
Copy initial Viewport position and compile buckets.
|
sort, updatecompile, render, setMatrix, setMatrix, setMatrix, setMatrixisReady, setReady, setupprotected static final int CLUSTER_MAXSIZE
protected static final int MAP_MARKER_CLUSTER_SIZE_DP
protected static Bitmap[] mClusterBitmaps
protected int mStyleBackground
protected int mStyleForeground
public ClusterMarkerRenderer(MarkerLayer<MarkerInterface> markerLayer, MarkerSymbol defaultSymbol, ClusterMarkerRenderer.ClusterStyle style)
markerLayer - The owner layerdefaultSymbol - The default symbolstyle - The desired style, or NULL to disable clusteringprotected void populate(int size)
populate in class MarkerRendererpublic void update(GLViewport v)
BucketRendererupdate in class MarkerRendererprotected Bitmap getClusterBitmap(int size)
size - The cluster size. Can be greater than CLUSTER_MAXSIZE.public static MarkerRendererFactory factory(MarkerSymbol defaultSymbol, ClusterMarkerRenderer.ClusterStyle style)
defaultSymbol - Default symbol to use if the Marker is not assigned a symbolstyle - Cluster icon style, or NULL to disable clustering functionality