【发布时间】:2012-07-09 11:40:55
【问题描述】:
我使用 CLGeocoder 从地理坐标中获取地址。
self.geocoder = [[CLGeocoder alloc] init];
///
[self.geocoder reverseGeocodeLocation:loc completionHandler:^(NSArray *placemarks, NSError *error) {
if (placemarks.count) {
CLPlacemark *placemark = [placemarks objectAtIndex:0];
NSString *string = ((NSString *)[[placemark addressDictionary] objectForKey:kABPersonAddressStreetKey];
}
}]);
据我了解,CLGeocoder 以“本地”本地化返回街道名称(如果我们在乌克兰并选择乌克兰语言环境 - 我们将获得乌克兰本地化街道名称)。
此代码返回我的字符串,本地化为我当前的位置(乌克兰)。 如果语言环境设置为另一个位置,它会给我街道的英文本地化名称。 如何强制 CLGeocoder 只给我特定位置的地址?
【问题讨论】:
标签: ios localization reverse-geocoding