From: http://www.cocoachina.com/newbie/basic/2012/0201/3926.html

 

 

本文由论坛会员yunhuaikong分享
 
MKMapView 添加图片

以下为两张图片。如下:

MKMapView 添加图片MKMapView 添加图片

适当的代码段添加如下annotation. MapAnnotation是实现了MKAnnotation的NSObject类:

 

CLLocationCoordinate2D coordinate = CLLocationCoordinate2DMake(latitude, longitude);

 

MapAnnotation *annotation = [[MapAnnotation alloc] initWithcoordiante: coordinate];

[map_view addAnnotations: annotation];

 

[annotation release];

 

MKMapView 添加图片

 

MKMapView 添加图片
 

相关文章: