Closed Belzik closed 4 years ago
I have the same problem to resolve, anyone have any ideas how to do it?
I never tested it but creating 2 cluster managers for the same map should work:
let layer1 = CKClusterManager()
layer1.map = self.mapView
layer1.annotations = news
let layer2 = CKClusterManager()
layer2.map = self.mapView
layer2.annotations = monuments
Have you been able to test that? I will close this for now.
At the moment, we put the annotations in an array of Сluster Manager: mapView.clusterManager.annotations = annotations
But, what should I do if I want to have two different layers. For example, shops will cluster in one layer and cultural monuments in another.
I have two arrays var news: [NewsAnnotation] var monuments: [MonumentsAnnotation] Accordingly, these two arrays should not cluster together. And should not be displayed on the map as a single layer.
Any ideas? I Used MapBox.