fix(band-zoom): restaura maxZoom originales — US1GC09M ocultaba boyas Miami

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 <noreply@anthropic.com>
This commit is contained in:
2026-04-30 15:42:43 -04:00
parent b92a3db523
commit a64a5eb735
+10 -10
View File
@@ -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)
};