-(MKAnnotationView *)mapView:(MKMapView *)theMapView viewForAnnotation:(id <MKAnnotation>)annotation {
MKAnnotationView *newAnnotation=[[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"annotation1"];
if ([[annotation title] isEqualToString:@"当前位置"]) {
newAnnotation.image = [UIImage imageNamed:@"person_location"];
}
else{
newAnnotation.image = [UIImage imageNamed:@"login_logo_small"];
}
newAnnotation.canShowCallout=YES;
return newAnnotation;
MKAnnotationView *newAnnotation=[[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"annotation1"];
if ([[annotation title] isEqualToString:@"当前位置"]) {
newAnnotation.image = [UIImage imageNamed:@"person_location"];
}
else{
newAnnotation.image = [UIImage imageNamed:@"login_logo_small"];
}
newAnnotation.canShowCallout=YES;
return newAnnotation;