Search code examples
iosobjective-cskmapscalloutview

Is it possible to show callout views for 3 different annotations at once?


I need to show calloutView for all 3 annotations I presently have on the map, and let the user decide which he will interact with based on the info written on those callouts.

I tried calling:

[[SKRoutingService sharedInstance].mapView showCalloutForAnnotation:annotation1 withOffset:CGPointMake(0, 52.0f) animated:YES];
[[SKRoutingService sharedInstance].mapView showCalloutForAnnotation:annotation2 withOffset:CGPointMake(0, 52.0f) animated:YES];
[[SKRoutingService sharedInstance].mapView showCalloutForAnnotation:annotation3 withOffset:CGPointMake(0, 52.0f) animated:YES];

But it results in showing a CalloutView only for the last annotation.

Any solution to this?


Solution

  • Actually, I solved this with making a custom UIView for annotation, adding the Map pin and the UIView that was supposed to be a Callout View. In there, i added a label that will hold the value I need to show to the user