]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
ignore admin_level = 15 in geocodejson output
[nominatim.git] / lib / Geocode.php
index 948cc0a65c7dfadaf2bd6891dc0d4d30e9da1a17..2bb940522fc13065de901f3054d6da0bfc64817e 100644 (file)
@@ -250,10 +250,12 @@ class Geocode
         $this->oPlaceLookup->setIncludeAddressDetails(false);
         $this->oPlaceLookup->setIncludePolygonAsPoints($oParams->getBool('polygon'));
 
-        if ($oParams->getString('format', '') == 'geocodejson') {
-            $this->oPlaceLookup->setAddressDetails(true);
+        if ($this->bIncludeAddressDetails
+            && $oParams->getString('format', '') == 'geocodejson'
+           ) {
             $this->oPlaceLookup->setAddressAdminLevels(true);
         }
+
     }
 
     public function setQueryFromParams($oParams)