ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.53k stars 982 forks source link

[Feature]: Add geolocation EXIF data to images captured with the camera #7547

Closed nelsonvassalo closed 1 week ago

nelsonvassalo commented 2 weeks ago

Description

Add the additional EXIF data to images captured with the camera, in the same way images from the gallery already do.

Platforms

Request or proposed solution

GPSLatitude, GPSLatitudeRef, GPSLongitude and GPSLongitudeRef should be in the EXIF data. Right now exif does not include those on iOS platform

Alternatives

No response

Additional Information

It seems it is implemented https://github.com/ionic-team/capacitor/pull/2284 but works only on Android, not on iOS.

Example repo

Additionally, we should be able to retrieve information after capture or selection from gallery. If we are selecting an image via the prompt, there's no way of knowing whether the image was captured or selected from gallery.

jcesarmobile commented 1 week ago

the provided repository is not accessible, can you make it public or provide the correct url?

nelsonvassalo commented 1 week ago

I apologize, it's public now

jcesarmobile commented 1 week ago

I've verified that the code is correct, as you can see, the geolocation information is correctly returned when picking an image from the gallery that has geolocation information.

But when taking a new picture from the app, the native component used by the plugin doesn't capture geolocation information, so the plugin can't return it because it's not there to return.

nelsonvassalo commented 1 week ago

@jcesarmobile But when taking a new picture from the app, the native component used by the plugin doesn't capture geolocation information, so the plugin can't return it because it's not there to return.

This is the core problem. Can't we retrieve it?

nelsonvassalo commented 4 days ago

Excuse me, why are my comments marked as abuse? And why was the issue closed? It persists…

ryaa commented 3 days ago

I've verified that the code is correct, as you can see, the geolocation information is correctly returned when picking an image from the gallery that has geolocation information.

It seems that no coordinates are returned when a photo(s) are picked on an Android device - see https://github.com/ionic-team/capacitor-plugins/issues/2147