]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / Geocode.php
index 18526f4382531fd2a9fa3a3b246970934690f821..acd2f76cca713e6c1ab98f79deae0972dee3587e 100644 (file)
@@ -249,6 +249,12 @@ class Geocode
         $this->oPlaceLookup->loadParamArray($oParams, $sForceGeometryType);
         $this->oPlaceLookup->setIncludeAddressDetails(false);
         $this->oPlaceLookup->setIncludePolygonAsPoints($oParams->getBool('polygon'));
+
+        if ($this->bIncludeAddressDetails
+            && $oParams->getString('format', '') == 'geocodejson'
+           ) {
+            $this->oPlaceLookup->setAddressAdminLevels(true);
+        }
     }
 
     public function setQueryFromParams($oParams)