MKReverseGeocoder *geoCoder = [[[MKReverseGeocoder alloc] initWithCoordinate:coordinate2D] autorelease];
geoCoder.delegate = self;
[geoCoder start];
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlace:(MKPlace *)place
{
NSString *local=place.locality;
if (local) {
NSString *address = [NSString stringWithFormat:@"%@ %@ %@ %@ %@%@",
place.country,
place.administrativeArea,
place.locality,
place.subLocality,
place.thoroughfare,
place.subThoroughfare];
NSLog(@"经纬度所对应的详细:%@", address);
}
}
Q:为什么address取到的值都是拼音呢,而不是中文??比如说place.country得到的值是China,place.administrativeArea得到的值是guangdong。
geoCoder.delegate = self;
[geoCoder start];
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlace:(MKPlace *)place
{
NSString *local=place.locality;
if (local) {
NSString *address = [NSString stringWithFormat:@"%@ %@ %@ %@ %@%@",
place.country,
place.administrativeArea,
place.locality,
place.subLocality,
place.thoroughfare,
place.subThoroughfare];
NSLog(@"经纬度所对应的详细:%@", address);
}
}
Q:为什么address取到的值都是拼音呢,而不是中文??比如说place.country得到的值是China,place.administrativeArea得到的值是guangdong。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货