I am using Google Maps API for iOS and want to use marker clustering utility. I figured out how to show clustered markers, but I would like to customize markers. Can someone
If you only need to change the icon or color you can add buckets with multiple colors/images when initializing your GMUDefaultClusterIconGenerator (or just one as in the case below if you only need one color). I used a large number (higher than the max number of cluster items) so that all clusters will have the same color. To use multiple colors you can add multiple buckets and multiple colors.
let iconGenerator = GMUDefaultClusterIconGenerator.init(buckets: [99999], backgroundColors: [UIColor.red])
let algorithm = GMUNonHierarchicalDistanceBasedAlgorithm()
let renderer = GMUDefaultClusterRenderer(mapView: googleMapView, clusterIconGenerator: iconGenerator)
clusterManager = GMUClusterManager(map: googleMapView, algorithm: algorithm, renderer: renderer)
clusterManager.setDelegate(self, mapDelegate: self)
To use an image as your cluster background you can provide a group of backgroundImages for your buckets:
let iconGenerator = GMUDefaultClusterIconGenerator.init(buckets: [99999], backgroundImages: [UIImage(named: "YOUR_IMAGE_HERE")!])