我想知道是否有人知道如何获取经度和纬度周围的地址列表?
我一直在使用以下代码,但它总是产生一个地址:
[self.geocoder reverseGeocodeLocation: currentLocation completionHandler:
^(NSArray *placemarks, NSError *error) {
for (int i = 0; i < placemarks.count; i++)
{
CLPlacemark *placemark = [placemarks objectAtIndex:i];
if (placemark.addressDictionary != nil)
{
Location *aLocation = [[Location alloc] init];
aLocation.locationName = [placemark.addressDictionary valueForKey:@"Name"];
aLocation.locationAddress = [placemark.addressDictionary valueForKey:@"City"];
aLocation.currentLocation = placemark.location;
[self.tableData addObject:aLocation];
}
}
[self.locationsTableView reloadData];
}];