I am developing an app for chating, I have to display all friends on a Map with their image. Please provide guidance to implement it.
I have used following code...>
Pleae use the below code.
- (MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation:(id )annotation
{
if ([annotation isKindOfClass:[MKUserLocation class]]) {
return nil;
}
static NSString* MapAnnotationIdentifier = @"MapAnnotationIdentifier";
MKAnnotationView* pinView = (MKAnnotationView *)[quakesMapView dequeueReusableAnnotationViewWithIdentifier:MapAnnotationIdentifier];
if (!pinView) {
pinView = [self annotationViewForAnnotation:annotation withIdentifier:MapAnnotationIdentifier];
}
pinView.image = [UIImage imageNamed:YourImage];
return pinView;
}