I am trying to get location information from photos and videos that an user selects from iPhone's library. I am using a custom image picker that uses ALAssetsLibrary to read the photos and videos.
I am trying to get the location information using ALAssetPropertyLocation
like this:
CLLocation *location = [myAsset valueForProperty:ALAssetPropertyLocation];
but location
always comes up in the logs as
<nan, nan> +/- 0.00m (speed -1.00 mps / course -1.00) @ 9/21/11 1:37:56 PM Central European Summer Time
I've tried looking at myAsset.defaultRepresentation.metadata
property and GPS location IS there but only for photos. For videos myAsset.defaultRepresentation.metadata
is nil
.
Any help would be great appreciated!
UPDATE
It looks like this guy here had a similar problem. But it only happened for him on a 3GS while having no problems on the iPhone 4. I am currently testing on an iPhone 4 and still getting the invalid location information.