GMSReverseGeocodeResponse
содержит
- (GMSReverseGeocodeResult *)firstResult;
определение которого выглядит так:
@interface GMSReverseGeocodeResult : NSObject<NSCopying>
/** Returns the first line of the address. */
- (NSString *)addressLine1;
/** Returns the second line of the address. */
- (NSString *)addressLine2;
@end
Есть ли способ получить страну, код страны ISO, state (Administrative_area_1 или соответствующий) из этих двух строк (действительный для всех стран и всех адресов)?
ПРИМЕЧАНИЕ. Я попытался выполнить этот фрагмент кода
[[GMSGeocoder geocoder] reverseGeocodeCoordinate:CLLocationCoordinate2DMake(40.4375, -3.6818) completionHandler:^(GMSReverseGeocodeResponse *resp, NSError *error)
{
NSLog( @"Error is %@", error) ;
NSLog( @"%@" , resp.firstResult.addressLine1 ) ;
NSLog( @"%@" , resp.firstResult.addressLine2 ) ;
} ] ;
Но почему-то обработчик никогда не вызывался. Я добавил ключ приложения, а также добавил идентификатор пакета iOS к ключу приложения. В консоли не отображается ошибка. Я имею в виду, что я не знаю содержание строк.