第二步:
一定要看
官方 demo.
就在
BaiduMap_IOSSDK_v3.0.0_Sample
里面
第一步;
var _mapManager: BMKMapManager?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
_mapManager = BMKMapManager()
// 如果要关注网络及授权验证事件,请设定generalDelegate参数
let ret = _mapManager?.start("在此处输入您的授权Key", generalDelegate: self)
if ret == false {
NSLog("manager start failed!")
}
return true
}
先,加代理:
class AppDelegate: UIResponder, UIApplicationDelegate ,BMKGeneralDelegate {