]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/details.php
move ClassTypes into own namespace
[nominatim.git] / website / details.php
index 08d1d2d86571eaedb40ba6cf3650521cc7928203..2427c9ddf811c1f45777daa9cf7ff664dbfb0336 100755 (executable)
@@ -135,15 +135,7 @@ if (!$aPointDetails) {
 }
 
 $aPointDetails['localname'] = $aPointDetails['localname']?$aPointDetails['localname']:$aPointDetails['housenumber'];
-
-$aClassType = getClassTypesWithImportance();
-
-$sPointClassType = $aPointDetails['class'].':'.$aPointDetails['type'];
-if (isset($aClassType[$sPointClassType]) && $aClassType[$sPointClassType]['icon']) {
-    $aPointDetails['icon'] = $aClassType[$sPointClassType]['icon'];
-} else {
-    $aPointDetails['icon'] = false;
-}
+$aPointDetails['icon'] = Nominatim\ClassTypes\getProperty($aPointDetails, 'icon', false);
 
 // Get all alternative names (languages, etc)
 $sSQL = 'SELECT (each(name)).key,(each(name)).value FROM placex ';