]> git.openstreetmap.org Git - nominatim-ui.git/blob - src/templates/searchpage.hbs
display of geojson works
[nominatim-ui.git] / src / templates / searchpage.hbs
1 {{#*inline "partial_one_result"}}
2     <div class="result" data-position="{{iResNum}}">
3         {{#if aResult.icon}}
4             {{!-- <img src="{{env.Images_Base_Url}}{{aResult.icon}}" /> --}}
5             {{formatMapIcon aResult.icon}}
6         {{/if}}
7
8         <span class="name">{{aResult.display_name}}</span>
9         <span class="type">({{formatLabel aResult}})</span>
10         <p class="coords">{{aResult.lat}},{{aResult.lon}}</p>  
11
12         <a class="btn btn-default btn-xs details" href="details.html?place_id={{aResult.place_id}}">details</a>
13     </div>
14 {{/inline}}
15
16
17 <form class="form-inline" role="search" accept-charset="UTF-8" action="">
18     <div class="form-group">
19         <input id="q" name="q" type="text" class="form-control input-sm" placeholder="Search" value="{{sQuery}}">
20     </div>
21     <div class="form-group search-button-group">
22         <button type="submit" class="btn btn-primary btn-sm">Search</button>
23         {{#if env.Search_AreaPolygons}}
24             <input type="hidden" value="1" name="polygon_geojson" />
25         {{/if}}
26         <input type="hidden" name="viewbox" value="{{sViewBox}}" />
27         <div class="checkbox-inline">
28             <input type="checkbox" id="use_viewbox" {{#if sViewBox}}checked="checked"{{/if}}>
29             <label for="use_viewbox">apply viewbox</label>
30         </div>
31     </div>
32     <div class="search-type-link">
33         <a id="switch-to-reverse" href="/reverse.html">reverse search</a>
34     </div>
35 </form>
36
37 <div id="content">
38
39     {{#if sQuery}}
40         <div id="searchresults" class="sidebar">
41             {{#each aSearchResults as |aResult|}}
42                 {{>partial_one_result iResNum=@index aResult=aResult env=env}}
43             {{/each}}
44
45             {{#if aSearchResults}}
46                 {{#if sMoreURL}}
47                     <div class="more">
48                         <a class="btn btn-primary" href="{{sMoreURL}}">Search for more results</a>
49                     </div>
50                 {{/if}}
51             {{else}}
52                 <div class="noresults">No search results found</div>
53             {{/if}}
54         </div>
55
56     {{else}}
57
58         <div id="intro" class="sidebar">
59             <h2>Welcome to Nominatim</h2>
60
61             <p>Nominatim is a search engine for <a href="http://www.openstreetmap.org">OpenStreetMap</a>
62             data. This is the debugging interface. You may search for a name or address(forward search) or
63             look up data by its geographic coordinate(reverse search). Each result comes with a
64             link to a details page where you can inspect what data about the object is saved in 
65             the database and investigate how the address of the object has been computed.</p>
66
67             For more information visit the <a href="http://wiki.openstreetmap.org/wiki/Nominatim">Nominatim wiki page</a>.
68         </div>
69
70     {{/if}}
71
72     <div id="map-wrapper">
73         <div id="map-position">
74             <div id="map-position-inner"></div>
75             <div id="map-position-close"><a href="#">hide</a></div>
76         </div>
77         <div id="map"></div>
78     </div>
79 </div>