-(void)mapViewDidFinishLoading:(BMKMapView *)mapView{
//添加起点,修改大头针图片,代理方法中修改图片
CLLocationCoordinate2D pLocation = m_pLocationService.userLocation.location.coordinate;
BMKPointAnnotation* annotation = [[BMKPointAnnotation alloc]init];
self.delegate = self;
annotation.coordinate = pLocation;
[self addAnnotation:annotation];
}
-(BMKAnnotationView *)mapView:(BMKMapView *)mapView viewForAnnotation:(id<BMKAnnotation>)annotation{
BMKAnnotationView *pStarView = [[BMKAnnotationView alloc]initWithFrame:CGRectMake(self.frame.size.width/2, self.frame.size.height/2, 26, 336)];
UIImageView *pImage = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 26, 33)];
[pStarView addSubview:pImage];
pImage.image = [UIImage imageNamed:@"sport_star"];
pStarView.backgroundColor = [UIColor clearColor];
return pStarView;
}
Paste_Image.png