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