MapKit

一、mapkit的基本使用

#import "ViewController.h"
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>
@interface ViewController ()
@property (weak, nonatomic) IBOutlet MKMapView *mapView;


/**   */
@property (nonatomic, strong) CLLocationManager *lM;

@end

@implementation ViewController


- (CLLocationManager *)lM
{
    if (!_lM) {
        _lM = [[CLLocationManager alloc] init];
        if ([_lM respondsToSelector:@selector(requestAlwaysAuthorization)])
        {
            [_lM requestAlwaysAuthorization];
        }
    }
    return _lM;
}

- (void)viewDidLoad {
    [super viewDidLoad];

    // Do any additional setup after loading the view, typically from a nib.
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    /**
     MKMapTypeStandard = 0,
     MKMapTypeSatellite,
     MKMapTypeHybrid,
     MKMapTypeSatelliteFlyover NS_ENUM_AVAILABLE(10_11, 9_0),
     MKMapTypeHybridFlyover NS_ENUM_AVAILABLE(10_11, 9_0),
     */
//    self.mapView.mapType = MKMapTypeSatelliteFlyover;
    
    
//    self.mapView.zoomEnabled = NO;
//    
////    self.mapView.showsCompass = NO;
//    self.mapView.showsScale = YES;
    
    [self lM];
//    self.mapView.showsUserLocation = YES;
    
    self.mapView.userTrackingMode = MKUserTrackingModeFollowWithHeading;
    
    
}

@end

二、mapkit的中级使用

#import "ViewController.h"
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>
@interface ViewController ()<MKMapViewDelegate>
@property (weak, nonatomic) IBOutlet MKMapView *mapView;


/**   */
@property (nonatomic, strong) CLLocationManager *lM;

@end

@implementation ViewController


- (CLLocationManager *)lM
{
    if (!_lM) {
        _lM = [[CLLocationManager alloc] init];
        if ([_lM respondsToSelector:@selector(requestAlwaysAuthorization)])
        {
            [_lM requestAlwaysAuthorization];
        }
    }
    return _lM;
}

- (void)viewDidLoad {
    [super viewDidLoad];

    // Do any additional setup after loading the view, typically from a nib.
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    /**
     MKMapTypeStandard = 0,
     MKMapTypeSatellite,
     MKMapTypeHybrid,
     MKMapTypeSatelliteFlyover NS_ENUM_AVAILABLE(10_11, 9_0),
     MKMapTypeHybridFlyover NS_ENUM_AVAILABLE(10_11, 9_0),
     */
//    self.mapView.mapType = MKMapTypeSatelliteFlyover;
    
    
//    self.mapView.zoomEnabled = NO;
//    
////    self.mapView.showsCompass = NO;
//    self.mapView.showsScale = YES;
    
    [self lM];
   self.mapView.delegate = self;
    self.mapView.showsUserLocation = YES;
    
//    self.mapView.userTrackingMode = MKUserTrackingModeFollowWithHeading;
    
}

#pragma mark - MKMapViewDelegate
/**
 *  更新到位置
 *
 *  @param mapView      地图
 *  @param userLocation 位置对象
 */
