]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/ClassTypes.php
Add JSON output for /deletable.php and /polygons.php
[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])) {