我需要格式化我的坐标是这样的:如何格式化这样的坐标?
N 61° 14.5919'
E 23° 28.1751'
现在我的坐标是这样的:
61.145919
23.281751
我的代码:
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
latitudeLabel.text = [NSString stringWithFormat:@"%f", newLocation.coordinate.latitude];
longitudeLabel.text = [NSString stringWithFormat:@"%f", newLocation.coordinate.longitude];
}
[这] [1]的信息可以帮助你。请享用! [1]:http://stackoverflow.com/questions/8851816/convert-decimal-coordinate-into-degrees-minutes-seconds-direction – parilogic 2012-08-09 07:42:34