2012-08-15 2 views
1

이 코드 블록이 실행되지 않는 이유는 누구에게 말해 줄 수 있습니까? 다른 프로젝트에서 복사하여 붙여 넣었습니다. 제대로 작동합니다. 나는 또한 여기에 연결하고있는 동일한 addressString을 가진 다른 앱에서 시도했다. 그리고 완벽하게 작동했다.
kCLErrorDomain 오류이 documentationiOS 정방향 지오 코딩이 실행되지 않음

를 참조하시기 바랍니다가에 따르면 8

답변

1

:하지만 내가 주소를 전달하는 경우 문자열 변수를 통과하면서 직접 잘

NSString *addressString = @"2642 Broadway, New York, NY 10025, USA"; 
[forwardGeocoder1 geocodeAddressString:addressString 
          completionHandler:^(NSArray *placemarks, NSError *error){ 

           // Make sure the geocoder did not produce an error 
           // before continuing 
           if(!error){ 

            // Iterate through all of the placemarks returned 
            // and output them to the console 
            for(CLPlacemark *placemark in placemarks){ 

           NSLog(@"found"); 

            } 
           } 
           else{ 
            // Our geocoder had an error, output a message 
            // to the console 
            NSLog(@"There was a forward geocoding error\n%@", 
             [error localizedDescription]); 
           } 
          } 
     ]; 

오류를 작동 geocodeaddressstring하는 OLY를 발생 설명서, kCLErrorDomain error 8 의미 : kCLErrorGeocodeFoundNoResult

+0

NSString * addressString = [addressArray objectatindex : 0]과 같은 주소를 전달하면; 그런 다음 위 오류가 발생하는 경우 – Arvind

+0

@Arvind 전체 코드를 붙여 넣으십시오. 그것은 상황을 이해하는 데 도움이 될 것입니다. –

관련 문제