]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/ClassTypes.php
Merge pull request #1729 from lonvia/fix-details-link-for-boundaries
[nominatim.git] / lib / ClassTypes.php
index d46847f1c7a65d6ec7565070361ac32da0bb5383..91066a1ffb1d3b2dacba3834aa78e9a2221952ea 100644 (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])) {