iOS地址批量编码

 CLLocation *c = [[CLLocation alloc] initWithLatitude:39.990459 
longitude:116.481476];
    //创建位置
    CLGeocoder *revGeo = [[CLGeocoder alloc] init];
    [revGeo reverseGeocodeLocation:c
     //反向地理编码
             completionHandler:^(NSArray *placemarks, NSError *error) {
                 if (!error && [placemarks count] > 0)
                 {
                     NSDictionary *dict =
                     [[placemarks objectAtIndex:0] addressDictionary]; 
NSLog(@"street address: %@",[dict objectForKey :@"Street"]);
                 }
                 else
                 {
                     NSLog(@"ERROR: %@", error); }
             }];

你可能感兴趣的:(iOS地址批量编码)