-(void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
{
    /**
     *  MKUserLocation (大头针模型)
     *
     
     *
     */
    userLocation.title = @"银江软件园";
    userLocation.subtitle = @"城市宝";
    
    
    // 设置地图显示中心
//    [self.mapView setCenterCoordinate:userLocation.location.coordinate animated:YES];
    
    
    // 设置地图显示区域
    MKCoordinateSpan span = MKCoordinateSpanMake(0.051109, 0.034153);
    MKCoordinateRegion region = MKCoordinateRegionMake(userLocation.location.coordinate, span);
    [self.mapView setRegion:region animated:YES];
    
    
    
}

三、大头针的添加

#import "ViewController.h"
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>
#import "XMGAnno.h"

@interface ViewController ()<MKMapViewDelegate>

@property (weak, nonatomic) IBOutlet MKMapView *mapView;

/** <#注释#> */
@property (nonatomic, strong) CLGeocoder *geoC;

@end

@implementation ViewController

- (CLGeocoder *)geoC
{
    if (!_geoC) {
        _geoC = [[CLGeocoder alloc] init];
    }
    return _geoC;
}




-(void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    
    // 1. 获取当前触摸点
    CGPoint point = [[touches anyObject] locationInView:self.mapView];
    
    
    // 2. 转换成经纬度
    CLLocationCoordinate2D pt = [self.mapView convertPoint:point toCoordinateFromView:self.mapView];
    
    // 3. 添加大头针
    [self addAnnoWithPT:pt];
    
   
    
}

//-(void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
//{
//    // 移除大头针(模型)
//    NSArray *annos = self.mapView.annotations;
//    [self.mapView removeAnnotations:annos];
//}

- (void)addAnnoWithPT:(CLLocationCoordinate2D)pt
{
    __block XMGAnno *anno = [[XMGAnno alloc] init];
    anno.coordinate = pt;
    anno.title = @"银江软件园";
    anno.subtitle = @"城市宝";
    anno.type = arc4random_uniform(5);
    [self.mapView addAnnotation:anno];
    CLLocation *loc = [[CLLocation alloc] initWithLatitude:anno.coordinate.latitude longitude:anno.coordinate.longitude];
    [self.geoC reverseGeocodeLocation:loc completionHandler:^(NSArray<CLPlacemark *> * _Nullable placemarks, NSError * _Nullable error) {
        CLPlacemark *pl = [placemarks firstObject];
        anno.title = pl.locality;
        anno.subtitle = pl.thoroughfare;

    }];

    // 添加多个大头针
//    self.mapView addAnnotations:<#(nonnull NSArray<id<MKAnnotation>> *)#>
    
    
}


#pragma mark - MKMapViewDelegate

-(void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
{
    
}


/**
 *  当我们添加大头针模型时,
 *
 *  @param mapView    地图
 *  @param annotation 大头针
 *
 *  @return 大头针视图
 */
-(MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation
{
//    return nil;
 
    static NSString *inden = @"datouzhen";
    MKAnnotationView *pin = [mapView dequeueReusableAnnotationViewWithIdentifier:inden];
    if (pin == nil) {
        pin = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:inden];
    }
    
    pin.annotation = annotation;
    
    // 设置是否弹出标注
    pin.canShowCallout = YES;
    XMGAnno *anno = (XMGAnno *)annotation;
    NSString *imageName = [NSString stringWithFormat:@"category_%zd", anno.type + 1];
    pin.image = [UIImage imageNamed:imageName];

    
    // 设置大头针图片(系统大头针无效)
//    pin.image = [UIImage imageNamed:@"category_5"];
    
    
    pin.draggable = YES;
    
//    pin.calloutOffset = CGPointMake(5, 8);
    UIImageView *iv = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
    iv.image = [UIImage imageNamed:@"htl"];
    pin.leftCalloutAccessoryView = iv;
    
    UIImageView *ivR = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
    ivR.image = [UIImage imageNamed:@"eason"];
    pin.rightCalloutAccessoryView = ivR;
    
    pin.detailCalloutAccessoryView = [UISwitch new];
    
    return pin;
    
}


- (MKPinAnnotationView *)systemAnnoWithMapView:(MKMapView *)mapView andAnno:(id<MKAnnotation>)annotation
{
    static NSString *inden = @"datouzhen";
    MKPinAnnotationView *pin = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:inden];
    
    if (pin == nil) {
        pin = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:inden];
    }
    
    pin.annotation = annotation;
    
    // 设置是否弹出标注
    pin.canShowCallout = YES;
    
    // 设置大头针颜色
    pin.pinTintColor = [UIColor blackColor];
    
    // 从天而降
    pin.animatesDrop = YES;
    
    // 设置大头针图片(系统大头针无效)
    //    pin.image = [UIImage imageNamed:@"category_5"];
    
    
    pin.draggable = YES;
    
    
    
    return pin;

}

// 不选中
-(void)mapView:(MKMapView *)mapView didDeselectAnnotationView:(MKAnnotationView *)view
{
    NSLog(@"不选中");
    NSLog(@"%@", view.annotation);
}

