each address line must fill at most one geocodejson field

This fixes an issue where a postcode with rank_address 5
would also appear in the state field.
This commit is contained in:
Sarah Hoffmann 2020-05-27 11:16:27 +02:00
parent c43b39bd88
commit e0d29f398e

View File

@ -117,8 +117,12 @@ class AddressDetails
if ($aLine['type'] == 'postcode' || $aLine['type'] == 'postal_code') {
$aJson['postcode'] = $aLine['localname'];
} elseif ($aLine['type'] == 'house_number') {
continue;
}
if ($aLine['type'] == 'house_number') {
$aJson['housenumber'] = $aLine['localname'];
continue;
}
if ($this->iPlaceID == $aLine['place_id']) {