在执行代码时显示(null) (null),Ahmedabad Gujarat (null) (null)
。
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
_CurrentLocation = newLocation.coordinate;
CLGeocoder * geoCoder = [[CLGeocoder alloc] init];
[geoCoder reverseGeocodeLocation:newLocation completionHandler:^(NSArray *placemarks, NSError *error)
{
for (CLPlacemark * placemark in placemarks)
{
NSString *addressTxt = [NSString stringWithFormat:@"%@ %@,%@ %@ %@ %@",
[placemark subThoroughfare],[placemark thoroughfare],
[placemark locality], [placemark administrativeArea], [placemark subLocality],[placemark subAdministrativeArea]];
NSLog(@" >> %@",addressTxt);
self.strLocation = [placemark locality];
}
}];
}
如何获得其他价值?位置服务是否不会在我的区域提供这些数据? 如果没有那么任何替代方法来获取这些数据?