// 选中
-(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
{
       NSLog(@"选中");
}



@end

四、利用系统App导航|3D视角|地图快照截图

#import "ViewController.h"
#import <MapKit/MapKit.h>



@interface ViewController ()

/**   */
@property (nonatomic, strong) CLGeocoder *geoC;
@property (weak, nonatomic) IBOutlet MKMapView *mapView;

@end

@implementation ViewController


- (CLGeocoder *)geoC
{
    if (!_geoC) {
        _geoC = [[CLGeocoder alloc] init];
    }
    return _geoC;
}


- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
   
    // 3D视角
//    MKMapCamera *camer = [MKMapCamera cameraLookingAtCenterCoordinate:CLLocationCoordinate2DMake(23.132931, 113.375924) fromEyeCoordinate:CLLocationCoordinate2DMake(23.135931, 113.375924) eyeAltitude:10];
//    self.mapView.camera = camer;
    
    //地图快照截图
    MKMapSnapshotOptions *option = [[MKMapSnapshotOptions alloc] init];
    // 针对地图
    option.region = self.mapView.region;
    option.showsBuildings = YES;
    
    // 输出图片
    option.size = CGSizeMake(1000, 2000);
    option.scale = [UIScreen mainScreen].scale;
    
    
    MKMapSnapshotter *snap = [[MKMapSnapshotter alloc] initWithOptions:option];
    
    [snap startWithCompletionHandler:^(MKMapSnapshot * _Nullable snapshot, NSError * _Nullable error) {
        
        if (error == nil) {
            UIImage *image = snapshot.image;
            
            NSData *data = UIImagePNGRepresentation(image);
            
            [data writeToFile:@"/Users/xiaomage/Desktop/map.png" atomically:YES];
        }else
        {
            NSLog(@"--%@", error.localizedDescription);
        }
       
        
        
    }];
}


- (void)begNav
{
    [self.geoC geocodeAddressString:@"广州" completionHandler:^(NSArray<CLPlacemark *> * _Nullable placemarks, NSError * _Nullable error) {
        // 广州地标
        CLPlacemark *gzP = [placemarks firstObject];
        
        [self.geoC geocodeAddressString:@"上海" completionHandler:^(NSArray<CLPlacemark *> * _Nullable placemarks, NSError * _Nullable error) {
            // 上海地标
            CLPlacemark *shP = [placemarks firstObject];
            [self beginNavWithBpl:gzP andEndP:shP];
            
        }];
        
    }];
}

- (void)beginNavWithBpl:(CLPlacemark *)beginP andEndP:(CLPlacemark *)endP
{
    // 创建开始的地图项
    CLPlacemark *clPB = beginP;
    MKPlacemark *mkPB = [[MKPlacemark alloc] initWithPlacemark:clPB];
    MKMapItem *beginI = [[MKMapItem alloc] initWithPlacemark:mkPB];
    
    // 创建结束的地图项
    CLPlacemark *clP = endP;
    MKPlacemark *mkP = [[MKPlacemark alloc] initWithPlacemark:clP];
    MKMapItem *endI = [[MKMapItem alloc] initWithPlacemark:mkP];
    
    // 地图项数组
    NSArray *items = @[beginI, endI];
    
    // 启动字典
    NSDictionary *dic = @{
                          // 导航方式
                          MKLaunchOptionsDirectionsModeKey : MKLaunchOptionsDirectionsModeDriving,
                          
                          // 地图类型
                          MKLaunchOptionsMapTypeKey : @(MKMapTypeHybrid),
                          
                          // 是否显示交通
                          MKLaunchOptionsShowsTrafficKey : @(YES)
                          };
    
    [MKMapItem openMapsWithItems:items launchOptions:dic];
}


@end

五、获取导航路线信息

#import "ViewController.h"
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>

@interface ViewController ()

/**   */
@property (nonatomic, strong) CLGeocoder *geoC;


@end

@implementation ViewController


