Note that there are some explanatory texts on larger screens.

plurals
  1. POOCmapView won't show clusters/annotations?
    text
    copied!<p>Today i started to use OCMapView ( <a href="https://github.com/yinkou/OCMapView" rel="nofollow">https://github.com/yinkou/OCMapView</a> ) and studied the example project... so i decided to add the content to my project... every thing was OK no red errors... the simulator turned on and and nothing happens only a alert message shows up "would you like to use current location? " and then the black screen shows so it seams that it doesnt really load the app... I'm trying to figure out the problem for hours... so maybe you have idea where the problem is...</p> <pre><code>@implementation AirportsViewController - (void)viewDidLoad { [OCMapView class]; mapView.delegate = self; NSArray* airports = [Airport allAirports]; [mapView addAnnotations:airports]; [mapView setVisibleMapRect:MKMapRectWorld]; } -(MKAnnotationView*)mapView:(MKMapView *)aMapView viewForAnnotation:(id&lt;MKAnnotation&gt;)annotation {MKAnnotationView *annotationView; static NSString* reuseIdentifier = @"airportAnnotation"; if ([annotation isKindOfClass:[OCAnnotation class]]) { OCAnnotation *clusterAnnotation = (OCAnnotation *)annotation; annotationView = (MKAnnotationView *)[aMapView dequeueReusableAnnotationViewWithIdentifier:@"ClusterView"]; if (!annotationView) { annotationView = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"ClusterView"]; annotationView.canShowCallout = YES; annotationView.centerOffset = CGPointMake(0, -20); } clusterAnnotation.title = @"Cluster"; clusterAnnotation.subtitle = [NSString stringWithFormat:@"Containing annotations: %d", [clusterAnnotation.annotationsInCluster count]]; // set its image annotationView.image = [UIImage imageNamed:@"regular.png"]; clusterAnnotation.title = clusterAnnotation.groupTag; } else if ([annotation isKindOfClass:[Airport class]]) { MKAnnotationView* annotationView = [mapView dequeueReusableAnnotationViewWithIdentifier:reuseIdentifier]; if (!annotationView) { annotationView = [[[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:reuseIdentifier] autorelease]; annotationView.canShowCallout = YES; } annotationView.image = ((Airport*)annotation).icon; return annotationView; } } </code></pre> <p>if something unclear or i forgot some of the code to post just ask.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload