MKReverseGeocoder を使用して緯度/経度の特定のリストのアドレスを表示しようとしています:687 サーバーが返されました
foursquare アプリと同じように、緯度/経度の動的リストがあります。
私のコードの一部: pData には緯度/経度のリストが含まれています
-(void)network:(WNetwork*)network didFinishLoadingWithRequest:(NSInteger)pReq data:(NSMutableDictionary*)pData{
for (NSDictionary *dic in pData) {
CLLocationCoordinate2D coord;
coord.longitude = [[dic objectForKey:@"long"]doubleValue];
coord.latitude = [[dic objectForKey:@"Lat"]doubleValue];
MKReverseGeocoder *geocoder = [[MKReverseGeocoder alloc] initWithCoordinate:coord];
[geocoder setDelegate:self];
[geocoder start];
}
}
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark
{
NSLog(@"The geocoder has returned: %@", [placemark addressDictionary]);
}
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error{
NSLog(@"error people: %@", error);
}
これで私を助けることができますか!
たくさんありがとう