我想知道是否有人知道如何獲得經緯度地址列表?iOS - 獲取長/緯度的地址
我一直在使用下面的代碼,但它總是產生一個地址:
[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];
}];
檢查 這裏
getReverseGeocode
方法調用這個問題http://stackoverflow.com/questions/158557/get-street-address-at-lat-long-pair – Spire 2013-03-12 15:21:44http://stackoverflow.com/questions/13557026/can-you-create-an-annotation-in-mapview-from-an-address/13564318#13564318 – Rajneesh071 2013-03-12 15:37:56
你在尋找什麼樣的地址?你想要所有的郵寄地址或只是特定的地標(地點)? – Jeffrey 2013-05-09 19:37:04