Saturday 15 January 2011

mapkit - iOS MKAnnotation multiple pin types -


I can start a question with a reference to

I

I can add a custom annotation image , But I want to present all the annotations to be able to choose different images for different types of places, but they all use the same image.

@interface DDBIS annotation: NSOBEZ & Lt:

; MKAnnotation & gt; {CLLocationCoordinate2D Coordination; NSString * title; NSString * subtitles; NSString * Route number; NSString * imageName; NSString * type; } This is the (renewed) viewfnnotation method:

  - (MKAnnotationView *) mapView: (MKMapView *) aMapView viewForAnnotation: (id & lt; MkAnnotation & Gt;) Annotation {// NSLog (@ "% s", __FUNCTION__); NSString * Annotation Imagezone = [[NSString alloc] init]; If ([Encoding is KindOfClass: [MKUserLocation class]]) {[mapView setUserTrackingMode: MKUserTrackingModeNone animated: no]; Return zero; // return the default blue dot view to return zero) // NSString * temp = [NSString stringWithFormat: @ "% @", (DDNotation *) annotation]; // NSLog (@ "DDAnnotation:% @", Temporarily); If ([(([(DDNNotation *) annotation) (type ([(([(DDNNotation *) annotation). Type is excelstostring: @ "train" ]} {AnnotationImageName = Train = .png ";}  


No comments:

Post a Comment