mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
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:
@@ -117,8 +117,12 @@ class AddressDetails
|
|||||||
|
|
||||||
if ($aLine['type'] == 'postcode' || $aLine['type'] == 'postal_code') {
|
if ($aLine['type'] == 'postcode' || $aLine['type'] == 'postal_code') {
|
||||||
$aJson['postcode'] = $aLine['localname'];
|
$aJson['postcode'] = $aLine['localname'];
|
||||||
} elseif ($aLine['type'] == 'house_number') {
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($aLine['type'] == 'house_number') {
|
||||||
$aJson['housenumber'] = $aLine['localname'];
|
$aJson['housenumber'] = $aLine['localname'];
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->iPlaceID == $aLine['place_id']) {
|
if ($this->iPlaceID == $aLine['place_id']) {
|
||||||
|
|||||||
Reference in New Issue
Block a user