X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/aa4bd006312e6a0acbd728dec9daa4f745741390..ce1c3bab6d94163656c3bb06f735b27e6be2198b:/lib/ClassTypes.php?ds=sidebyside diff --git a/lib/ClassTypes.php b/lib/ClassTypes.php index 4077d211..bb7b0486 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,7 +86,8 @@ function getBoundaryLabel($iAdminLevel, $sCountry, $sFallback = 'Administrative' 8 => 'City', 9 => 'City District', 10 => 'Suburb', - 11 => 'Neighbourhood' + 11 => 'Neighbourhood', + 12 => 'City Block' ), 'no' => array ( 3 => 'State', @@ -249,13 +252,17 @@ function getIcon($aPlace) */ function getIconFile($aPlace) { + if (CONST_MapIcon_URL === false) { + return null; + } + $sIcon = getIcon($aPlace); if (!isset($sIcon)) { return null; } - return CONST_Website_BaseURL.'images/mapicons/'.$sIcon.'.p.20.png'; + return CONST_MapIcon_URL.'/'.$sIcon.'.p.20.png'; } /** @@ -272,6 +279,7 @@ function getImportance($aPlace) if ($aWithImportance === null) { $aWithImportance = array_flip(array( + 'boundary:administrative', 'place:country', 'place:state', 'place:province',