mirror of
https://forge.chapril.org/tykayn/osm-commerces
synced 2025-06-20 01:44:42 +02:00
up dashboard
This commit is contained in:
parent
cb90be8ff2
commit
1ec88b47a1
1 changed files with 18 additions and 2 deletions
|
@ -60,12 +60,28 @@
|
|||
}
|
||||
|
||||
const postalCodes = [{% for stat in stats %}'{{ stat.zone }}'{% if not loop.last %}, {% endif %}{% endfor %}];
|
||||
|
||||
{% verbatim %}
|
||||
|
||||
// exemple de recherche de villes par leur code postal:
|
||||
// [out:json][timeout:25];
|
||||
// (
|
||||
// {{geocodeArea:76200}}->.searchArea_1;
|
||||
// nwr["boundary"="administrative"]["admin_level"="8"]
|
||||
// ["name"](area.searchArea_1);
|
||||
// {{geocodeArea:76000}}->.searchArea_2;
|
||||
// nwr["boundary"="administrative"]["admin_level"="8"]["name"](area.searchArea_2);
|
||||
// ) ;
|
||||
// out center;
|
||||
{% endverbatim %}
|
||||
|
||||
console.log(postalCodes);
|
||||
let postalLines = ``;
|
||||
postalCodes.forEach(code => {
|
||||
if (/^\d+$/.test(code)) {
|
||||
postalLines += `\nnode[place=city]["addr:postcode"=${code}][name];`
|
||||
|
||||
{% verbatim %}
|
||||
postalLines += `\n{{geocodeArea:${code}}}->.searchArea_${code};\nnwr[admin_level=8]["name"](area.searchArea_${code});`
|
||||
{% endverbatim %}
|
||||
}
|
||||
});
|
||||
const query = `[out:json][timeout:25];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue