使用Cordova-plugin-camera-with-exif的1.5. 1版本和基于類星體3 typescript的,當(dāng)從cordova捕獲的圖像中提取exif數(shù)據(jù)時(shí),我能夠獲取一些元數(shù)據(jù),但無法獲取gps。
{ "aperture": "2.0", "datetime": "2022:10:27 01:41:55", "exposureTime": "0.120003", "flash": "0", "focalLength": "3500/1000", "gpsAltitude": null, "gpsAltitudeRef": null, "gpsDateStamp": null, "gpsLatitude": null, "gpsLatitudeRef": null, "gpsLongitude": null, "gpsLongitudeRef": null, "gpsProcessingMethod": null, "gpsTimestamp": null, "iso": "807", "make": "motorola", "model": "moto g pro", "orientation": "0", "whiteBalance": "0" }
Cordova & Cordova android > 10.1.1
PS:我的設(shè)備上啟用了Gps。
以下是我的配置:
quality: 30,
destinationType: Camera.DestinationType.FILE_URI,
encodingType: Camera.EncodingType.JPEG,
sourceType: Camera.PictureSourceType.CAMERA ,
mediaType: Camera.MediaType.PICTURE,
cameraDirection: Camera.Direction.BACK,
correctOrientation: true
我錯(cuò)過了什么?
在android中,我們需要在相機(jī)設(shè)置中激活保存位置功能。要繼續(xù),有2個(gè)權(quán)限。
more infos : https://support.google.com/photos/answer/9921876#zippy=%2Chtc-devices%2Cmotorola-devices%2Cios-devices