fix(band-zoom): quita maxZoom cutoffs — Barranquilla (CO1CO01M=band1) desaparecia a zoom>10

La celda CO1CO01M es band-1 por convencion IHO (CO=Colombia, 1=Overview).
Con maxZoom=10 para band-1, la carta desaparecia completamente a zoom>10.

Solucion: todas las bandas tienen maxZoom=24. La logica _recomputeHiddenCells
(que ya maneja solo cuando una celda de mayor resolucion domina el viewport)
se encarga de ocultar las celdas de menor resolucion cuando hay una mejor.
Esto funciona para NOAA Miami (band-1 se oculta cuando band-5 cubre 40%+)
y para Barranquilla (band-0/1, sin rival, siempre visible a cualquier zoom).
This commit is contained in:
2026-04-30 14:10:36 -04:00
parent 293b0c45ef
commit b92a3db523
+9 -9
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 const _HIDDEN_CELLS = new Set(); // mutated on moveend by _recomputeHiddenCells
// Band zoom ranges: [minZoom, maxZoom]. // Band zoom ranges: [minZoom, maxZoom].
// Band 0 = custom/unknown (e.g. BARRANQUILLA) → always visible [0, 24]. // maxZoom = 24 for ALL bands — never cut a cell because of an upper zoom limit.
// Standard NOAA cells: restore max-zoom cutoffs so overview cells don't // Hiding lower-band cells when a higher-band cell is available is handled
// render on top of harbour cells (causing the Miami appear/disappear bug). // exclusively by _recomputeHiddenCells (≥40% viewport overlap).
// The _recomputeHiddenCells logic hides lower-band cells when a higher-band // Without this, a custom cell like "CO1CO01M" (band-1 per IHO cell-ID convention)
// cell dominates, but only works reliably when max-zoom bounds are in place. // would disappear above zoom 10 even though it's the only chart in its area.
const BAND_ZOOM_RANGES = { const BAND_ZOOM_RANGES = {
0: [0, 24], // custom / unknown → always visible 0: [0, 24], // custom / unknown → always visible
1: [0, 10], // Overview (1:600 000+) 1: [0, 24], // Overview (1:600 000+)
2: [3, 12], // General (1:350 000) 2: [3, 24], // General (1:350 000)
3: [6, 15], // Coastal (1:90 000) 3: [6, 24], // Coastal (1:90 000)
4: [8, 18], // Approach (1:25 000) 4: [8, 24], // Approach (1:25 000)
5: [10, 24], // Harbour (1:7 500) 5: [10, 24], // Harbour (1:7 500)
6: [12, 24], // Berthing (1:2 000) 6: [12, 24], // Berthing (1:2 000)
}; };