From 8081889f1e7dde99e813c847f89d47ecaf9ed527 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Wed, 4 Jun 2025 01:15:46 +0200 Subject: [PATCH] lighten dashboard --- templates/public/dashboard.html.twig | 46 +++------------------------- 1 file changed, 5 insertions(+), 41 deletions(-) diff --git a/templates/public/dashboard.html.twig b/templates/public/dashboard.html.twig index 4a9f3cc..b01043d 100644 --- a/templates/public/dashboard.html.twig +++ b/templates/public/dashboard.html.twig @@ -184,45 +184,9 @@ out body; >; out skel qt;`; {% endverbatim %} - - console.log(query); - console.log('https://overpass-api.de/api/interpreter'); - const response = await fetch('https://overpass-api.de/api/interpreter', { - method: 'POST', - body: query - }); - - const data = await response.json(); - console.log('data',data); - - // Ajouter un marqueur pour chaque point de la réponse - const bounds = new maplibregl.LngLatBounds(); - - data.elements.forEach(element => { - if (element.lat && element.lon) { - bounds.extend([element.lon, element.lat]); - - const el = document.createElement('div'); - el.className = 'marker'; - el.style.width = '10px'; - el.style.height = '10px'; - el.style.borderRadius = '50%'; - el.style.backgroundColor = '#ff0000'; - - new maplibregl.Marker(el) - .setLngLat([element.lon, element.lat]) - .setPopup(new maplibregl.Popup({ offset: 25 }) - .setHTML(`

${element.tags?.name || 'Sans nom'}

`)) - .addTo(map); - } - }); - - // Recentrer la carte sur les marqueurs - if (!bounds.isEmpty()) { - map.fitBounds(bounds, { - padding: 50 - }); - } + + + }); {% endblock %} @@ -236,7 +200,7 @@ out skel qt;`;

Statistiques : {{ stats|length }} codes postaux

-
+ {#
#} @@ -254,7 +218,7 @@ out skel qt;`; - +
{{ stat.zone }} {{ stat.name }} {{ stat.places |length }}{{ stat.placesCount }} {{ stat.completionPercent }}