//定义一个view 用来记录选中的view
@property (nonatomic,strong) BMKAnnotationView *selectAnnotation;
//mapview delegate 大头针点击
- (void)mapView:(BMKMapView *)mapView didSelectAnnotationView:(BMKAnnotationView *)view{
if ([view.annotation isKindOfClass:[JJAnnotationView class]]) {
view.image = [UIImage imageNamed:@"test_select"];
if (self.selectAnnotation) {
self.selectAnnotation.image = [UIImage imageNamed:@"test"];
}
self.selectAnnotation = view;
}
}
网友评论