如何在uiimagepickercontroller中编写/获取经纬度和图像? [英] How to write/get latitude longitude with image in uiimagepickercontroller?

查看:184
本文介绍了如何在uiimagepickercontroller中编写/获取经纬度和图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  UIImageWriteToSavedPhotosAlbum(image,self, @selector(image:didFinishSavingWithError:contextInfo :),nil); 

现在我想将当前的经度和纬度与该图片关联。



我该怎么做?



我可以使用它的mediaInfo字典(元数据)吗?



我在ios sdk 3.0中工作。



请告诉我如何在 UIImageViewPickerController中获取/设置地理数据

解决方案

AFAIK iOS 4.0及更低版本不支持此功能。



从iOS 4.1开始,您可以使用 - [ALAssetsLibrary writeImageToSavedPhotosAlbum:metadata:completionBlock:] 来保存具有元数据的图像(未经测试,但我认为这应该工作)。不过,我不知道如何格式化元数据字典。



您应该尝试从资产库中读取包含地理数据的现有图像,以检查字典必须如何格式化。


Currently I am saving and image with the following method in "saved photos album".

UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);

Now I want to associate the current latitude and longitude with that image.

How can I do so ?

Can I do with its mediaInfo dictionary (metadata).

I am working in ios sdk 3.0 .

Please tell me How to get /set geo data with an image in UIImageViewPickerController

解决方案

AFAIK this is not supported in iOS 4.0 and lower.

As of iOS 4.1, you can use -[ALAssetsLibrary writeImageToSavedPhotosAlbum:metadata:completionBlock:] to save images with metadata (untested but I assume this should work). I do not know how to format the metadata dictionary, though.

You should try to read some existing images that contain geodata from the assets library to check how the dictionary must be formatted.

这篇关于如何在uiimagepickercontroller中编写/获取经纬度和图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