X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/f50f46c1ce3fe44d8de55071d2fe1126ecb1d0ac..80a6751c51614c0d8baf84c0c52ffdc8ef76ff77:/lib/Geocode.php diff --git a/lib/Geocode.php b/lib/Geocode.php index 948cc0a6..a991914e 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -250,8 +250,9 @@ class Geocode $this->oPlaceLookup->setIncludeAddressDetails(false); $this->oPlaceLookup->setIncludePolygonAsPoints($oParams->getBool('polygon')); - if ($oParams->getString('format', '') == 'geocodejson') { - $this->oPlaceLookup->setAddressDetails(true); + if ($this->bIncludeAddressDetails + && $oParams->getString('format', '') == 'geocodejson' + ) { $this->oPlaceLookup->setAddressAdminLevels(true); } }