X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3a2ddbe2e0f3320b9f21ae6f299d10477553d13d..e0e18e2b6f4b5e12f35aa80a41c77263221bd730:/lib/ClassTypes.php diff --git a/lib/ClassTypes.php b/lib/ClassTypes.php index 5a69d1de..752db865 100644 --- a/lib/ClassTypes.php +++ b/lib/ClassTypes.php @@ -18,6 +18,8 @@ function getLabelTag($aPlace, $sCountry = null) $sLabel = $aPlace['place_type']; } elseif ($aPlace['class'] == 'boundary' && $aPlace['type'] == 'administrative') { $sLabel = getBoundaryLabel($iRank/2, $sCountry); + } elseif ($aPlace['type'] == 'postal_code') { + $sLabel = 'postcode'; } elseif ($iRank < 26) { $sLabel = $aPlace['type']; } elseif ($iRank < 28) { @@ -84,8 +86,17 @@ function getBoundaryLabel($iAdminLevel, $sCountry, $sFallback = 'Administrative' 8 => 'City', 9 => 'City District', 10 => 'Suburb', - 11 => 'Neighbourhood' - ) + 11 => 'Neighbourhood', + 12 => 'City Block' + ), + 'no' => array ( + 3 => 'State', + 4 => 'County' + ), + 'se' => array ( + 3 => 'State', + 4 => 'County' + ) ); if (isset($aBoundaryList[$sCountry]) @@ -264,6 +275,7 @@ function getImportance($aPlace) if ($aWithImportance === null) { $aWithImportance = array_flip(array( + 'boundary:administrative', 'place:country', 'place:state', 'place:province',