]> git.openstreetmap.org Git - nominatim-ui.git/blob - dist/deletable.html
dont intercept links in last-updated page section
[nominatim-ui.git] / dist / deletable.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="BODYID">
19
20   <div id="error-overlay"></div>
21
22   <header class="container-fluid">
23     <div class="row">
24       <div class="col-4">
25         <div class="brand">
26           <a href="search.html">
27             <img alt="logo" src="assets/images/osm_logo.120px.png" width="30" height="30"/>
28             <h1>Nominatim</h1>
29           </a>
30         </div>
31       </div>
32       <div class="col-4">
33         <div id="last-updated" class="text-center">
34           <div id="loading">loading...</div>
35           <div id="api-request">
36             Data from <a href="">API request</a>
37             <span id="api-request-debug">(<a href="">debug output</a>)</span>
38           </div>
39           Data last updated: <span id="data-date"></span>
40         </div>
41       </div>
42       <div class="col-4 text-right">
43         <div class="dropdown">
44           <button class="dropdown-toggle btn btn-sm btn-outline-secondary" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
45             About &amp; Help
46           </button>
47           <div class="dropdown-menu dropdown-menu-right">
48             <a class="dropdown-item" href="https://nominatim.org/release-docs/develop/api/Overview/" target="_blank">API Reference</a>
49             <a class="dropdown-item" href="https://nominatim.org/release-docs/develop/api/Faq/" target="_blank">FAQ</a>
50             <a class="dropdown-item" href="https://help.openstreetmap.org/tags/nominatim/">OpenStreetMap Help</a>
51             <a class="dropdown-item" href="https://github.com/osm-search/Nominatim">Nominatim on Github</a>
52             <a class="dropdown-item" href="https://github.com/osm-search/nominatim-ui">This frontend on Github</a>
53             <div class="dropdown-divider"></div>
54             <a class="dropdown-item" href="#" data-toggle="modal" data-target="#report-modal">Report problem with results</a>
55           </div>
56         </div>
57       </div>
58     </div>
59   </header>
60
61   <div class="modal fade" id="report-modal">
62     <div class="modal-dialog">
63       <div class="modal-content">
64         <div class="modal-header">
65           <h4 class="modal-title">Report a problem</h4>
66           <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
67         </div>
68         <div class="modal-body">
69           <p>
70             Before reporting problems please read the <a target="_blank" href="https://nominatim.org/release-docs/develop/api/Overview/">user documentation</a>
71             and
72             <a target="_blank" href="https://nominatim.org/release-docs/develop/api/Faq/">FAQ</a>.
73
74             If your problem relates to the address of a particular search result please use the 'details' link 
75             to check how the address was generated before reporting a problem.
76           </p>
77           <p>
78             Use <a target="_blank" href="https://github.com/osm-search/Nominatim/issues">Nominatim issues on github</a>
79             to report problems.
80           </p>
81           <p>
82             Please ensure that you include a full description of the problem, including the search
83             query that you used, the problem with the result and, if the problem relates to missing data,
84             the osm type (node, way, relation) and id of the item that is missing.
85           </p>
86           <p>
87             Problems that contain enough detail are likely to get looked at before ones that require
88             significant research.
89           </p>
90         </div>
91         <div class="modal-footer">
92           <button type="button" class="btn btn-outline-secondary" data-dismiss="modal">OK</button>
93         </div>
94       </div>
95     </div>
96   </div>
97
98   <main>
99   </main>
100
101   <footer>
102     <p class="disclaimer">
103       Addresses and postcodes are approximate
104     </p>
105     <p class="copyright">
106       &copy; <a href="https://osm.org/copyright">OpenStreetMap</a> contributors
107     </p>
108   </footer>
109
110   <script src="assets/js/jquery.min.js"></script>
111   <script src="assets/js/bootstrap.bundle.min.js"></script>
112   <script src="assets/js/leaflet.js"></script>
113   <script src="assets/js/Control.MiniMap.min.js"></script>
114   <script src="assets/js/handlebars.min.js"></script>
115   <script src="assets/js/url-search-params.js"></script>
116
117   <script src="config.js"></script>
118   <script src="handlebar_helpers.js"></script>
119
120   <script src="assets/js/nominatim-ui.js"></script>
121 <script id="searchpage-template" type="text/x-handlebars-template">
122 {{#*inline "partial_one_result"}}
123   <div class="result" data-position="{{iResNum}}">
124     {{formatMapIcon aResult}}
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="details btn btn-outline-secondary btn-sm"
131        href="details.html?osmtype={{shortOSMType aResult.osm_type}}&osmid={{aResult.osm_id}}">details</a>
132   </div>
133 {{/inline}}
134
135 <div class="top-bar">
136   <ul class="nav nav-tabs">
137     <li class="nav-item">
138       <a class="nav-link {{#unless hStructured}}active{{/unless}}" data-toggle="tab" href="#simple">simple</a>
139     </li>
140     <li class="nav-item">
141       <a class="nav-link {{#if hStructured}}active{{/if}}" data-toggle="tab" href="#structured">structured</a>
142     </li>
143     <div class="search-type-link">
144       <a id="switch-to-reverse" href="/reverse.html">reverse search</a>
145     </div>
146   </ul>
147   <div class="tab-content p-2">
148     <div class="tab-pane {{#unless hStructured}}active{{/unless}}" id="simple" role="tabpanel">
149       <form class="form-inline" role="search" accept-charset="UTF-8" action="">
150         <input id="q"
151                name="q"
152                type="text"
153                class="form-control form-control-sm"
154                placeholder="Search"
155                value="{{sQuery}}" />
156
157         <div class="form-group search-button-group">
158           <button type="submit" class="btn btn-primary btn-sm mx-1">Search</button>
159           <input type="hidden" name="viewbox" value="{{sViewBox}}" />
160           <div class="form-check form-check-inline">
161             <input type="checkbox" class="form-check-input"
162                    id="use_viewbox" {{#if sViewBox}}checked="checked"{{/if}}>
163             <label class="form-check-label" for="use_viewbox">apply viewbox</label>
164           </div>
165         </div>
166       </form>
167     </div>
168     <div class="tab-pane {{#if hStructured}}active{{/if}}" id="structured" role="tabpanel">
169       <form class="form-inline" role="search" accept-charset="UTF-8" action="">
170         <input name="street" type="text" class="form-control form-control-sm mr-1"
171                placeholder="House number/Street"
172                value="{{hStructured.street}}" />
173         <input name="city" type="text" class="form-control form-control-sm mr-1"
174                placeholder="City"
175                value="{{hStructured.city}}" />
176         <input id="county" name="county" type="text" class="form-control form-control-sm mr-1"
177                placeholder="County"
178                value="{{hStructured.county}}" />
179         <input name="state" type="text" class="form-control form-control-sm mr-1"
180                placeholder="State"
181                value="{{hStructured.state}}" />
182         <input name="country" type="text" class="form-control form-control-sm mr-1"
183                placeholder="Country"
184                value="{{hStructured.country}}" />
185         <input name="postalcode" type="text" class="form-control form-control-sm mr-1"
186                placeholder="Postal Code"
187                value="{{hStructured.postalcode}}" />
188
189         <div class="form-group search-button-group">
190           <button type="submit" class="btn btn-primary btn-sm mx-1">Search</button>
191           <input type="hidden" name="viewbox" value="{{sViewBox}}" />
192           <div class="form-check form-check-inline">
193             <input type="checkbox" class="form-check-input"
194                    id="use_viewbox" {{#if sViewBox}}checked="checked"{{/if}}>
195             <label class="form-check-label" for="use_viewbox">apply viewbox</label>
196           </div>
197         </div>
198       </form>
199     </div>
200   </div> <!-- /tab-content -->
201 </div> <!-- /top-bar -->
202
203 <div id="content">
204
205   {{#if bSearchRan}}
206     <div id="searchresults" class="sidebar">
207       {{#each aSearchResults as |aResult|}}
208         {{>partial_one_result iResNum=@index aResult=aResult env=env}}
209       {{/each}}
210
211       {{#if aSearchResults}}
212         {{#if sMoreURL}}
213           <div class="more">
214             <a class="btn btn-primary" href="{{sMoreURL}}">
215               Search for more results
216             </a>
217           </div>
218         {{/if}}
219       {{else}}
220         <div class="noresults">No search results found</div>
221       {{/if}}
222     </div>
223
224   {{else}}
225
226     <div id="intro" class="sidebar">
227       <h2>Welcome to Nominatim</h2>
228
229       <p>
230         Nominatim is a search engine for
231         <a href="https://www.openstreetmap.org">OpenStreetMap</a> data. This
232         is the debugging interface. You may search for a name or address
233         (forward search) or look up data by its geographic coordinate (reverse
234         search). Each result comes with a link to a details page where you
235         can inspect what data about the object is saved in the database and
236         investigate how the address of the object has been computed.
237       </p>
238
239       For more information visit the
240       <a href="https://nominatim.org">Nominatim home page</a>.
241     </div>
242
243   {{/if}}
244
245   <div id="map-wrapper">
246     <div id="map-position">
247       <div id="map-position-inner"></div>
248       <div id="map-position-close"><a href="#">hide</a></div>
249     </div>
250     <div id="map"></div>
251   </div>
252 </div>
253 </script>
254 <script id="reversepage-template" type="text/x-handlebars-template">
255
256 {{#*inline "partial_one_result"}}
257   <div class="result" data-position="{{iResNum}}">
258     {{formatMapIcon aResult}}
259
260     <span class="name">{{aResult.display_name}}</span>
261     <span class="type">{{formatLabel aResult}}</span>
262     <p class="coords">{{aResult.lat}},{{aResult.lon}}</p>  
263
264     <a class="details btn btn-outline-secondary btn-sm"
265        href="details.html?osmtype={{shortOSMType aResult.osm_type}}&osmid={{aResult.osm_id}}">details</a>
266   </div>
267 {{/inline}}
268
269 <div class="top-bar">
270   <form class="form-inline" role="search" accept-charset="UTF-8" action="">
271     <div class="form-group">
272       <input name="format" type="hidden" value="html">
273       <label>lat</label>
274       <input name="lat"
275              type="text"
276              class="form-control form-control-sm"
277              placeholder="latitude"
278              value="{{fLat}}" />
279       <a id="switch-coords" class="btn btn-outline-secondary btn-sm" title="switch lat and lon">&lt;&gt;</a>
280       <label>lon</label>
281       <input name="lon"
282              type="text"
283              class="form-control form-control-sm"
284              placeholder="longitude"
285              value="{{fLon}}" />
286       <label>max zoom</label>
287       <select name="zoom" class="form-control form-control-sm" value="{{iZoom}}">
288         {{zoomLevels iZoom}}
289       </select>
290       <button type="submit" class="btn btn-primary btn-sm mx-1">
291         Search
292       </button>
293     </div>
294     <div class="search-type-link">
295       <a href="search.html">forward search</a>
296     </div>
297   </form>
298 </div>
299
300 <div id="content">
301   {{#if aPlace}}
302     <div id="searchresults" class="sidebar">
303       {{>partial_one_result iResNum=0 aResult=aPlace env=env}}
304     </div>
305   {{else}}
306     <div id="intro" class="sidebar">
307       Search for coordinates or click anywhere on the map.
308     </div>
309   {{/if}}
310
311   <div id="map-wrapper">
312     <div id="map-position">
313       <div id="map-position-inner"></div>
314       <div id="map-position-close"><a href="#">hide</a></div>
315     </div>
316     <div id="map"></div>
317   </div>
318 </div>
319 </script>
320 <script id="detailspage-template" type="text/x-handlebars-template">
321
322 {{#*inline "partial_details_one_row"}}
323   <tr class="{{#unless this.isaddress}}notused{{/unless}}">
324     <td class="name">
325       {{#if this.localname}}
326         {{this.localname}}
327       {{else}}
328         <span class="noname">No Name</span>
329       {{/if}}
330     </td>
331     <td>{{formatPlaceType this}}</td>
332     <td>{{osmLink this}}</td>
333     <td>{{this.rank_address}}</td>
334     <td>{{formatAdminLevel this.admin_level}}</td>
335     <td>{{formatDistance this.distance bDistanceInMeters}}</td>
336     <td>{{detailsPermaLink this 'details >'}}</td>
337   </tr>
338 {{/inline}}
339
340 {{#*inline "partial_details_keyword_one_row"}}
341   <tr>
342     <td>{{formatKeywordToken this.token}}</td>
343     {{#if this.id}}
344       <td>word id: {{this.id}}</td>
345     {{/if}}
346   </tr>
347 {{/inline}}
348
349
350 {{#*inline "partial_h2"}}
351   <tr class="all-columns"><td colspan="6"><h2>{{this}}</h2></td></tr>
352 {{/inline}}
353
354 {{#*inline "partial_h3"}}
355   <tr class="all-columns"><td colspan="6"><h3>{{this}}</h3></td></tr>
356 {{/inline}}
357
358 <div class="container">
359   <div class="row">
360     <div class="col-sm-10">
361       <h1>
362         {{aPlace.localname}}
363         <small>{{detailsPermaLink aPlace 'link to this page'}}</small>
364       </h1>
365     </div>
366     <div class="col-sm-2 text-right">
367       {{formatMapIcon aPlace}}
368     </div>
369   </div>
370   <div class="row">
371     <div class="col-md-6">
372       <table id="locationdetails" class="table table-striped">
373         <tr>
374           <td>Name</td>
375           <td>
376             {{#each aPlace.names}}
377               <div class="line">
378                 <span class="name">{{this}}</span> ({{@key}})
379               </div>
380             {{/each}}
381           </td>
382         </tr>
383         <tr>
384           <td>Type</td>
385           <td>{{aPlace.category}}:{{aPlace.type}}</td>
386         </tr>
387         <tr>
388           <td>Last Updated</td>
389           <td>{{aPlace.indexed_date}}</td>
390         </tr>
391         <tr>
392           <td>Admin Level</td>
393           <td>{{aPlace.admin_level}}</td>
394         </tr>
395         <tr>
396           <td>Rank</td>
397           <td>{{formatSearchRank aPlace.rank_search}}</td>
398         </tr>
399         {{#if aPlace.calculated_importance}}
400           <tr>
401             <td>Importance</td>
402             <td>
403               {{aPlace.calculated_importance}}
404               {{#unless aPlace.importance}} (estimated){{/unless}}
405             </td>
406           </tr>
407         {{/if}}
408         <tr>
409           <td>Coverage</td>
410           <td>{{coverageType aPlace}}</td>
411         </tr>
412         <tr>
413           <td>Centre Point (lat,lon)</td>
414           <td>
415             {{aPlace.centroid.coordinates.[1]}},{{aPlace.centroid.coordinates.[0]}}
416           </td>
417         </tr>
418         <tr>
419           <td>OSM</td>
420           <td>{{osmLink aPlace}}
421         </tr>
422         <tr>
423           <td>
424             Place Id
425             (<a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)
426           </td>
427           <td>{{aPlace.place_id}}</td>
428         </tr>
429         {{#if aPlace.calculated_wikipedia}}
430           <tr>
431             <td>Wikipedia Calculated</td>
432             <td>{{wikipediaLink aPlace}}</td>
433           </tr>
434         {{/if}}
435         <tr>
436           <td>Computed Postcode</td>
437           <td>{{aPlace.calculated_postcode}}</td>
438         </tr>
439         <tr>
440           <td>Address Tags</td>
441           <td>
442             {{#each aPlace.addresstags}}
443               <div class="line">
444                 <span class="name">{{this}}</span> ({{@key}})
445               </div>
446             {{/each}}
447           </td>
448         </tr>
449         <tr>
450           <td>Extra Tags</td>
451           <td>
452             {{#each aPlace.extratags}}
453               <div class="line">
454                 <span class="name">{{this}}</span> ({{@key}})
455               </div>
456             {{/each}}
457           </td>
458         </tr>
459       </table>
460     </div>
461     <div class="col-md-6">
462       <div id="map"></div>
463     </div>
464   </div>
465   <div class="row">
466     <div class="col-md-12">
467       <h2>Address</h2>
468        <table id="address" class="table table-striped table-small">
469         <thead>
470           <tr>
471             <th>Local name</th>
472             <th>Type</th>
473             <th>OSM</th>
474             <th>Address rank</th>
475             <th>Admin level</th>
476             <th>Distance</th>
477             <th></th>
478           </tr>
479         </thead>
480         <tbody>
481           {{#if aPlace.address}}
482             {{#each aPlace.address}}
483               {{> partial_details_one_row bDistanceInMeters=false}}
484             {{/each}}
485           {{/if}}
486
487           {{#if aPlace.linked_places}}
488             {{> partial_h2 'Linked Places'}}
489             {{#each aPlace.linked_places}}
490               {{> partial_details_one_row bDistanceInMeters=true}}
491             {{/each}}
492           {{/if}}
493
494           {{#if aPlace.keywords}}
495             {{> partial_h2 'Name Keywords'}}
496             {{#each aPlace.keywords.name}}
497               {{> partial_details_keyword_one_row}}
498             {{/each}}
499
500             {{> partial_h2 'Address Keywords'}}
501             {{#each aPlace.keywords.address}}
502               {{> partial_details_keyword_one_row}}
503             {{/each}}
504           {{/if}}
505
506           {{> partial_h2 'Parent Of'}}
507           {{#if aPlace.hierarchy}}
508
509             {{#each aPlace.hierarchy as |lines type|}}
510               {{> partial_h3 type}}
511               {{#each lines}}
512                 {{> partial_details_one_row bDistanceInMeters=true}}
513               {{/each}}
514             {{/each}}
515           {{else}}
516             <tr>
517               <td>
518                 <a class="btn btn-outline-secondary btn-sm"
519                   href="{{base_url}}&hierarchy=1">display child places</a>
520               </td>
521             </tr>
522           {{/if}}
523           {{tooManyHierarchyLinesWarning aPlace}}
524         </tbody>
525       </table>
526     </div>
527   </div>
528 </div>
529
530 </script>
531 <script id="detailspage-index-template" type="text/x-handlebars-template">
532 <div class="container" id="details-index-page">
533   <div class="row">
534     <div class="col-md-12">
535
536       <h1>Show details for place</h1>
537
538       <div class="search-form">
539         <h4>Search by place id</h4>
540
541         <form class="form-inline" action="details.html">
542           <input type="edit"
543                  class="form-control input-sm"
544                  pattern="^[0-9]+$"
545                  name="place_id"
546                  placeholder="12345" />
547           <input type="submit"
548                  class="btn btn-primary btn-sm"
549                  value="Show" />
550         </form>
551       </div>
552
553       <div class="search-form">
554         <h4>Search by OSM type and OSM id</h4>
555
556         <form id="form-by-type-and-id"
557               class="form-inline"
558               action="details.html">
559           <input type="edit"
560                  class="form-control input-sm"
561                  pattern="^[NWR][0-9]+$"
562                  placeholder="N123 or W123 or R123" />
563           <input type="hidden" name="osmtype" />
564           <input type="hidden" name="osmid" />
565           <input type="submit" class="btn btn-primary btn-sm" value="Show" />
566         </form>
567       </div>
568
569       <div class="search-form">
570         <h4>Search by openstreetmap.org URL</h4>
571
572         <form id="form-by-osm-url"
573               class="form-inline"
574               action="details.html">
575           <input type="edit"
576                  class="form-control input-sm"
577                  pattern=".*openstreetmap.*"
578                  placeholder="https://www.openstreetmap.org/relation/123" />
579           <input type="hidden" name="osmtype" />
580           <input type="hidden" name="osmid" />
581           <input type="submit" class="btn btn-primary btn-sm" value="Show" />
582         </form>
583       </div>
584
585     </div>
586   </div>
587 </div></script>
588 <script id="deletable-template" type="text/x-handlebars-template">
589 <div class="container">
590   <div class="row">
591     <div class="col-sm-12">
592       <h1>Deletable</h1>
593
594       <p>
595           {{aPolygons.length}} objects have been deleted in OSM but are still in the Nominatim database.
596       </p>
597
598       <table class="table table-striped table-hover">
599         <thead>
600           <th>Place id</th>
601           <th>Country Code</th>
602           <th>Name</th>
603           <th>OSM id</th>
604           <th>OSM type</th>
605           <th>Class</th>
606           <th>Type</th>
607         </thead>
608         <tbody>
609           {{#each aPolygons}}
610           <tr>
611             <td>{{detailsLink this place_id}}</td>
612             <td>{{country_code}}</td>
613             <td>{{name}}</td>
614             <td>{{osmLink this}}</td>
615             <td>{{osm_type}}</td>
616             <td>{{class}}</td>
617             <td>{{type}}</td>
618           </tr>
619           {{/each}}
620         </tbody>
621       </table>
622
623
624     </div>
625   </div>
626 </div
627
628 </script>
629 <script id="polygons-template" type="text/x-handlebars-template">
630 <div class="container">
631   <div class="row">
632     <div class="col-sm-12">
633       <h1>Broken polygons</h1>
634
635       <p>
636           Total number of broken polygons: {{aPolygons.length}}.
637       </p>
638
639       <table class="table table-striped table-hover">
640         <thead>
641           <th>OSM type</th>
642           <th>OSM id</th>
643           <th>Class</th>
644           <th>Type</th>
645           <th>Name</th>
646           <th>Country Code</th>
647           <th>Error message</th>
648           <th>Updated</th>
649           <th>&nbsp;</th>
650         </thead>
651         <tbody>
652           {{#each aPolygons}}
653           <tr>
654             <td>{{osm_type}}</td>
655             <td>{{osmLink this}}</td>
656             <td>{{class}}</td>
657             <td>{{type}}</td>
658             <td>{{name}}</td>
659             <td>{{country_code}}</td>
660             <td>{{errormessage}}</td>
661             <td>{{updated}}</td>
662             <td>
663               <a href="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/{{formatOSMType osm_type}}/{{osm_id}}/full" target="josm">josm</a>
664             </td>
665           </tr>
666           {{/each}}
667         </tbody>
668       </table>
669
670
671     </div>
672   </div>
673 </div
674
675 </script>
676 </body>
677 </html>