-
public class ClusterOptionsOptions to show and configure symbol clustering with using SymbolManager.
It exposes a minimal of configuration options, a more advanced setup can be created manually with using CircleLayer and SymbolLayers directly.
-
-
Field Summary
Fields Modifier and Type Field Description private intclusterRadiusprivate intclusterMaxZoomprivate Array<Pair<Integer, Integer>>colorLevelsprivate ExpressioncircleRadiusprivate ExpressiontextColorprivate ExpressiontextSizeprivate ExpressiontextField
-
Constructor Summary
Constructors Constructor Description ClusterOptions()Creates a default ClusterOptions object
-
Method Summary
Modifier and Type Method Description intgetClusterRadius()Get the cluster radius, 50 by default. intgetClusterMaxZoom()Set the cluster maximum, 14 by default. Array<Pair<Integer, Integer>>getColorLevels()Get the cluster color levels, which a pair constructed with amount of point and a int color value. ExpressiongetCircleRadius()Get the circle radius of the cluster items, 18 by default ExpressiongetTextColor()Get the text color of cluster item. ExpressiongetTextSize()Get the text size of cluster item. ExpressiongetTextField()Set the text field of a cluster item. ClusterOptionswithClusterRadius(int clusterRadius)Set the cluster radius, 50 by default. ClusterOptionswithClusterMaxZoom(int clusterMaxZoom)Set the cluster maximum zoom, 14 by default. ClusterOptionswithColorLevels(@NonNull() Array<Pair<Integer, Integer>> colorLevels)Set the cluster color levels, which a pair constructed with amount of point and a int color value. ClusterOptionswithCircleRadius(@Nullable() Expression circleRadius)Set the circle radius of cluster items. ClusterOptionswithTextColor(@Nullable() Expression textColor)Set the text color of cluster item. ClusterOptionswithTextSize(@Nullable() Expression textSize)Set the text size of cluster item. ClusterOptionswithTextField(@Nullable() Expression textField)Set the text field of a cluster item. voidapply(@NonNull() Style style, @NonNull() String sourceId)Apply cluster options to a style and source id. -
-
Method Detail
-
getClusterRadius
int getClusterRadius()
Get the cluster radius, 50 by default.
-
getClusterMaxZoom
int getClusterMaxZoom()
Set the cluster maximum, 14 by default.
-
getColorLevels
@NonNull() Array<Pair<Integer, Integer>> getColorLevels()
Get the cluster color levels, which a pair constructed with amount of point and a int color value.
-
getCircleRadius
@Nullable() Expression getCircleRadius()
Get the circle radius of the cluster items, 18 by default
-
getTextColor
@Nullable() Expression getTextColor()
Get the text color of cluster item. White by default
-
getTextSize
@Nullable() Expression getTextSize()
Get the text size of cluster item. 12 by default.
-
getTextField
@Nullable() Expression getTextField()
Set the text field of a cluster item. toNumber(get("point_count")) by default.
-
withClusterRadius
ClusterOptions withClusterRadius(int clusterRadius)
Set the cluster radius, 50 by default.
- Parameters:
clusterRadius- the radius at which the cluster dissolves
-
withClusterMaxZoom
ClusterOptions withClusterMaxZoom(int clusterMaxZoom)
Set the cluster maximum zoom, 14 by default.
- Parameters:
clusterMaxZoom- the cluster maximum zoom, at this zoom level clusters dissolve automatically
-
withColorLevels
ClusterOptions withColorLevels(@NonNull() Array<Pair<Integer, Integer>> colorLevels)
Set the cluster color levels, which a pair constructed with amount of point and a int color value.
- Parameters:
colorLevels- the cluster color levels array
-
withCircleRadius
ClusterOptions withCircleRadius(@Nullable() Expression circleRadius)
Set the circle radius of cluster items. 18 by default
- Parameters:
circleRadius- the cluster item circle radius
-
withTextColor
ClusterOptions withTextColor(@Nullable() Expression textColor)
Set the text color of cluster item. White by default.
- Parameters:
textColor- the cluster item text color
-
withTextSize
ClusterOptions withTextSize(@Nullable() Expression textSize)
Set the text size of cluster item. 12 by default.
- Parameters:
textSize- the cluster item text size
-
withTextField
ClusterOptions withTextField(@Nullable() Expression textField)
Set the text field of a cluster item. toNumber(get("point_count")) by default.
- Parameters:
textField- the cluster item text field
-
-
-
-