Reputation: 4042
I am using ADClusterMapView as a mapview, and I can't see anything but a blue screen in the simulator when I add a [self.mapView setRegion:region animated:YES]; I can see the map without this line of code. I am pretty sure I can get the coordinate with locationController.locationManager.location.coordinate. When it runs in the simulator, All I can see is a green screen and Legal link on the left bottom and a Autonavi on the right bottom.
- (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];
}
}
Upvotes: 0
Views: 242
Reputation: 31091
Make sure that you are selection your current location when you are running application on simulation .
Upvotes: 1