ClusterOptions
public struct ClusterOptions : Equatable
Options to configure point annotation clustering with PointAnnotationManager.
ClusterOptions exposes a minimal of configuration options, a more advanced setup can be created manually with using CircleLayer and SymbolLayers directly.
-
init(circleRadius:circleColor:textColor:textSize:textField:clusterRadius:clusterMaxZoom:clusterProperties:)
Define a set of cluster options to determine how to cluster annotations. Providing clusterOptions when initializing a
PointAnnotationManager
will turn on clustering for thatPointAnnotationManager
.Declaration
Swift
public init(circleRadius: Value<Double> = .constant(18), circleColor: Value<StyleColor> = .constant(StyleColor(.black)), textColor: Value<StyleColor> = .constant(StyleColor(.white)), textSize: Value<Double> = .constant(12), textField: Value<String> = .expression(Exp(.get) { "point_count" }), clusterRadius: Double = 50, clusterMaxZoom: Double = 14, clusterProperties: [String: Expression]? = nil)