我無法說服爲什麼postalCode在iOS Google地圖SDK中獲得(null)。以下是我的代碼。iOS中的郵政編碼獲得(null)Google Maps SDK反向地理編碼
[[GMSGeocoder geocoder] reverseGeocodeCoordinate:CLLocationCoordinate2DMake(place.coordinate.latitude, place.coordinate.longitude) completionHandler:^(GMSReverseGeocodeResponse* response, NSError* error) {
NSLog(@"reverse geocoding results:");
for(GMSAddress* addressObj in [response results])
{
NSLog(@"coordinate.latitude=%f", addressObj.coordinate.latitude);
NSLog(@"coordinate.longitude=%f", addressObj.coordinate.longitude);
NSLog(@"thoroughfare=%@", addressObj.thoroughfare);
NSLog(@"locality=%@", addressObj.locality);
NSLog(@"subLocality=%@", addressObj.subLocality);
NSLog(@"administrativeArea=%@", addressObj.administrativeArea);
NSLog(@"postalCode=%@", addressObj.postalCode);
NSLog(@"country=%@", addressObj.country);
NSLog(@"lines=%@", addressObj.lines);
}
}];
這裏是上述編碼的結果。
2015-12-21 17:36:58.138 coordinate.latitude=51.509980
2015-12-21 17:36:58.138 coordinate.longitude=-0.133700
2015-12-21 17:36:58.138 thoroughfare=(null)
2015-12-21 17:36:58.138 locality=London
2015-12-21 17:36:58.138 subLocality=(null)
2015-12-21 17:36:58.139 administrativeArea=(null)
2015-12-21 17:36:58.139 postalCode=(null)
2015-12-21 17:36:58.139 country=United Kingdom
2015-12-21 17:36:58.142 lines=(
"",
"London, UK"
)
請幫我解決這個問題。