- Annotation*anno =[[[Annotation alloc] init] autorelease];
- anno.coordinate= xxx// get it map view;
- anno.title= @"Current Location";
- anno.subtitle=[NSString stringWithFormat:@"%f, %f", anno.coordinate.latitude, anno.coordinate.longitude];
- NSString *defaultPinID = @"xyz..";
- pinView =[[[MKPinAnnotationView alloc] initWithAnnotation:anno reuseIdentifier:defaultPinID] autorelease];
- // customize the pin
- pinView.image=[UIImage imageNamed:@"custom_pin.png"];
- pinView.opaque= NO;
- pinView.canShowCallout= YES;
- pinView.draggable= NO;
- pinView.annotation= anno;
↧
How to create a PINAnnotationView in IOS?
↧