X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ed16d5b6aa35f3ef315338bd6d292d4d1ef653fb..859347523fb2c7340b2df9980e52d5ea4543c82d:/lib/template/details-json.php diff --git a/lib/template/details-json.php b/lib/template/details-json.php index 955441ad..4dc65a5b 100644 --- a/lib/template/details-json.php +++ b/lib/template/details-json.php @@ -26,7 +26,7 @@ $aPlaceDetails['calculated_importance'] = (float) $aPointDetails['calculated_imp $aPlaceDetails['extratags'] = $aPointDetails['aExtraTags']; $aPlaceDetails['calculated_wikipedia'] = $aPointDetails['wikipedia']; -if ($aPointDetails['icon']) { +if (isset($aPointDetails['icon'])) { $aPlaceDetails['icon'] = CONST_Website_BaseURL.'images/mapicons/'.$aPointDetails['icon'].'.n.32.png'; } @@ -52,7 +52,8 @@ $funcMapAddressLine = function ($aFull) { 'type' => $aFull['type'], 'admin_level' => isset($aFull['admin_level']) ? (int) $aFull['admin_level'] : null, 'rank_address' => $aFull['rank_address'] ? (int) $aFull['rank_address'] : null, - 'distance' => (float) $aFull['distance'] + 'distance' => (float) $aFull['distance'], + 'isaddress' => isset($aFull['isaddress']) ? (bool) $aFull['isaddress'] : null ); return $aMapped;