ADBHausnummer: Fixed getting GPS Coords
This commit is contained in:
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user