X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8841a328c811072b093df2c91c48972e040cf994..8ac36e2e18a8b2260251ea3f1e869dafb2ebe2eb:/lib/template/details-json.php diff --git a/lib/template/details-json.php b/lib/template/details-json.php index 9b4237c7..4afb1b0b 100644 --- a/lib/template/details-json.php +++ b/lib/template/details-json.php @@ -26,12 +26,14 @@ $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']; -$aPlaceDetails['isarea'] = ($aPointDetails['isarea'] == 't'); +$aPlaceDetails['isarea'] = $aPointDetails['isarea']; $aPlaceDetails['centroid'] = array( 'type' => 'Point', 'coordinates' => array( (float) $aPointDetails['lon'], (float) $aPointDetails['lat'] )