2013-01-19 29 views
0

我正在開發基於地理編碼的應用程序。我在地理編碼器委託方法內使用地標地址字典方法。除了印度的郵政編碼外,我可以獲得所有的細節(街道,城市,州,縣,國家代碼和所有)。爲什麼郵政編碼缺失?任何建議都讚賞使用MKReverseGeocoder獲取印度位置的郵政編碼

我的代碼:

-(void)locationUpdate:(CLLocation *)location 

{ 

currentLocation= [location coordinate]; 

if (currentLocation.latitude!=checking.latitude) 
{ 
    NSDate *currentTime =[NSDate date]; 

    fireTime = currentTime; 

    checking.latitude=currentLocation.latitude; 
    checking.longitude=currentLocation.longitude; 

} 
MKReverseGeocoder *geocoder = [[MKReverseGeocoder alloc] initWithCoordinate:[location coordinate]]; 
[geocoder setDelegate:self]; 
[geocoder start]; 
} 


-(void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark 

{ 
    NSLog(@"placemark.postalCode ***********%@",placemark.postalCode); 
} 

我得到這個輸出作爲地理編碼器返回:

{ 

City = Vishakhapatnam; 
Country = India; 
CountryCode = IN; 
FormattedAddressLines =  (
    NH5, 
    Vishakhapatnam, 
    "Andhra Pradesh", 
    India 
); 
State = "Andhra Pradesh"; 
Street = NH5; 
Thoroughfare = NH5; 

} 



placemark.postalCode *********** (null) 

其工作正常,其他國家,但我沒有得到郵編爲印度地點。我怎樣才能得到印度地區的郵政編碼?

+0

兄弟,如果您仍在使用iOS Maps API,則需要弄清楚。 – MCKapur

回答

相關問題