iOS 11.2 MapKit not clustering annotation
Asked Answered
E

1

6

My question is about clustering feature introduced in iOS 11 of MapKit.

I am trying to cluster pins on MapView. I can see the pins getting clustered and un-clustered when i zoom in and zoom out.

But when all the pins are visible i am not able to get them clustered again. No matter how much i zoom in or zoom out. Sometimes one even pin remains without getting clustered.

I am customizing annotation and clustered annotation views.

I am following exactly same code as WWDC 2017 sample code but in Obj-C.

Can anyone guide me where can be the issue ?

Edmundoedmunds answered 10/12, 2017 at 2:29 Comment(0)
E
14

To answer my own questions: clusteringIdentifier was nil when dequeuing the annotation. So i am now setting the clusteringIdentifier after dequeuing.

I hope this helps.

Edmundoedmunds answered 10/12, 2017 at 2:43 Comment(4)
Still a problem on iOS 13, reported to AppleJorry
Answer from Apple is that this is the intended behavior.Jorry
@ihatetoregister It would be really helpful if you can provide an evidence of where the Apple have said this?Baggott
Thanks man, I spent a really long time on this and your answer guided me to my solution. If possible, you should accept this answer as the correct one, it'll be really helpful for people stuck on this issue in the future.Turnbull

© 2022 - 2024 — McMap. All rights reserved.