]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/PlaceLookup.php
Merge pull request #2016 from lonvia/locale-address-russia
[nominatim.git] / lib / PlaceLookup.php
index 8a1a366678652513e37378e15c36c64d18c0e679..a2f39ea348ba466e21111a1e6f65395eb8343f57 100644 (file)
@@ -448,16 +448,24 @@ class PlaceLookup
                 }
             }
 
                 }
             }
 
-            $aPlace['addresstype'] = ClassTypes\getProperty(
+            $aPlace['addresstype'] = ClassTypes\getLabelTag(
                 $aPlace,
                 $aPlace,
-                'simplelabel',
-                $aPlace['class']
+                $aPlace['country_code']
             );
             );
+
+            $aResults[$aPlace['place_id']] = $aPlace;
         }
 
         }
 
-        Debug::printVar('Places', $aPlaces);
+        $aResults = array_filter(
+            $aResults,
+            function ($v) {
+                return !($v instanceof Result);
+            }
+        );
+
+        Debug::printVar('Places', $aResults);
 
 
-        return $aPlaces;
+        return $aResults;
     }
 
     /* returns an array which will contain the keys
     }
 
     /* returns an array which will contain the keys