]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/address-geocodejson.php
Merge pull request #1898 from lonvia/show-housenumber-with-housename
[nominatim.git] / lib / template / address-geocodejson.php
index 6ccbeb5786b0563737bf647662205107a2b476b5..0066e80e29adb13cce8320360c57eafddf7ba87e 100644 (file)
@@ -30,11 +30,13 @@ if (empty($aPlace)) {
 
     $aFilteredPlaces['properties']['geocoding']['label'] = $aPlace['langaddress'];
 
 
     $aFilteredPlaces['properties']['geocoding']['label'] = $aPlace['langaddress'];
 
-    $aFilteredPlaces['properties']['geocoding']['name'] = $aPlace['placename'];
+    if ($aPlace['placename'] !== null) {
+        $aFilteredPlaces['properties']['geocoding']['name'] = $aPlace['placename'];
+    }
 
     if (isset($aPlace['address'])) {
         $aPlace['address']->addGeocodeJsonAddressParts(
 
     if (isset($aPlace['address'])) {
         $aPlace['address']->addGeocodeJsonAddressParts(
-          $aFilteredPlaces['properties']['geocoding']
+            $aFilteredPlaces['properties']['geocoding']
         );
 
         $aFilteredPlaces['properties']['geocoding']['admin']
         );
 
         $aFilteredPlaces['properties']['geocoding']['admin']