0

我正在使用 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];
    }
}
4

1 回答 1

1

Make sure that you are selection your current location when you are running application on simulation .

enter image description here

于 2013-02-08T14:23:00.057 回答