remove name from geocodejson when not set

This commit is contained in:
Sarah Hoffmann 2020-04-08 11:12:27 +02:00
parent 98be5bf637
commit 11cd648699
2 changed files with 6 additions and 2 deletions

View File

@ -30,7 +30,9 @@ if (empty($aPlace)) {
$aFilteredPlaces['properties']['geocoding']['label'] = $aPlace['langaddress'];
$aFilteredPlaces['properties']['geocoding']['name'] = $aPlace['placename'];
if ($aPlace['placename'] !== null) {
$aFilteredPlaces['properties']['geocoding']['name'] = $aPlace['placename'];
}
if (isset($aPlace['address'])) {
$aPlace['address']->addGeocodeJsonAddressParts(

View File

@ -20,7 +20,9 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) {
$aPlace['properties']['geocoding']['label'] = $aPointDetails['langaddress'];
$aPlace['properties']['geocoding']['name'] = $aPointDetails['placename'];
if ($aPointDetails['placename'] !== null) {
$aPlace['properties']['geocoding']['name'] = $aPointDetails['placename'];
}
if (isset($aPointDetails['address'])) {
$aPointDetails['address']->addGeocodeJsonAddressParts(