]> git.openstreetmap.org Git - nominatim-ui.git/blob - dist/search.html
detail page: only load and display parent-of section after button click
[nominatim-ui.git] / dist / search.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4   <title>OpenStreetMap Nominatim</title>
5   <meta name="viewport" content="width=device-width, initial-scale=1">
6
7   <link rel="icon" type="image/png" href="/assets/images/favicon-194x194.png" sizes="194x194" />
8   <link rel="icon" type="image/png" href="/assets/images/favicon-16x16.png" sizes="16x16" />
9
10   <link href="assets/css/leaflet.css" rel="stylesheet" />
11   <link href="assets/css/Control.MiniMap.min.css" rel="stylesheet" />
12   <link href="assets/css/bootstrap-theme.min.css" rel="stylesheet" />
13   <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
14   <link href="assets/css/common.css" rel="stylesheet" />
15   <link href="assets/css/search.css" rel="stylesheet" type="text/css" />
16   <link href="assets/css/details.css" rel="stylesheet" type="text/css" />
17 </head>
18 <body id="search-page">
19
20   <div id="error-overlay">
21     You need Javascript enabled to view this page.
22   </div>
23
24   <header class="container-fluid">
25     <div class="row">
26       <div class="col-xs-4">
27         <div class="brand">
28           <a href="/">
29             <img alt="logo" src="assets/images/osm_logo.120px.png" width="30" height="30"/>
30             <h1>Nominatim</h1>
31           </a>
32         </div>
33       </div>
34       <div id="last-updated" class="col-xs-4 text-center">
35         Data from <a id="api-request-link" href="">API request</a>
36         <br>
37         Data last updated:
38         <span id="data-date"></span>
39       </div>
40       <div class="col-xs-4 text-right">
41         <div class="btn-group">
42           <button class="dropdown-toggle btn btn-sm btn-default" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
43             About &amp; Help <span class="caret"></span>
44           </button>
45           <ul class="dropdown-menu dropdown-menu-right">
46             <li><a href="https://nominatim.org/release-docs/develop/api/Overview/" target="_blank">API Reference</a></li>
47             <li><a href="https://nominatim.org/release-docs/develop/api/Faq/" target="_blank">FAQ</a></li>
48             <li><a href="https://help.openstreetmap.org/tags/nominatim/">OpenStreetMap Help</a></li>
49             <li><a href="https://github.com/openstreetmap/Nominatim">Nominatim on Github</a></li>
50             <li role="separator" class="divider"></li>
51             <li><a href="#" class="" data-toggle="modal" data-target="#report-modal">Report problem with results</a></li>
52           </ul>
53         </div>
54       </div>
55     </div>
56   </header>
57
58   <div class="modal fade" id="report-modal">
59     <div class="modal-dialog">
60       <div class="modal-content">
61         <div class="modal-header">
62           <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
63           <h4 class="modal-title">Report a problem</h4>
64         </div>
65         <div class="modal-body">
66           <p>
67             Before reporting problems please read the <a target="_blank" href="https://nominatim.org/release-docs/develop/api/Overview/">user documentation</a>
68             and
69             <a target="_blank" href="https://nominatim.org/release-docs/develop/api/Faq/">FAQ</a>.
70
71             If your problem relates to the address of a particular search result please use the 'details' link 
72             to check how the address was generated before reporting a problem.
73           </p>
74           <p>
75             Use <a target="_blank" href="https://github.com/openstreetmap/Nominatim/issues">Nominatim issues on github</a>
76             to report problems.
77           </p>
78           <p>
79             Please ensure that you include a full description of the problem, including the search
80             query that you used, the problem with the result and, if the problem relates to missing data,
81             the osm type (node, way, relation) and id of the item that is missing.
82           </p>
83           <p>
84             Problems that contain enough detail are likely to get looked at before ones that require
85             significant research.
86           </p>
87         </div>
88         <div class="modal-footer">
89           <button type="button" class="btn btn-default" data-dismiss="modal">OK</button>
90         </div>
91       </div>
92     </div>
93   </div>
94
95   <main>
96   </main>
97
98   <footer>
99     <p class="disclaimer">
100       Addresses and postcodes are approximate
101     </p>
102     <p class="copyright">
103       &copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors
104     </p>
105   </footer>
106
107   <script src="assets/js/jquery.min.js"></script>
108   <script src="assets/js/bootstrap.min.js"></script>
109   <script src="assets/js/leaflet.js"></script>
110   <script src="assets/js/Control.MiniMap.min.js"></script>
111   <script src="assets/js/handlebars.min.js"></script>
112   <script src="assets/js/url-search-params.js"></script>
113
114   <script src="config.js"></script>
115   <script src="handlebar_helpers.js"></script>
116
117   <script src="assets/js/nominatim-ui.js"></script>
118 <script id="searchpage-template" type="text/x-handlebars-template">
119 {{#*inline "partial_one_result"}}
120   <div class="result" data-position="{{iResNum}}">
121     {{#if aResult.icon}}
122       {{!-- <img src="{{env.Images_Base_Url}}{{aResult.icon}}" /> --}}
123       {{formatMapIcon aResult.icon}}
124     {{/if}}
125
126     <span class="name">{{aResult.display_name}}</span>
127     <span class="type">({{formatLabel aResult}})</span>
128     <p class="coords">{{aResult.lat}},{{aResult.lon}}</p>  
129
130     <a class="btn btn-default btn-xs details" href="details.html?osmtype={{shortOSMType aResult.osm_type}}&osmid={{aResult.osm_id}}">details</a>
131   </div>
132 {{/inline}}
133
134
135 <form class="form-inline" role="search" accept-charset="UTF-8" action="">
136   <div class="form-group">
137     <input id="q" name="q" type="text" class="form-control input-sm" placeholder="Search" value="{{sQuery}}">
138   </div>
139   <div class="form-group search-button-group">
140     <button type="submit" class="btn btn-primary btn-sm">Search</button>
141     {{#if env.Search_AreaPolygons}}
142       <input type="hidden" value="1" name="polygon_geojson" />
143     {{/if}}
144     <input type="hidden" name="viewbox" value="{{sViewBox}}" />
145     <div class="checkbox-inline">
146       <input type="checkbox" id="use_viewbox" {{#if sViewBox}}checked="checked"{{/if}}>
147       <label for="use_viewbox">apply viewbox</label>
148     </div>
149   </div>
150   <div class="search-type-link">
151     <a id="switch-to-reverse" href="/reverse.html">reverse search</a>
152   </div>
153 </form>
154
155 <div id="content">
156
157   {{#if sQuery}}
158     <div id="searchresults" class="sidebar">
159       {{#each aSearchResults as |aResult|}}
160         {{>partial_one_result iResNum=@index aResult=aResult env=env}}
161       {{/each}}
162
163       {{#if aSearchResults}}
164         {{#if sMoreURL}}
165           <div class="more">
166             <a class="btn btn-primary" href="{{sMoreURL}}">Search for more results</a>
167           </div>
168         {{/if}}
169       {{else}}
170         <div class="noresults">No search results found</div>
171       {{/if}}
172     </div>
173
174   {{else}}
175
176     <div id="intro" class="sidebar">
177       <h2>Welcome to Nominatim</h2>
178
179       <p>Nominatim is a search engine for <a href="https://www.openstreetmap.org">OpenStreetMap</a>
180       data. This is the debugging interface. You may search for a name or address(forward search) or
181       look up data by its geographic coordinate(reverse search). Each result comes with a
182       link to a details page where you can inspect what data about the object is saved in 
183       the database and investigate how the address of the object has been computed.</p>
184
185       For more information visit the <a href="https://nominatim.org">Nominatim home page</a>.
186     </div>
187
188   {{/if}}
189
190   <div id="map-wrapper">
191     <div id="map-position">
192       <div id="map-position-inner"></div>
193       <div id="map-position-close"><a href="#">hide</a></div>
194     </div>
195     <div id="map"></div>
196   </div>
197 </div>
198 </script>
199 </body>
200 </html>