用ExifInterface读取经纬度的时候遇到的一个问题

如果读取图片经纬度,使用

 String latValue = exifInterface.getAttribute(ExifInterface.TAG_GPS_LATITUDE);
 String lngValue=exifInterface.getAttribute(ExifInterface.TAG_GPS_LONGITUDE);

直接读取经纬度的话会返回null

String latValue = exifInterface.getAttribute(ExifInterface.TAG_GPS_LATITUDE);
String lngValue = exifInterface.getAttribute(ExifInterface.TAG_GPS_LONGITUDE);
String latRef = exifInterface.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF);
String lngRef = exifInterface.getAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF);

同时读取经纬度加经纬度参考信息才能获取正确的信息

具体原因不详,实践出来的结果。。。求教地理大佬

坑了我半天!!!!!!!!!!

posted on 2017-10-28 01:56  ggrc  阅读(393)  评论(0编辑  收藏  举报

导航