摘要:
一.基本知识 目前主流的智能手机大部分都支持GoogleMap地图程序,而手机上的地图程序确实能给我们的出行带来很大的方便。在iPhone中利用MapKit框架可以很方便的显示Google地图,并且可以在地图上添加标注。二.具体介绍1.MKMapView的显示(1)创建MKMapViewCGRect rect = CGRectMake(0, 20, 320, 460);MKMapView *mapView = [[MKMapView alloc] initWithFrame:rect];(2)设定经纬度CLLocationCoordinate2D theCoordinate;theCoordi 阅读全文
posted @ 2011-05-11 23:52
peerlessly
阅读(6186)
评论(0)
推荐(0)
摘要:
在MKMapView中加pin其实就是加入MKAnnonation, 可以加入服和MKAnnonation协议的pin,下面展示一下方法。1.首先创建一个服和MKAnnonation协议的委托类@interface AnnotationDelegate : NSObject <MKAnnotation> { CLLocationCoordinate2D coordinate; } @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; - (id) initWithCoordinate:(CLLocati 阅读全文
posted @ 2011-05-11 23:46
peerlessly
阅读(1357)
评论(0)
推荐(0)
浙公网安备 33010602011771号