iOS初始化一个高德地图大概需要多少东西
2016-05-11 10:43
681 查看
- (MAMapView *)mapView{ if (!_mapView) { [MAMapServices sharedServices].apiKey = GaoDeKey; _mapView = [[MAMapView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), CGRectGetHeight(self.view.bounds))]; _mapView.delegate = self; _mapView.showTraffic=YES; _mapView.showsScale=NO; _mapView.showsCompass=NO; _mapView.showsUserLocation=YES; _mapView.centerCoordinate = _mapView.userLocation.location.coordinate; _mapView.userTrackingMode = MAUserTrackingModeFollow; float zoomLevel = 0.01; MACoordinateRegion region = MACoordinateRegionMake(_mapView.userLocation.location.coordinate, MACoordinateSpanMake(zoomLevel, zoomLevel)); region.center = _mapView.userLocation.location.coordinate; [self.mapView setRegion:region]; } return _mapView; }
相关文章推荐
- iOS开发中关于继承、扩展和协议的理解
- iOS 动态库和静态库
- ios数组倒序
- iOS开发------内存管理
- IOS版本更新代码——商店版本
- IOS版本更新代码——商店版本
- iOS 使用 Runtime Attribute 为 IB 控件添加不能直接设置的属性
- IOS高级开发~Runtime(四)
- IOS高级开发~Runtime(三)
- IOS高级开发~Runtime(二)
- IOS高级开发~Runtime(一)
- Cocoapods trunk
- ios添加图片资源报(ImageAsset)错和警告
- ios import和@class的区别
- Xcoder的钢琴手之路
- iOS coredata本地数据调取为空
- IOS高级开发~Runtime(四)
- IOS高级开发~Runtime(三)
- IOS高级开发~Runtime(二)
- IOS高级开发~Runtime(一)