]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/details-json.php
also adapt uses of ClassTypes in website/
[nominatim.git] / lib / template / details-json.php
index 955441add22fccff31451ceb0e81f44a29ac4229..4dc65a5b0d3637e7c27294c0414ab37a2e9b261a 100644 (file)
@@ -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;