]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
FAQ: more answers regarding nominatim.so file permissions
[nominatim.git] / lib / Geocode.php
index 6cc2e4cb193d4069d377a9cbf002a7359337e891..a991914eb11662445745794b9495fecfd0cb8d54 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)