iPhone - access location information from a photo

后端 未结 2 1930
迷失自我
迷失自我 2020-12-30 10:23

Is it possible, in an iPhone app, to extract location information (geocode, I suppose it\'s called) from a photo taken with the iPhone camera?

If there is no API ca

2条回答
  •  醉酒成梦
    2020-12-30 11:05

    I think the selected answer is wrong, actually. Well, not wrong. Everything it said is correct, but there is a way around that limitation.

    UIImagePickerController passes a dictionary along with the UIImage it returns. One of the keys is UIImagePickerControllerMediaURL which is "the filesystem URL for the movie". However, as noted here in newer iOS versions it returns a url for images as well. Couple that with the exif library mentioned by @Jasper and you might be able to pull geotags out of photos.

    I haven't tried this method, but as @tomtaylor mentioned, this has to be possible somehow, as there are a few apps that do it. (e.g. Lab).

提交回复
热议问题