wip: snapshot V2 cascade onglet 2 (sauvegarde avant chirurgie git-hygiene)

This commit is contained in:
Jules Neny
2026-05-06 15:37:13 +02:00
parent 5878c56888
commit e63d02a351
101 changed files with 188900 additions and 3959 deletions

View File

@@ -128,8 +128,6 @@ async function initMap() {
updateMarkers(L)
}
let initialFitDone = false
function updateMarkers(L?: any) {
if (!mapInstance || !clusterGroup) return
const leaflet = L || (window as any).L
@@ -170,25 +168,6 @@ function updateMarkers(L?: any) {
markers.set(org.Id, marker)
clusterGroup.addLayer(marker)
})
// Bug E2E L3 : recadrer la carte sur les resultats filtres
if (orgsWithCoords.length > 0 && initialFitDone) {
try {
const bounds = leaflet.latLngBounds(
orgsWithCoords.map((o: any) => [o.latitude!, o.longitude!])
)
if (orgsWithCoords.length <= 15) {
mapInstance.fitBounds(bounds, {
padding: [40, 40],
maxZoom: 10,
animate: true,
})
}
} catch (e) {
console.warn('[NavMap] fitBounds echoue:', e)
}
}
initialFitDone = true
}
// Réagir aux changements de filtres (liste d'orgs)