rather use new place_type in getAddressNames()

If for a boundary the place_type is defined, handle the address
part like a place node. This is the same behaviour as before
when class/type where patched earlier.
This commit is contained in:
Sarah Hoffmann 2020-03-29 20:49:35 +02:00
parent 101f04bbf2
commit 60c4c9ef2c

View File

@ -6,6 +6,13 @@ function getInfo($aPlace)
{
$aClassType = getList();
if ($aPlace['type'] == 'administrative' && isset($aPlace['place_type'])) {
$sName = 'place:'.$aPlace['place_type'];
if (isset($aClassType[$sName])) {
return $aClassType[$sName];
}
}
if (isset($aPlace['admin_level'])) {
$sName = $aPlace['class'].':'.$aPlace['type'].':'.$aPlace['admin_level'];
if (isset($aClassType[$sName])) {