- (CLGeocoder *)geoC
{
    if (!_geoC) {
        _geoC = [[CLGeocoder alloc] init];
    }
    return _geoC;
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
  
    [self.geoC geocodeAddressString:@"广州" completionHandler:^(NSArray<CLPlacemark *> * _Nullable placemarks, NSError * _Nullable error) {
        CLPlacemark *gzP = [placemarks firstObject];
        
        [self.geoC geocodeAddressString:@"shanghai" completionHandler:^(NSArray<CLPlacemark *> * _Nullable placemarks, NSError * _Nullable error) {
            CLPlacemark *shP = [placemarks firstObject];
            
            
            [self getRouteWithBeginPL:gzP andEndPL:shP];
         
        }];
 
    }];
 
}


- (void)getRouteWithBeginPL:(CLPlacemark *)beginP andEndPL:(CLPlacemark *)endPL
{
    
    MKDirectionsRequest *request = [[MKDirectionsRequest alloc] init];
    
    
    // 起点
    CLPlacemark *clP = beginP;
    MKPlacemark *mkP = [[MKPlacemark alloc] initWithPlacemark:clP];
    MKMapItem *sourceItem = [[MKMapItem alloc] initWithPlacemark:mkP];
    request.source = sourceItem;
    
    // 终点
    CLPlacemark *clP2 = endPL;
    MKPlacemark *mkP2 = [[MKPlacemark alloc] initWithPlacemark:clP2];
    MKMapItem *endItem = [[MKMapItem alloc] initWithPlacemark:mkP2];
    request.destination = endItem;
    
    MKDirections *direction = [[MKDirections alloc] initWithRequest:request];
    
    [direction calculateDirectionsWithCompletionHandler:^(MKDirectionsResponse * _Nullable response, NSError * _Nullable error) {
        /**
         *  MKDirectionsResponse
            routes : 路线数组MKRoute
         
         */
        /**
         *  MKRoute
            name : 路线名称
            distance : 距离
         expectedTravelTime : 预期时间
            polyline : 折线(数据模型)
         steps
         */
        /**
         *  steps <MKRouteStep *>
            instructions : 行走提示
         */
//        NSLog(@"%@", response);
        
        [response.routes enumerateObjectsUsingBlock:^(MKRoute * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
           NSLog(@"%@---%zd---%f", obj.name, obj.expectedTravelTime, obj.distance);
            
            [obj.steps enumerateObjectsUsingBlock:^(MKRouteStep * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
                NSLog(@"%@", obj.instructions);
            }];
   
        }];
        
        
    }];

}

@end

六、绘制路线信息

#import "ViewController.h"
#import <MapKit/MapKit.h>
#import <CoreLocation/CoreLocation.h>

@interface ViewController ()<MKMapViewDelegate>

/**   */
@property (nonatomic, strong) CLGeocoder *geoC;

@property (weak, nonatomic) IBOutlet MKMapView *mapView;

@end

@implementation ViewController


- (CLGeocoder *)geoC
{
    if (!_geoC) {
        _geoC = [[CLGeocoder alloc] init];
    }
    return _geoC;
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
  
    [self.geoC geocodeAddressString:@"广州" completionHandler:^(NSArray<CLPlacemark *> * _Nullable placemarks, NSError * _Nullable error) {
        CLPlacemark *gzP = [placemarks firstObject];
        
        [self.geoC geocodeAddressString:@"shanghai" completionHandler:^(NSArray<CLPlacemark *> * _Nullable placemarks, NSError * _Nullable error) {
            CLPlacemark *shP = [placemarks firstObject];
            
            
            [self getRouteWithBeginPL:gzP andEndPL:shP];
         
        }];
 
    }];
 
}


