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">
51 class="btn-close float-end m-1"
53 on:click|stopPropagation={closeHint}
56 Nightly calculated from nearby places having this postcode.
57 <a href="https://nominatim.org/release-docs/latest/admin/Maintenance/#updating-postcodes">
62 You can search for those with an
63 <a href={url} target="_blank" rel="noreferrer">Overpass Turbo query</a>.
66 <a href="https://nominatim.org/2022/06/26/state-of-postcodes.html"
67 target="_blank" rel="noreferrer">How Nominatim uses postcodes</a>.
74 background-color: #ededff;