ジオコーダーに基づくアプリケーションを開発しています。ジオコーダ デリゲート メソッド内で目印アドレス辞書メソッドを使用しています。インドの郵便番号を除くすべての詳細 (通り、都市、州、郡、国コード、およびすべて) を取得できます。郵便番号がないのはなぜですか? どんな提案でも大歓迎です
私のコード:
-(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)
他の国では問題なく動作しますが、インドの場所の郵便番号を取得できません。インドの場所の郵便番号も取得するにはどうすればよいですか?