我正在使用我的新超能力从iOS4+上的资产库加载图像,并读取照片拍摄的位置。
例如我有
+/-0.00 m(速度-1.00 mps/航向-1.00)@11/11/10 19:32:41 Heure normale de l\u2019欧洲中央车站
这当然违背了我的准则:
CLLocation *loc = ((CLLocation*)[asset valueForProperty:ALAssetPropertyLocation]);
CLLocationCoordinate2D gpsLocation = loc.coordinate;
double acc = loc.horizontalAccuracy;
NSLog(@"Accuracy:%f", acc);
if(acc >0){
detailItem.latitude = [NSNumber numberWithDouble:gpsLocation.latitude];
detailItem.longitude = [NSNumber numberWithDouble:gpsLocation.longitude];
}
NSDate *time = loc.timestamp;
if(time != nil){
detailItem.latitude = [NSNumber numberWithDouble:gpsLocation.latitude];
detailItem.longitude = [NSNumber numberWithDouble:gpsLocation.longitude];
}
我通常用准确度,但这里不是否定的。