ios location

CLGeocoder *geocoder = [[CLGeocoder alloc] init];

    [geocoder reverseGeocodeLocation:newLocation

                   completionHandler:^(NSArray *placemarks, NSError *error){

        

                      for (CLPlacemark *place in placemarks) {

                           NSLog(@"name,%@",place.name);                       // 位置名

                           NSLog(@"thoroughfare,%@",place.thoroughfare);       // 街道

                           NSLog(@"subThoroughfare,%@",place.subThoroughfare); // 子街道

                           NSLog(@"locality,%@",place.locality);               //

                           NSLog(@"subLocality,%@",place.subLocality);         //

                           NSLog(@"country,%@",place.country);                 // 国家                           

                       }

                       

    }];

posted on 2014-01-07 16:59  小白说我是2B  阅读(190)  评论(0编辑  收藏  举报

导航