Building/Form: get gps again, if address changed

This commit is contained in:
Frank Schubert
2021-07-20 20:35:42 +02:00
parent 550ee56cdc
commit a1f47267c8
2 changed files with 18 additions and 2 deletions

View File

@@ -113,7 +113,7 @@ class BuildingController extends mfBaseController {
}
// get GPS location
if(!$building->gps_lat && !$building->gps_long) {
if((!$building->gps_lat && !$building->gps_long) || $r->gps_again ) {
$search = [
'country' => "AT",
'city' => $building->city,
@@ -134,7 +134,7 @@ class BuildingController extends mfBaseController {
$building->code = $building->getNewObjectCode();
$building->save();
}
if(!$building->laea) {
if(!$building->laea || $r->gps_again) {
$building->laea = $building->getLaeaCoordinates();
$building->save();
}