X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/1d0da944a66924960eb48f2225d4717c28006cea..7a964efb3a104e304be7620dc18fa123559f05c8:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index 6cc2e4cb..948cc0a6 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -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)