X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f29c7bf910ea36fdc2cc70ba63c6dcece79c7b6c..92f86de938fcb2fb18b22531bf491512e5b8c190:/lib/Geocode.php?ds=inline 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)