Reading the GPS data from the image returned by the camera in iOS iphone

后端 未结 9 1327
余生分开走
余生分开走 2020-11-29 21:36

I need to get the GPS coordinates of an image taken with the iOS device\'s camera. I do not care about the Camera Roll images, just the image taken with UIImagePickerControl

9条回答
  •  天命终不由人
    2020-11-29 22:10

    In your UIImagePickerController delegate, do the following:

    - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
    {
      NSDictionary *metadata = [info valueForKey:UIImagePickerControllerMediaMetadata];
    
      // metadata now contains all the image metadata.  Extract GPS data from here.
    }
    

提交回复
热议问题