1

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.

Community
  • 1
  • 1
Mihai Fratu
  • 7,579
  • 2
  • 37
  • 63
  • Not really no :( In the end I haven't needed it anymore in the project I was working on and I haven't looked for a solution anymore. If you have any suggestions it would be great though. – Mihai Fratu Mar 06 '12 at 15:27
  • Check this http://stackoverflow.com/questions/9581515/alassetpropertylocation-returning-nil – NSCry Mar 06 '12 at 16:07

0 Answers0