]> git.openstreetmap.org Git - nominatim-ui.git/blob - dist/details.html
generate mapicon URLs from place category and type
[nominatim-ui.git] / dist / details.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4   <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
5   <title>OpenStreetMap Nominatim</title>
6   <meta name="viewport" content="width=device-width, initial-scale=1">
7
8   <link rel="icon" type="image/png" href="/assets/images/favicon-194x194.png" sizes="194x194" />
9   <link rel="icon" type="image/png" href="/assets/images/favicon-16x16.png" sizes="16x16" />
10
11   <link href="assets/css/leaflet.css" rel="stylesheet" />
12   <link href="assets/css/Control.MiniMap.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="details-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-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-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-4 text-right">
41         <div class="dropdown">
42           <button class="dropdown-toggle btn btn-sm btn-outline-secondary" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
43             About &amp; Help
44           </button>
45           <div class="dropdown-menu dropdown-menu-right">
46             <a class="dropdown-item" href="https://nominatim.org/release-docs/develop/api/Overview/" target="_blank">API Reference</a>
47             <a class="dropdown-item" href="https://nominatim.org/release-docs/develop/api/Faq/" target="_blank">FAQ</a>
48             <a class="dropdown-item" href="https://help.openstreetmap.org/tags/nominatim/">OpenStreetMap Help</a>
49             <a class="dropdown-item" href="https://github.com/osm-search/Nominatim">Nominatim on Github</a>
50             <a class="dropdown-item" href="https://github.com/osm-search/nominatim-ui">This frontend on Github</a>
51             <div class="dropdown-divider"></div>
52             <a class="dropdown-item" href="#" data-toggle="modal" data-target="#report-modal">Report problem with results</a>
53           </div>
54         </div>
55       </div>
56     </div>
57   </header>
58
59   <div class="modal fade" id="report-modal">
60     <div class="modal-dialog">
61       <div class="modal-content">
62         <div class="modal-header">
63           <h4 class="modal-title">Report a problem</h4>
64           <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
65         </div>
66         <div class="modal-body">
67           <p>
68             Before reporting problems please read the <a target="_blank" href="https://nominatim.org/release-docs/develop/api/Overview/">user documentation</a>
69             and
70             <a target="_blank" href="https://nominatim.org/release-docs/develop/api/Faq/">FAQ</a>.
71
72             If your problem relates to the address of a particular search result please use the 'details' link 
73             to check how the address was generated before reporting a problem.
74           </p>
75           <p>
76             Use <a target="_blank" href="https://github.com/osm-search/Nominatim/issues">Nominatim issues on github</a>
77             to report problems.
78           </p>
79           <p>
80             Please ensure that you include a full description of the problem, including the search
81             query that you used, the problem with the result and, if the problem relates to missing data,
82             the osm type (node, way, relation) and id of the item that is missing.
83           </p>
84           <p>
85             Problems that contain enough detail are likely to get looked at before ones that require
86             significant research.
87           </p>
88         </div>
89         <div class="modal-footer">
90           <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">OK</button>
91         </div>
92       </div>
93     </div>
94   </div>
95
96   <main>
97   </main>
98
99   <footer>
100     <p class="disclaimer">
101       Addresses and postcodes are approximate
102     </p>
103     <p class="copyright">
104       &copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors
105     </p>
106   </footer>
107
108   <script src="assets/js/jquery.min.js"></script>
109   <script src="assets/js/bootstrap.bundle.min.js"></script>
110   <script src="assets/js/leaflet.js"></script>
111   <script src="assets/js/Control.MiniMap.min.js"></script>
112   <script src="assets/js/handlebars.min.js"></script>
113   <script src="assets/js/url-search-params.js"></script>
114
115   <script src="config.js"></script>
116   <script src="handlebar_helpers.js"></script>
117
118   <script src="assets/js/nominatim-ui.js"></script>
119 <script id="detailspage-template" type="text/x-handlebars-template">
120
121 {{#*inline "partial_details_one_row"}}
122   <tr class="{{#unless this.isaddress}}notused{{/unless}}">
123     <td class="name">
124       {{#if this.localname}}
125         {{this.localname}}
126       {{else}}
127         <span class="noname">No Name</span>
128       {{/if}}
129     </td>
130     <td>{{formatPlaceType this}}</td>
131     <td>{{osmLink this}}</td>
132     <td>{{this.rank_address}}</td>
133     <td>{{formatAdminLevel this.admin_level}}</td>
134     <td>{{formatDistance this.distance}}</td>
135     <td>{{detailsPermaLink this 'details >'}}</td>
136   </tr>
137 {{/inline}}
138
139 {{#*inline "partial_details_keyword_one_row"}}
140   <tr>
141     <td>{{formatKeywordToken this.token}}</td>
142     {{#if this.id}}
143       <td>word id: {{this.id}}</td>
144     {{/if}}
145   </tr>
146 {{/inline}}
147
148
149 {{#*inline "partial_h2"}}
150   <tr class="all-columns"><td colspan="6"><h2>{{this}}</h2></td></tr>
151 {{/inline}}
152
153 {{#*inline "partial_h3"}}
154   <tr class="all-columns"><td colspan="6"><h3>{{this}}</h3></td></tr>
155 {{/inline}}
156
157 <div class="container">
158   <div class="row">
159     <div class="col-sm-10">
160       <h1>
161         {{aPlace.localname}}
162         <small>{{detailsPermaLink aPlace 'link to this page'}}</small>
163       </h1>
164     </div>
165     <div class="col-sm-2 text-right">
166       {{formatMapIcon aPlace}}
167     </div>
168   </div>
169   <div class="row">
170     <div class="col-md-6">
171       <table id="locationdetails" class="table table-striped">
172         <tr>
173           <td>Name</td>
174           <td>
175             {{#each aPlace.names}}
176               <div class="line">
177                 <span class="name">{{this}}</span> ({{@key}})
178               </div>
179             {{/each}}
180           </td>
181         </tr>
182         <tr>
183           <td>Type</td>
184           <td>{{aPlace.category}}:{{aPlace.type}}</td>
185         </tr>
186         <tr>
187           <td>Last Updated</td>
188           <td>{{aPlace.indexed_date}}</td>
189         </tr>
190         <tr>
191           <td>Admin Level</td>
192           <td>{{aPlace.admin_level}}</td>
193         </tr>
194         <tr>
195           <td>Rank</td>
196           <td>{{formatSearchRank aPlace.rank_search}}</td>
197         </tr>
198         {{#if aPlace.calculated_importance}}
199           <tr>
200             <td>Importance</td>
201             <td>
202               {{aPlace.calculated_importance}}
203               {{#unless aPlace.importance}} (estimated){{/unless}}
204             </td>
205           </tr>
206         {{/if}}
207         <tr>
208           <td>Coverage</td>
209           <td>{{coverageType aPlace}}</td>
210         </tr>
211         <tr>
212           <td>Centre Point (lat,lon)</td>
213           <td>
214             {{aPlace.centroid.coordinates.[1]}},{{aPlace.centroid.coordinates.[0]}}
215           </td>
216         </tr>
217         <tr>
218           <td>OSM</td>
219           <td>{{osmLink aPlace}}
220         </tr>
221         <tr>
222           <td>
223             Place Id
224             (<a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)
225           </td>
226           <td>{{aPlace.place_id}}</td>
227         </tr>
228         {{#if aPlace.calculated_wikipedia}}
229           <tr>
230             <td>Wikipedia Calculated</td>
231             <td>{{wikipediaLink aPlace}}</td>
232           </tr>
233         {{/if}}
234         <tr>
235           <td>Computed Postcode</td>
236           <td>{{aPlace.calculated_postcode}}</td>
237         </tr>
238         <tr>
239           <td>Address Tags</td>
240           <td>
241             {{#each aPlace.addresstags}}
242               <div class="line">
243                 <span class="name">{{this}}</span> ({{@key}})
244               </div>
245             {{/each}}
246           </td>
247         </tr>
248         <tr>
249           <td>Extra Tags</td>
250           <td>
251             {{#each aPlace.extratags}}
252               <div class="line">
253                 <span class="name">{{this}}</span> ({{@key}})
254               </div>
255             {{/each}}
256           </td>
257         </tr>
258       </table>
259     </div>
260     <div class="col-md-6">
261       <div id="map"></div>
262     </div>
263   </div>
264   <div class="row">
265     <div class="col-md-12">
266       <h2>Address</h2>
267        <table id="address" class="table table-striped table-small">
268         <thead>
269           <tr>
270             <th>Local name</th>
271             <th>Type</th>
272             <th>OSM</th>
273             <th>Address rank</th>
274             <th>Admin level</th>
275             <th>Distance</th>
276             <th></th>
277           </tr>
278         </thead>
279         <tbody>
280           {{#if aPlace.address}}
281             {{#each aPlace.address}}
282               {{> partial_details_one_row}}
283             {{/each}}
284           {{/if}}
285
286           {{#if aPlace.linked_places}}
287             {{> partial_h2 'Linked Places'}}
288             {{#each aPlace.linked_places}}
289               {{> partial_details_one_row}}
290             {{/each}}
291           {{/if}}
292
293           {{#if aPlace.keywords}}
294             {{> partial_h2 'Name Keywords'}}
295             {{#each aPlace.keywords.name}}
296               {{> partial_details_keyword_one_row}}
297             {{/each}}
298
299             {{> partial_h2 'Address Keywords'}}
300             {{#each aPlace.keywords.address}}
301               {{> partial_details_keyword_one_row}}
302             {{/each}}
303           {{/if}}
304
305           {{> partial_h2 'Parent Of'}}
306           {{#if aPlace.hierarchy}}
307
308             {{#each aPlace.hierarchy as |lines type|}}
309               {{> partial_h3 type}}
310               {{#each lines}}
311                 {{> partial_details_one_row}}
312               {{/each}}
313             {{/each}}
314           {{else}}
315             <tr>
316               <td>
317                 <a class="btn btn-outline-secondary btn-sm"
318                   href="{{base_url}}&hierarchy=1">display child places</a>
319               </td>
320             </tr>
321           {{/if}}
322           {{tooManyHierarchyLinesWarning aPlace}}
323         </tbody>
324       </table>
325     </div>
326   </div>
327 </div>
328
329 </script>
330 <script id="detailspage-index-template" type="text/x-handlebars-template">
331 <div class="container" id="details-index-page">
332   <div class="row">
333     <div class="col-md-12">
334
335       <h1>Show details for place</h1>
336
337       <div class="search-form">
338         <h4>Search by place id</h4>
339
340         <form class="form-inline" action="details.html">
341           <input type="edit"
342                  class="form-control input-sm"
343                  pattern="^[0-9]+$"
344                  name="place_id"
345                  placeholder="12345" />
346           <input type="submit"
347                  class="btn btn-primary btn-sm"
348                  value="Show" />
349         </form>
350       </div>
351
352       <div class="search-form">
353         <h4>Search by OSM type and OSM id</h4>
354
355         <form id="form-by-type-and-id"
356               class="form-inline"
357               action="details.html">
358           <input type="edit"
359                  class="form-control input-sm"
360                  pattern="^[NWR][0-9]+$"
361                  placeholder="N123 or W123 or R123" />
362           <input type="hidden" name="osmtype" />
363           <input type="hidden" name="osmid" />
364           <input type="submit" class="btn btn-primary btn-sm" value="Show" />
365         </form>
366       </div>
367
368       <div class="search-form">
369         <h4>Search by openstreetmap.org URL</h4>
370
371         <form id="form-by-osm-url"
372               class="form-inline"
373               action="details.html">
374           <input type="edit"
375                  class="form-control input-sm"
376                  pattern=".*openstreetmap.*"
377                  placeholder="https://www.openstreetmap.org/relation/123" />
378           <input type="hidden" name="osmtype" />
379           <input type="hidden" name="osmid" />
380           <input type="submit" class="btn btn-primary btn-sm" value="Show" />
381         </form>
382       </div>
383
384     </div>
385   </div>
386 </div></script>
387 </body>
388 </html>