How Do I Get The Correct Latitude and Longitude From An Uploaded iPhone Photo?

前端 未结 5 1682
难免孤独
难免孤独 2020-12-03 00:27

My problem actually seems rather silly... I am writing an iPhone application that uses MKMapKit. The app grabs the EXIF metadata from a provided geotagged photo. The problem

5条回答
  •  独厮守ぢ
    2020-12-03 00:49

    This also will works,

    void (^ALAssetsLibraryAssetForURLResultBlock)(ALAsset *) = ^(ALAsset *asset)
        {
            ALAssetRepresentation *rep = [asset defaultRepresentation];
            NSDictionary *metadata = rep.metadata;
    
            NSMutableDictionary *GPSDictionary = [[[metadata objectForKey:(NSString *)kCGImagePropertyGPSDictionary]mutableCopy] autorelease];
    
        };
    

提交回复
热议问题