- (void)mapView:(MKMapView *)mapView didAddAnnotationViews:(NSArray *)views
{
[self showCallOut];
}
- (void)showCallOut {
//[map selectAnnotation:[map.annotations objectAtIndex:0] animated:YES];
int num=[map.annotations count];
[map selectAnnotation:[map.annotations objectAtIndex:(num-1)] animated:YES];
}
上面的代码会自动在地图上显示开始的objectAtIndex:0注释,但如果我设置objectAtIndex:(num-1)这是目的地annoation,它就不会显示在地图上