From: marc tobias Date: Tue, 21 Aug 2018 15:26:14 +0000 (+0200) Subject: in /details JSON output add check if place (type) has an icon set X-Git-Tag: v3.2.0~15 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/e47646ddbaf7b2e7dc93b41394d0a3d10d58f16e in /details JSON output add check if place (type) has an icon set --- diff --git a/lib/template/details-json.php b/lib/template/details-json.php index 9b4237c7..06554aba 100644 --- a/lib/template/details-json.php +++ b/lib/template/details-json.php @@ -26,7 +26,9 @@ $aPlaceDetails['calculated_importance'] = (float) $aPointDetails['calculated_imp $aPlaceDetails['extratags'] = $aPointDetails['aExtraTags']; $aPlaceDetails['calculated_wikipedia'] = $aPointDetails['wikipedia']; -$aPlaceDetails['icon'] = CONST_Website_BaseURL.'images/mapicons/'.$aPointDetails['icon'].'.n.32.png'; +if ($aPointDetails['icon']) { + $aPlaceDetails['icon'] = CONST_Website_BaseURL.'images/mapicons/'.$aPointDetails['icon'].'.n.32.png'; +} $aPlaceDetails['rank_address'] = (int) $aPointDetails['rank_address']; $aPlaceDetails['rank_search'] = (int) $aPointDetails['rank_search'];