iPhone 上的位置,subThoroughfare 为空
我正在开发一个应用程序,可以保存用户当前位置的街道。我已经知道了位置,并且正在使用地理编码器来获取街道和号码:
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
// with the placemark you can now retrieve the city name
[self setCity:placemark.subLocality];
[self setStreet:placemark.thoroughfare];
[self setNumber:placemark.subThoroughfare];
}
一切顺利,但我在阿根廷,并且地标的 subthoroughfare 字段始终为空。
我发现了与此相关的内容: https://stackoverflow .com/questions/7335094/mapkit-stopped-sending-subthoroughfare-when-the-colines-dont-correspond-to,但即使在精确的位置(在阿根廷),我也总是得到空值。在android中,我可以毫无问题地获取街道号码。
任何建议将不胜感激
I'm developing an app that saves the street of the user's current location. I already have the location, and I´m using geocoder to get the street and the number:
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
// with the placemark you can now retrieve the city name
[self setCity:placemark.subLocality];
[self setStreet:placemark.thoroughfare];
[self setNumber:placemark.subThoroughfare];
}
Everything goes all right, but I`m in Argentina, and the placemark's subthoroughfare field is always null.
I found something related to this: https://stackoverflow.com/questions/7335094/mapkit-stopped-sending-subthoroughfare-when-the-coordinates-dont-correspond-to , but i always get null even in exact positions (in Argentina). In android, i'm able to get streets numbers without any problem.
Any advice will be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,最后我使用 google api 重新获取位置解决了问题。
Ok, finally I solved the issue using the google apis to reatrive the location.