顯示地圖:spa
一、導入頭文件 code
#import <MapKit/MapKit.h>
若是同時須要用戶定位的話還須要blog
#import <CoreLocation/CoreLocation.h
2.顯示用戶當前位置it
// 1.用CLLocationManager開啓用戶定位 // 2. mapView顯示用戶位置 mapView.showsUserLocation = YES; // 3.開啓用戶定位 [self.locationManager startUpdatingLocation];