我正在开发一个应用程序,可以保存用户当前位置的街道。我已经有了位置,我正在使用地理编码器来获取街道和号码:
- (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];
}
一切正常,但我在阿根廷,placemark的sub大道字段总是为空。
我发现了一些与此相关的东西:https://stackoverflow.com/questions/7335094/mapkit-stopped-sending-subthoroughfare-when-the-coordinates-dont-correspond-to,但我总是得到空,即使在准确的位置(在阿根廷)。在安卓系统中,我可以毫无问题地获取街道号码。
如有任何建议,我们将不胜感激
好的,最后我使用google api来返回位置解决了这个问题。