up dashboard

This commit is contained in:
Tykayn 2025-06-01 23:58:00 +02:00 committed by tykayn
parent cb90be8ff2
commit 1ec88b47a1

View file

@ -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];