I could only get it if I went through the ALAssetsLibrary method. Once you
get the asset you want you can use: asset.Location.Coordinate.Latitude and
asset.Location.Coordinate.Longitude.

After picking an image I call the following method and pass in the
NSDictionary. The iconID is just my stuff.
public static void GetGPS(NSDictionary editingInfo, string iconID)
//(UIImage image)
                {
                        try
                        {
                                var mediaUrlKey = new 
NSString("UIImagePickerControllerReferenceURL");
//UIImagePickerControllerMediaURL
                        var keyInfo = (NSUrl) 
editingInfo.ObjectForKey(mediaUrlKey);

                                
//http://developer.apple.com/library/ios/ipad/#qa/qa1654/_index.html
                                ALAssetsLibrary al = new ALAssetsLibrary();
                                al.AssetForUrl(keyInfo, (asset) => {
                                        if(asset.Location != null)
                                        {
                                                var nIcon = 
appDelegate.store.db.IconReadSafe(iconID);
                                                nIcon.latitude = 
asset.Location.Coordinate.Latitude.ToString();
                                                nIcon.longitude = 
asset.Location.Coordinate.Longitude.ToString();
                                                
appDelegate.store.db.IconSave(nIcon);
                                        }
                                }, (error) => {
                                        Log.WriteLog("Error in GetGPS 
"+error.LocalizedDescription);
                                });

                        }
                        catch(Exception ex)
                        {
                                Log.LogError("GetLongitude",ex);
                        }
                }



--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/Retrieving-EXIF-GPS-data-from-UIImage-tp4656547p4658177.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to