2011-01-12 38 views
0

我已经尝试过了两个实际设备(新iPad)和iPhone模拟器上(IOS 4)在使用Mapkit时,我可以看到完全可滚动的地图,但是没有Apple总部?

我看地图,但没有苹果总部(蓝针),即使我放大。

在我OnViewLoad功能我:

mapView = [[MKMapView alloc] initWithFrame:self.view.bounds]; 

mapView.showsUserLocation=TRUE; 
mapView.mapType=MKMapTypeHybrid; 

[self.view insertSubview:mapView atIndex:0]; 
+4

苹果总部的第一条规则是:我们不谈苹果总部。 – MusiGenesis 2011-01-12 17:06:35

回答

1

在你-mapView:viewForAnnotation:方法,返回nil如果注释是用户位置对象:

- (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation { 
    if ([annotation isMemberOfClass:[MKUserLocation class]]) { 
     return nil; 
    } 
    // your normal code 
} 

这是需要确保iOS默认实现用于显示蓝色userLocation点。

相关问题