You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I managed to get the current location of a photo that is taken with the iPhone camera but how can I get the location of a photo that was chosen from the library? Is this possible to do this, as for now when I choose a photo from the library it's location is set to the current location and not where the photo was taken.
I managed to get the current location of a photo that is taken with the iPhone camera but how can I get the location of a photo that was chosen from the library? Is this possible to do this, as for now when I choose a photo from the library it's location is set to the current location and not where the photo was taken.
in:
imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
I use this to get location of the photo taken with the camera:
NSMutableDictionary *metadata = [[NSMutableDictionary alloc] initWithDictionary:[info objectForKey:UIImagePickerControllerMediaMetadata]];
[metadata setLocation:currentLocation];
NSLog(@"Metadata location for taken photo:\n%@", metadata.location);
The log says:
Metadata location for taken photo:
<+55.60409927,+12.99382114> +/- 0.00m (speed -1.00 mps / course -1.00) @ 2014-05-08 kl. 10:55:12 Centraleuropa, sommartid
But when i use:
NSMutableDictionary *metadata = [[NSMutableDictionary alloc] initWithInfoFromImagePicker:info];
NSLog(@"Metadata for chosen photo:\n%@", metadata);
The log says:
Metadata for chosen photo:
{
}
could you help me understand how to use your category properly for images chosen from the library?
The text was updated successfully, but these errors were encountered: