ADBHausnummer: Fixed getting GPS Coords

This commit is contained in:
Frank Schubert
2025-09-30 14:40:42 +02:00
parent 80cdbcb4ca
commit 2cee7bc98d

View File

@@ -214,11 +214,13 @@ class ADBHausnummer extends mfBaseModel {
'zip' => $this->getProperty("plz")->plz,
'street' => $this->getProperty("strasse")->name
];
if($this->hausnummer) $search['street'] .= " ".$this->hausnummer;
if(!$search['country'] || !$search['city'] || !$search['zip'] || !$search['street']) {
$this->log->warning("[".$this->_ruid."] ".__METHOD__.": Unable to retrieve GPS Coordinates. Search key missing (hausnummer_id: ".$this->id.")");
return false;
}
//var_dump($search);exit;
$coords = Gmaps_Geocoding::getCoords($search);
if(is_array($coords) && count($coords) == 2 && $coords[0] && $coords[1]) {