iphone 获取地址的详细信息
来源:易贤网 阅读:580 次 日期:2014-11-19 11:40:02
温馨提示:易贤网小编为您整理了“iphone 获取地址的详细信息”,方便广大网友查阅!

首页完成改版,来提意见

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; //地址字典

@property (nonatomic, readonly) nsstring *thoroughfare; //街道名——“科韵路”

@property (nonatomic, readonly) nsstring *subthoroughfare; // 门牌号——“18号”

@property (nonatomic, readonly) nsstring *locality; //城市——“广州市”

@property (nonatomic, readonly) nsstring *sublocality; //区县——“天河区”

@property (nonatomic, readonly) nsstring *administrativearea; //身份——“广东省”

@property (nonatomic, readonly) nsstring *subadministrativearea; //没获取到,不知道是什么东东

@property (nonatomic, readonly) nsstring *postalcode; //邮政编码——不知道是什么原因,这里没获取到

@property (nonatomic, readonly) nsstring *country; //国家——“中国”

@property (nonatomic, readonly) nsstring *countrycode; //国家代码——“cn”

更多信息请查看IT技术专栏

更多信息请查看技术文章
易贤网手机网站地址:iphone 获取地址的详细信息
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 云南省教育厅备案号:云教ICP备0901021 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标