首先需要设置mapView的属性:
self.mapView = [[[BMKMapView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)] autorelease];//我们动态创建一个MapView对象self.mapView = [[[BMKMap