X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/d0880694eb3ad17cddfe7d7f8fbe73b5a7ce8eef..80a6751c51614c0d8baf84c0c52ffdc8ef76ff77:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index 6cc2e4cb..a991914e 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -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)