我正在使用 ADClusterMapView 作为地图视图,当我添加 [self.mapView setRegion:region animated:YES]; 时,在模拟器中除了蓝屏之外什么都看不到。不用这行代码我也能看到地图。我很确定我可以使用 locationController.locationManager.location.coordinate 获得坐标。当它在模拟器中运行时,我只能看到左下角的绿屏和 Legal 链接以及右下角的 Autonavi。
- (void)viewDidLoad
{
[super viewDidLoad];
if ([CLLocationManager locationServicesEnabled]) {
self.mapView.delegate = self;
locationController = [[LocationController alloc] init];
[locationController.locationManager startUpdatingLocation];
MKCoordinateRegion region;
region = MKCoordinateRegionMakeWithDistance(locationController.locationManager.location.coordinate, 10000, 10000);
[self.mapView setRegion:region animated:YES];
}
}