7 // Based on the map bounds, you can zoom out and rerun the query
9 [timeout:30]; // in seconds
11 // we define a shortcut
12 // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries
13 {{postcode=${postcode}}}
16 node["addr:postcode"="{{postcode}}"]({{bbox}});
17 way["addr:postcode"="{{postcode}}"]({{bbox}});
18 relation["addr:postcode"="{{postcode}}"]({{bbox}});
20 node["postal_code"="{{postcode}}"]({{bbox}});
21 way["postal_code"="{{postcode}}"]({{bbox}});
22 relation["postal_code"="{{postcode}}"]({{bbox}});
28 `.replace(/^ {4}/gm, '');
30 // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Development#URL_Parameters
34 let url = 'https://overpass-turbo.eu/'
35 + '?Q=' + encodeURIComponent(overpass_query)
36 + '&C=' + encodeURIComponent([lat, lon, 15].join(';'))
40 document.getElementById('postcode-hint').style.display = 'block';
42 function closeHint() {
43 document.getElementById('postcode-hint').style.display = 'none';
47 (<a href="#openHint" on:click|preventDefault|stopPropagation={openHint}>how?</a>)
49 <div id="postcode-hint" class="my-2 p-2">
50 <button type="button" class="close" aria-label="Close" on:click|stopPropagation={closeHint}>
51 <span aria-hidden="true">×</span>
54 Nightly calculated from nearby places having this postcode.
55 <a href="https://nominatim.org/release-docs/latest/develop/Postcodes/">Documentation</a>.
56 You can search for those with an <a href={url} target="_blank">Overpass Turbo query</a>.
62 background-color: #ededff;