2013-01-02 1 views
0

사라지고, 나는 매우 끝에 this 튜토리얼지도보기가 핀 위치를 표시하고 내가 전에지도 뷰를 사용한 적이

을 다음되었다, 내 시뮬레이터는 점을가하려면에서 가정되는 방법을 보여줍니다 위치에 있지만 그 다음 즉시 파란색 화면으로 바뀝니다.

블루 스크린은 여전히 ​​Google지도에 있습니다 (하단에는 Google 로고가 표시됨).하지만 더 이상 표시하려고하지 않습니다.

- (void)viewDidLoad 
{ 
    HandbookAppDelegate *delegate = (HandbookAppDelegate *)[[UIApplication sharedApplication] delegate]; 
    Rule *thisRule = [delegate.rules objectAtIndex:index.row]; 

    self.title = thisRule.ruleNumber; 

    // Set some coordinates for our position (Buckingham Palace!) 
    CLLocationCoordinate2D location; 
    location.latitude = (double) 51.501468; 
    location.longitude = (double) -0.141596; 

    // Add the annotation to our map view 
    MapViewAnnotation *newAnnotation = [[MapViewAnnotation alloc] initWithTitle:@"Buckingham Palace" andCoordinate:location]; 
    [self.map addAnnotation:newAnnotation]; 
    [newAnnotation release]; 
} 

- (void)mapView:(MKMapView *)mv didAddAnnotationViews:(NSArray *)views 
{ 
    MKAnnotationView *annotationView = [views objectAtIndex:0]; 
    id <MKAnnotation> mp = [annotationView annotation]; 
    MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance([mp coordinate], 1500, 1500); 
    [mv setRegion:region animated:YES]; 
    [mv selectAnnotation:mp animated:YES]; 
} 

답변

0

내 자신의 솔루션을 발견 할 수 있었다 :

First it looks like this After a moment it looks like this

여기 내 코드의 일부이다. 그것이 어리석은 것으로 밝혀졌습니다.

내 MKMapView에 대한 xib의 "사용자 위치 표시"가 켜져있어 방해가되었습니다. 내가 껐을 때 문제가 사라졌습니다.

관련 문제