如何使用 MKPlacemark 获取门牌号
我可以通过将此代码应用于 MKReversegeocoder
来获取街道和城市,
NSString* city = [placemark.addressDictionary valueForKey:@"City"];
NSString* street = [placemark.addressDictionary valueForKey:@"Street"];
现在我正在尝试获取街道号码,这可能吗?
i can get the street and city by applying this code to the MKReversegeocoder
NSString* city = [placemark.addressDictionary valueForKey:@"City"];
NSString* street = [placemark.addressDictionary valueForKey:@"Street"];
now i am trying to get the street number is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您正在寻找的是
MKPlacemark
的subThoroughfare
属性。请注意,在 iOS 5.0+ 中,subThoroughfare
未在MKPlacemark
上声明。它现在从新的超类CLPlacemark
继承了这一点。I think what you're looking for is the
subThoroughfare
property ofMKPlacemark
. Note that in iOS 5.0+,subThoroughfare
isn't declared onMKPlacemark
. It now inherits this from the new superclass,CLPlacemark
.