mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
remove name from geocodejson when not set
This commit is contained in:
@@ -30,7 +30,9 @@ if (empty($aPlace)) {
|
|||||||
|
|
||||||
$aFilteredPlaces['properties']['geocoding']['label'] = $aPlace['langaddress'];
|
$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'])) {
|
if (isset($aPlace['address'])) {
|
||||||
$aPlace['address']->addGeocodeJsonAddressParts(
|
$aPlace['address']->addGeocodeJsonAddressParts(
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) {
|
|||||||
|
|
||||||
$aPlace['properties']['geocoding']['label'] = $aPointDetails['langaddress'];
|
$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'])) {
|
if (isset($aPointDetails['address'])) {
|
||||||
$aPointDetails['address']->addGeocodeJsonAddressParts(
|
$aPointDetails['address']->addGeocodeJsonAddressParts(
|
||||||
|
|||||||
Reference in New Issue
Block a user