renaming some variables
This commit is contained in:
parent
2bc12a86d1
commit
0dcb96d565
1 changed files with 12 additions and 12 deletions
|
@ -702,31 +702,31 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showOnMap() {
|
private fun showOnMap() {
|
||||||
val exif: ExifInterface
|
val exif = try {
|
||||||
try {
|
ExifInterface(getCurrentPath())
|
||||||
exif = ExifInterface(getCurrentPath())
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
showErrorToast(e)
|
showErrorToast(e)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val lat = exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE)
|
|
||||||
val lat_ref = exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF)
|
|
||||||
val lon = exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE)
|
|
||||||
val lon_ref = exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF)
|
|
||||||
|
|
||||||
if (lat == null || lat_ref == null || lon == null || lon_ref == null) {
|
val lat = exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE)
|
||||||
|
val latRef = exif.getAttribute(ExifInterface.TAG_GPS_LATITUDE_REF)
|
||||||
|
val lon = exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE)
|
||||||
|
val lonRef = exif.getAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF)
|
||||||
|
|
||||||
|
if (lat == null || latRef == null || lon == null || lonRef == null) {
|
||||||
toast(R.string.unknown_location)
|
toast(R.string.unknown_location)
|
||||||
} else {
|
} else {
|
||||||
val geoLat = if (lat_ref == "N") {
|
val geoLat = if (latRef == "N") {
|
||||||
convertToDegree(lat)
|
convertToDegree(lat)
|
||||||
} else {
|
} else {
|
||||||
0 - convertToDegree(lat)
|
-convertToDegree(lat)
|
||||||
}
|
}
|
||||||
|
|
||||||
val geoLon = if (lon_ref == "E") {
|
val geoLon = if (lonRef == "E") {
|
||||||
convertToDegree(lon)
|
convertToDegree(lon)
|
||||||
} else {
|
} else {
|
||||||
0 - convertToDegree(lon)
|
-convertToDegree(lon)
|
||||||
}
|
}
|
||||||
|
|
||||||
val uriBegin = "geo:$geoLat,$geoLon"
|
val uriBegin = "geo:$geoLat,$geoLon"
|
||||||
|
|
Loading…
Reference in a new issue