MaplyBasicClusterGenerator
@interface MaplyBasicClusterGenerator : NSObject <MaplyClusterGenerator>
The basic cluster generator installed by default.
This cluster generator will make images for grouped clusters of markers/labels.
-
Initialize with a list of colors.
Initialize with a list of colors. Each order of magnitude will use another color. Must provide at least 1.
Declaration
Objective-C
- (nonnull instancetype)initWithColors:(NSArray *_Nonnull)colors clusterNumber:(int)clusterNumber size:(CGSize)markerSize viewC:(MaplyBaseViewController *_Nonnull)viewC;Swift
init(colors: [Any], clusterNumber: Int32, size markerSize: CGSize, viewC: MaplyBaseViewController) -
The ID number corresponding to the cluster. Every marker/label with this cluster ID will be grouped together.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) int clusterNumber;Swift
var clusterNumber: Int32 { get set } -
The size of the cluster that will be created. This is the biggest cluster you’re likely to create. We use it to figure overlaps between clusters.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) CGSize clusterLayoutSize;Swift
var clusterLayoutSize: CGSize { get set } -
Set this if you want cluster to be user selectable. On by default.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) _Bool selectable;Swift
var selectable: Bool { get set } -
How long to animate markers the join and leave a cluster
Declaration
Objective-C
@property (assign, readwrite, nonatomic) double markerAnimationTime;Swift
var markerAnimationTime: Double { get set } -
The shader to use when moving objects around When warping objects to their new locations we use a motion shader. Set this if you want to override the default.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) MaplyShader *_Nullable motionShader;Swift
var motionShader: MaplyShader? { get set }
View on GitHub
MaplyBasicClusterGenerator Class Reference