after I spend 2 days searching for an error, I have to ask for help here. I have a MapViewController and put some contacts on the map. I copied most of the code from MapCallouts and WeatherMap sample Apple code.
In any case, it seems that I deleted or skipped the main parts. there seems to be no connection between MapViewController and the following code
- (MKAnnotationView *)mapView:(MKMapView *)theMapView viewForAnnotation:(id <MKAnnotation>)annotation { NSLog(@"MKAnnotationView"); return nil; }
annotation setup looks like this: it works well:
- (void)createPoi:(CLLocationCoordinate2D)theCoordinate { NSLog(@"createPoi"); RandomAnnotation *randomAnnotation = [[RandomAnnotation alloc] init]; [randomAnnotation setTheCoordinate:theCoordinate]; [randomAnnotation setTheTitle:@"bla"]; [randomAnnotation setTheSubTitle:@"bla"]; [self.mapAnnotations insertObject:randomAnnotation atIndex:kRandomAnnotationIndex]; [randomAnnotation release]; [self.mapView addAnnotation:[self.mapAnnotations objectAtIndex:kRandomAnnotationIndex]]; }
I canβt understand what happened. Can someone give me a hint what is missing? I must admit that I have no experience with a delegate template.
rockstarberlin
source share