0

I have problem with clustering in MapKit. I try to build clustering with at least two different types of clusters like e-scooters and cars (defined by clusteringIdentifier - docs). But a problem occurs while two elements with different clusteringIdentifier are very close to each others - one of them just disappear.

Here you can find preview of the problem

Docs says that clustering is based on collisionMode. I assume that whenever there is collision between two markers of the same type - they are clustered. The problem occurs when collision is detected between elements with different clusteringIdentifier. In that case markers just disappears (the reason is that collisionMode is turned on).

I tried to change collisionMode to .none, but clustering stop working in that case.

Is there any way to achieve clustering working with different clusterIdentifiers without disappearing?

  • rendering of AnnotationViews of clusters behaves exactly like rendering normal annotationViews. You find the answers here: https://stackoverflow.com/questions/49020023/mapkit-annotations-disappearing/55663218#55663218 – Gerd Castan Jan 30 '21 at 16:05
  • @GerdCastan migrating to MKMarkerAnnotationView solved problem! Big thanks! – bartoliniii Jan 31 '21 at 17:18

0 Answers0