这是我的第一编
···
(MAAnnotationView )mapView:(MAMapView )mapView viewForAnnotation:(id)annotation
{
if ([annotation isKindOfClass:[POIAnnotation class]])
{
static NSString *poiIdentifier = @”poiIdentifier”;
MAPinAnnotationView poiAnnotationView = (MAPinAnnotationView)[self.mapView dequeueReusableAnnotationViewWithIdentifier:poiIdentifier];
if (poiAnnotationView == nil)
{
poiAnnotationView = [[MAPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:poiIdentifier];
}poiAnnotationView.canShowCallout = YES; poiAnnotationView.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; return poiAnnotationView;
}
return nil;
}
···
结束了