Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 11.2 MapKit not clustering annotation

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 ?

like image 450
Tarang Avatar asked Dec 10 '17 02:12

Tarang


1 Answers

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.

like image 118
Tarang Avatar answered Oct 19 '22 01:10

Tarang