Dil*_* Jr 6 xcode location map ios
我得到了用户位置,现在我想以某种方式确定最近的交叉点/十字路口.例如:我在第五大道.在44和45之间.Mapkit将给我第5个av作为当前地址,但我找不到检测两个交叉点的方法.
这可能吗?
我没有坚持使用地图套件,我唯一想要的是返回街道名称的方法或类.因此,如果有其他服务或工具包来确定,那将是完美的.
CLLocation *currentLocation = [locations lastObject];
[_geocoder reverseGeocodeLocation:currentLocation completionHandler:^(NSArray *placemarks, NSError *error) {
if (error == nil && [placemarks count] > 0)
{
_currentPlaceMark = [placemarks lastObject];
_posicaoAtual.text = [NSString stringWithFormat:@"%@ | %@-%@",
[_currentPlaceMark valueForKey:@"thoroughfare"],
[_currentPlaceMark valueForKey:@"locality"],
[_currentPlaceMark valueForKey:@"administrativeArea"]];
}
} ];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
274 次 |
| 最近记录: |