Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Annotations ( MKAnnotationView ) in the same location Coordinates

Hi I am trying to implement Annotations grouping and animation if the user touch.

I did look a the different cluster Library solution but this wont work for my because I have multiple Annotations in the same Coordinates.

So this is what I want to do

1- I identify where there are multiple Annotations in the same place (Coordinates)? how can implement this ? find the annotations in the same coordinates and make a new group annotation ?

2- change the colour of that Annotation (to let the user know) I can do this on this method -(MKAnnotationView*)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation;

3- if the user touch the annotations in that group , annotations will move in a circle around their location.

So far I have all my annotation on the map some have a very dark shadow.

I want to focus in the first task now - grouping

I am not asking for code example I can do that I just need help figuring out what methods to use to implement the task .

Annotations Idea

Thanks for your help.

like image 339
HernandoZ Avatar asked May 05 '13 03:05

HernandoZ


1 Answers

I ended up implementing this code from StormID

Handling MKMapView Annotation Pins on the Same Coordinate

I have to make some changes but it works great.

all done

like image 120
HernandoZ Avatar answered Oct 31 '22 22:10

HernandoZ