X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/fbc5ba13f8a28f8e5fc83675823efbaeea6dcb70..fc961c14fa3762530123e7aad3fae77b6e89be65:/lib/template/search-html.php?ds=sidebyside diff --git a/lib/template/search-html.php b/lib/template/search-html.php index 02c8cb4d..88ca5f7a 100644 --- a/lib/template/search-html.php +++ b/lib/template/search-html.php @@ -1,222 +1,92 @@ - - - - OpenStreetMap Nominatim: Search - - - - - - - - - - - - - - -
+ + + + +
+
+ +
+ Data last updated: +
+ +
+
+
+ + +
+
+
+
-
-
- - - - - - - - + +
+ +
+
+ + + + + + +
+ +
+
+ - - -
logo /> HighlightData: -Documentation | FAQ
- -
+
-
-
+ '; - } + $i = 0; foreach($aSearchResults as $iResNum => $aResult) { - if ($aResult['aBoundingBox']) - { - echo '
\n"; - } - elseif (isset($aResult['zoom'])) - { - echo '
'; - } - else - { - echo '
'; - } + + echo '
'; echo (isset($aResult['icon'])?'icon':''); - echo ' '.$aResult['name'].''; - echo ' '.round($aResult['lat'],3).','.round($aResult['lon'],3).''; - echo ' '.$aResult['place_id'].''; + echo ' '.htmlspecialchars($aResult['name']).''; + // echo ' '.round($aResult['lat'],3).','.round($aResult['lon'],3).''; + // echo ' '.$aResult['place_id'].''; if (isset($aResult['label'])) echo ' ('.$aResult['label'].')'; else if ($aResult['type'] == 'yes') echo ' ('.ucwords(str_replace('_',' ',$aResult['class'])).')'; else echo ' ('.ucwords(str_replace('_',' ',$aResult['type'])).')'; - echo ' (details)'; + echo ' details'; echo '
'; + $i = $i+1; } - if (sizeof($aSearchResults)) + if (sizeof($aSearchResults) && $sMoreURL) { - if ($sMoreURL) - { - echo ''; - } + echo ''; } else { @@ -224,77 +94,71 @@ target="_blank">FAQ } ?> -
Addresses and postcodes are approximate - -
+ + +
- +
+

+ Addresses and postcodes are approximate +

+ +
+ + + + + + - + $iZoom, + 'lat' => $fLat, + 'lon' => $fLon + ]; + echo 'var nominatim_map_init = ' . json_encode($aNominatimMapInit, JSON_PRETTY_PRINT) . ';'; + + $aNominatimResults = []; + echo 'var nominatim_results = ' . json_encode($aSearchResults, JSON_PRETTY_PRINT) . ';'; + ?> + + +