- (void)getRouteWithBeginPL:(CLPlacemark *)beginP andEndPL:(CLPlacemark *)endPL
{
    
    MKCircle *circle = [MKCircle circleWithCenterCoordinate:beginP.location.coordinate radius:100000];
    [self.mapView addOverlay:circle];
    
    MKCircle *circle2 = [MKCircle circleWithCenterCoordinate:endPL.location.coordinate radius:100000];
    [self.mapView addOverlay:circle2];
    
    
    MKDirectionsRequest *request = [[MKDirectionsRequest alloc] init];
    
    
    // 起点
    CLPlacemark *clP = beginP;
    MKPlacemark *mkP = [[MKPlacemark alloc] initWithPlacemark:clP];
    MKMapItem *sourceItem = [[MKMapItem alloc] initWithPlacemark:mkP];
    request.source = sourceItem;
    
    // 终点
    CLPlacemark *clP2 = endPL;
    MKPlacemark *mkP2 = [[MKPlacemark alloc] initWithPlacemark:clP2];
    MKMapItem *endItem = [[MKMapItem alloc] initWithPlacemark:mkP2];
    request.destination = endItem;
    
    MKDirections *direction = [[MKDirections alloc] initWithRequest:request];
    
    [direction calculateDirectionsWithCompletionHandler:^(MKDirectionsResponse * _Nullable response, NSError * _Nullable error) {
        /**
         *  MKDirectionsResponse
            routes : 路线数组MKRoute
         
         */
        /**
         *  MKRoute
            name : 路线名称
            distance : 距离
         expectedTravelTime : 预期时间
            polyline : 折线(数据模型)
         steps
         */
        /**
         *  steps <MKRouteStep *>
            instructions : 行走提示
         */
//        NSLog(@"%@", response);
        
        [response.routes enumerateObjectsUsingBlock:^(MKRoute * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            
            
           NSLog(@"%@---%zd---%f", obj.name, obj.expectedTravelTime, obj.distance);
            
            
            MKPolyline *polyline = obj.polyline;
            // 添加一个覆盖层数据模型
            [self.mapView addOverlay:polyline];

        }];
    
    }];

}



#pragma mark - MKMapViewDelegate

/**
 *  获取对应的图层渲染
 *
 *  @param mapView 地图
 *  @param overlay 覆盖层数据模型
 *
 *  @return 图层渲染
 */
-(MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id<MKOverlay>)overlay
{
    if ([overlay isKindOfClass:[MKCircle class]]) {
        MKCircleRenderer *circleR = [[MKCircleRenderer alloc] initWithOverlay:overlay];
        
        circleR.fillColor = [UIColor cyanColor];
        circleR.alpha = 0.5;
        
        return circleR;
    }
    

 if ([overlay isKindOfClass:[MKPolyline class]])
 {
    MKPolylineRenderer *render = [[MKPolylineRenderer alloc] initWithOverlay:overlay];
    
    // 设置线宽
    render.lineWidth = 10;
    // 设置颜色
    render.strokeColor = [UIColor redColor];
    
    return render;
 }
    
    
    return nil;
    
}


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 198,932评论 5 466
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 83,554评论 2 375
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 145,894评论 0 328
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 53,442评论 1 268
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 62,347评论 5 359
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 47,899评论 1 275
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,325评论 3 390
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,980评论 0 254
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,196评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,163评论 2 317
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,085评论 1 328
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,826评论 3 316
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,389评论 3 302
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,501评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,753评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,171评论 2 344
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 41,616评论 2 339

推荐阅读更多精彩内容

  • 跟踪显示用户的位置 设置MKMapView的userTrackingMode属性可以跟踪显示用户的当前位置 MKU...
    JonesCxy阅读 2,077评论 0 4
  • MapKit框架的使用 一. 地图的基本使用 1. 设置地图显示类型 地图的样式可以手动设置, 在iOS9.0之前...
    0271fb6f797c阅读 324评论 0 1
  • MapKit框架的使用 一. 地图的基本使用 1. 设置地图显示类型 地图的样式可以手动设置, 在iOS9.0之前...
    Jack__yang阅读 443评论 0 3
  • MapKit框架的使用 一. 地图的基本使用 1. 设置地图显示类型 地图的样式可以手动设置, 在iOS9.0之前...
    iOS_Cqlee阅读 2,328评论 1 6
  • MapKit框架使用(初级) 导入框架 导入主头文件 MapKit框架须知 1.MapKit框架数据类型的前缀都是...
    fwlong阅读 1,665评论 2 7