From a64a5eb735a995ec3ed4e0f08b0de95f21902f48 Mon Sep 17 00:00:00 2001 From: aerom Date: Thu, 30 Apr 2026 15:42:43 -0400 Subject: [PATCH] =?UTF-8?q?fix(band-zoom):=20restaura=20maxZoom=20original?= =?UTF-8?q?es=20=E2=80=94=20US1GC09M=20ocultaba=20boyas=20Miami?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El commit anterior removia los maxZoom de BAND_ZOOM_RANGES creyendo que afectaba a BARRANQUILLA. En realidad BARRANQUILLA es band=0 (cell_id no matchea el patron IHO) y siempre fue visible. Sin maxZoom, US1GC09M (Overview, band-1, 549 features del Golfo) aparecia en zoom 11 sobre Miami. Con declutter=true, sus 549 features competian con las de US4FL/US5FL y ocultaban casi todo por collision detection. Fix: restaurar exactamente los valores de v1-base para bands 1-4. Co-Authored-By: Claude Sonnet 4.6 --- frontend/js/map.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/js/map.js b/frontend/js/map.js index 45da51d..8db604e 100644 --- a/frontend/js/map.js +++ b/frontend/js/map.js @@ -1355,17 +1355,17 @@ window._chartCells = {}; // cell_id → { bbox: [w,s,e,n], band const _HIDDEN_CELLS = new Set(); // mutated on moveend by _recomputeHiddenCells // Band zoom ranges: [minZoom, maxZoom]. -// maxZoom = 24 for ALL bands — never cut a cell because of an upper zoom limit. -// Hiding lower-band cells when a higher-band cell is available is handled -// exclusively by _recomputeHiddenCells (≥40% viewport overlap). -// Without this, a custom cell like "CO1CO01M" (band-1 per IHO cell-ID convention) -// would disappear above zoom 10 even though it's the only chart in its area. +// Band 0 (custom/BARRANQUILLA) siempre visible [0,24]. +// Bands 1-4 tienen maxZoom para que celdas overview no compitan con harbour +// en zoom alto — sin estos límites, US1GC09M (549 features Overview) aparece +// en zoom 11 sobre Miami y su declutter oculta las boyas de mayor resolución. +// BARRANQUILLA no se afecta — su cell_id da band=0 por _bandFromCellId. const BAND_ZOOM_RANGES = { - 0: [0, 24], // custom / unknown → always visible - 1: [0, 24], // Overview (1:600 000+) - 2: [3, 24], // General (1:350 000) - 3: [6, 24], // Coastal (1:90 000) - 4: [8, 24], // Approach (1:25 000) + 0: [0, 24], // custom / unknown (ej. BARRANQUILLA) → siempre visible + 1: [0, 10], // Overview (1:600 000+) — se oculta a zoom >10 + 2: [3, 12], // General (1:350 000) + 3: [6, 15], // Coastal (1:90 000) + 4: [8, 18], // Approach (1:25 000) 5: [10, 24], // Harbour (1:7 500) 6: [12, 24], // Berthing (1:2 000) };