target ‘百度地图’ do
pod ‘AMap3DMap’
pod ‘AMapSearch’
pod ‘AMapLocation’
end
appledelegate
#import <AMapFoundationKit/AMapFoundationKit.h>
[AMapServices sharedServices].apiKey = @"71d809cb6995c3a674eb94231027c69b";
[[AMapServices sharedServices] setEnableHTTPS:YES];
#import <MAMapKit/MAMapKit.h>
#import <AMapFoundationKit/AMapFoundationKit.h>
// Do any additional setup after loading the view, typically from a nib.
///地图需要v4.5.0及以上版本才必须要打开此选项(v4.5.0以下版本,需要手动配置info.plist)
[AMapServices sharedServices].enableHTTPS = YES;
///初始化地图
MAMapView *_mapView = [[MAMapView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width,400)];
///把地图添加至view
[self.view addSubview:_mapView];
///如果您需要进入地图就显示定位小蓝点,则需要下面两行代码
_mapView.showsUserLocation = YES;
_mapView.userTrackingMode = MAUserTrackingModeFollow;