]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
Merge branch 'geojson-output' of https://github.com/mtmail/Nominatim into mtmail...
[nominatim.git] / lib / Geocode.php
index 6cc2e4cb193d4069d377a9cbf002a7359337e891..948cc0a65c7dfadaf2bd6891dc0d4d30e9da1a17 100644 (file)
@@ -249,6 +249,11 @@ class Geocode
         $this->oPlaceLookup->loadParamArray($oParams, $sForceGeometryType);
         $this->oPlaceLookup->setIncludeAddressDetails(false);
         $this->oPlaceLookup->setIncludePolygonAsPoints($oParams->getBool('polygon'));
+
+        if ($oParams->getString('format', '') == 'geocodejson') {
+            $this->oPlaceLookup->setAddressDetails(true);
+            $this->oPlaceLookup->setAddressAdminLevels(true);
+        }
     }
 
     public function setQueryFromParams($oParams)