X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/7be7417b5bf8ee801295d402e736c531892b77ca..82a11cae2ddb7cfe3b2a180346bb374efe2e6a9d:/lib/template/search-html.php diff --git a/lib/template/search-html.php b/lib/template/search-html.php index 430bba39..404c007a 100644 --- a/lib/template/search-html.php +++ b/lib/template/search-html.php @@ -14,64 +14,37 @@ - '; - echo ''; - echo '
'; - echo '
'; - } - elseif (!empty($aMoreParams['q'])) { - echo '
'; - echo '
'; - echo '
'; - echo '
'; - } - else { - echo '
'; - echo '
'; - echo '
'; - echo '
'; - } - ?> + +
+ + +
+
+ + +
-
> - +
+
-
> +
- - - - - - + + + + + +
- +
- > + >
@@ -148,7 +121,16 @@ ); echo 'var nominatim_map_init = ' . json_encode($aNominatimMapInit, JSON_PRETTY_PRINT) . ';'; - echo 'var nominatim_results = ' . json_encode($aSearchResults, JSON_PRETTY_PRINT) . ';'; + echo 'var nominatim_results = ' . json_encode($aSearchResults, JSON_PRETTY_PRINT) . ';'; + $sStructuredQuery = (empty($aMoreParams['q']) + && !(empty($aMoreParams['street']) + && empty($aMoreParams['city']) + && empty($aMoreParams['county']) + && empty($aMoreParams['state']) + && empty($aMoreParams['country']) + && empty($aMoreParams['postalcode']))) + ? 'true' : 'false'; + echo 'var nominatim_structured_query = '.$sStructuredQuery.';'; ?>