This commit is contained in:
lunaticbum 2025-03-20 18:08:33 +09:00
parent c3d2599754
commit 1a3b2068d9

View File

@ -149,12 +149,14 @@ class BlogController() {
try { try {
var addrs = GeocodingApi.reverseGeocode(GeoApiContext.Builder().apiKey(it).build(), LatLng(this?.firstPostLat!!,this?.firstPostLon!!)).await() var addrs = GeocodingApi.reverseGeocode(GeoApiContext.Builder().apiKey(it).build(), LatLng(this?.firstPostLat!!,this?.firstPostLon!!)).await()
this.firstAddress = addrs.first().formattedAddress this.firstAddress = addrs.first().formattedAddress
postManageg.save(this)
} catch (e: Exception) {} } catch (e: Exception) {}
} }
if (this?.modifyAddress?.length ?: 0 < 4){ if (this?.modifyAddress?.length ?: 0 < 4){
try { try {
var addrs = GeocodingApi.reverseGeocode(GeoApiContext.Builder().apiKey(it).build(), LatLng(this?.modifyLat!!,this?.modifyLon!!)).await() var addrs = GeocodingApi.reverseGeocode(GeoApiContext.Builder().apiKey(it).build(), LatLng(this?.modifyLat!!,this?.modifyLon!!)).await()
this.modifyAddress = addrs.first().formattedAddress this.modifyAddress = addrs.first().formattedAddress
postManageg.save(this)
} catch (e: Exception) {} } catch (e: Exception) {}
} }
} }