根据地理位置获取坐标:
CLGeocoder * grader =[[CLGeocoder alloc]init];
[groder geocodeAddressString:@"要获取坐标的地理位置" completionHandler:^(NSArray *placemarks, NSError *error) {
CLPlacemark *plm=placemarks.firstObject;
得到的经度=[NSString stringWithFormat:@"%f",plm.location.coordinate.latitude];
得到的纬度=[NSString stringWithFormat:@"%f",plm.location.coordinate.longitude];
}];
CLLocation * location=[[CLLocation alloc]initWithLatitude:经度坐标 longitude:纬度坐标;
[groder reverseGeocodeLocation:location completionHandler:^(NSArray *placemarks, NSError *error) {
CLPlacemark *clp= placemarks.firstObject;
得到的地理位置=[NSString stringWithFormat:@"%@",clp.name];
}];