iphone 获取地址的详细信息
2010-12-30 04:38:28 来源:WEB开发网iphone获取地址的详细信息
- (id)initWithCoordinate:(CLLocationCoordinate2D)coordinate {
if (self = [super init]) {
// Custom initialization
reverseGeocoder = [[MKReverseGeocoder alloc] initWithCoordinate:coordinate];
reverseGeocoder.delegate = self;
[reverseGeocoder start];
//⋯⋯
}
return self;
}
#pragma mark MKReverseGeocoderDelegate
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error
{
NSString *errorMessage = [error localizedDescription];
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"获取详细信息失败"
message:errorMessage
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
[alertView release];
}
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
NSLog(@"%@",placemark.locality);
}
//=======================================================
Street = 科韵路 18号
Thoroughfare = 科韵路
SubThoroughfare = 18号
City = 广州市
SubLocality = 天河区
State = 广东省
SubAdministrativeArea = (null)
ZIP = (null)
Country = 中国
{
City = "广州市";
Country = "中国";
CountryCode = CN;
FormattedAddressLines = (
"中国",
"广东省广州市天河区",
"科韵路18号"
);
State = "广东省";
Street = "科韵路18号";
SubLocality = "天河区";
SubThoroughfare = "18号";
Thoroughfare = "科韵路";
}
MKPlacemark:
@property (nonatomic, readonly) NSDictionary *addressDictionary; //地址字典
- ››获取Android手机型号,系统版本,App版本号等信息
- ››获取Windows xp系统高权限无需注销用户
- ››获取checkedListBox 选中的项并且移动
- ››iphone图片拉伸的几种方法
- ››iphone正则表达式的简单使用
- ››获取ios手机的mac地址的函数
- ››iPhone开发Unresolved Symbols CAKeyframeAnimati...
- ››IPhone开发-“此证书是由未知颁发机构签名”解决方...
- ››IPhone开发-整合私钥和证书,生成.p12文件
- ››iPhone应用开发-UIPickerView选取器详解
- ››iphone 获取屏幕的宽度和高度
- ››iPhone读取工程包中的二进制文件
更多精彩
赞助商链接