]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-html.php
allow parameters to be empty
[nominatim.git] / lib / template / search-html.php
index e99807965b4daf4c72d7e39bd73cfd54c525d130..dc4dcc748929f00cbb4110d57f2d42e87ce633d7 100644 (file)
@@ -14,7 +14,7 @@
                <div class="form-group">
                        <input id="q" name="q" type="text" class="form-control input-sm" placeholder="Search" value="<?php echo htmlspecialchars($sQuery); ?>" >
                </div>
-               <div class="form-group">
+               <div class="form-group search-button-group">
                        <button type="submit" class="btn btn-primary btn-sm">Search</button>
                        <?php if (CONST_Search_AreaPolygons) { ?>
                                <!-- <input type="checkbox" value="1" name="polygon" <?php if ($bAsText) echo "checked='checked'"; ?>/> Highlight -->
@@ -28,7 +28,7 @@
                                </label>
                        </div>
                </div>
-               <div>
+               <div class="search-type-link">
                        <a href="<?php echo CONST_Website_BaseURL; ?>reverse.php?format=html">reverse search</a>
                </div>
        </form>
        <script type="text/javascript">
        <?php
 
-               $aNominatimMapInit = [
-                       'zoom' => $iZoom,
-                       'lat' => $fLat,
-                       'lon' => $fLon
-               ];
+               $aNominatimMapInit = array(
+                       'zoom' => CONST_Default_Zoom,
+                       'lat' => CONST_Default_Lat,
+                       'lon' => CONST_Default_Lon,
+                       'tile_url' => CONST_Map_Tile_URL,
+                       'tile_attribution' => CONST_Map_Tile_Attribution
+               );
                echo 'var nominatim_map_init = ' . json_encode($aNominatimMapInit, JSON_PRETTY_PRINT) . ';';
 
                echo 'var nominatim_results = ' . json_encode($aSearchResults, JSON_PRETTY_PRINT) . ';';