X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f29c7bf910ea36fdc2cc70ba63c6dcece79c7b6c..01d5ecb86b10e950a087173faa666fe662e90ab0:/lib/Geocode.php?ds=sidebyside diff --git a/lib/Geocode.php b/lib/Geocode.php index 6cc2e4cb..2bb94052 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -249,6 +249,13 @@ 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)