13
我已延长MapKit的绘制自定义注解图像用下面的代码能力:扩展MapView类:viewForAnnotation现在没有蓝点
- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation{
NSLog(@"Drawing a cloud on the map");
MKAnnotationView *view;
if(annotation != mapView.userLocation){
view=[[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"parkingloc"];
view.image=[UIImage imageNamed:@"placemarkCloud.png"];
[view setCanShowCallout:YES];
[view setRightCalloutAccessoryView:[UIButton buttonWithType:UIButtonTypeDetailDisclosure]];
}
else{
view=
}
return view;
}
我的问题是什么,我应该为了留住iPhone的内置使视图=到在蓝点。您可以看到我消除了为该点绘制的自定义图像,但我不知道如何将其显示为默认值。