diff --git a/frontend/js/map.js b/frontend/js/map.js index b2e9df0..45da51d 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]. -// Band 0 = custom/unknown (e.g. BARRANQUILLA) → always visible [0, 24]. -// Standard NOAA cells: restore max-zoom cutoffs so overview cells don't -// render on top of harbour cells (causing the Miami appear/disappear bug). -// The _recomputeHiddenCells logic hides lower-band cells when a higher-band -// cell dominates, but only works reliably when max-zoom bounds are in place. +// 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. const BAND_ZOOM_RANGES = { 0: [0, 24], // custom / unknown → always visible - 1: [0, 10], // Overview (1:600 000+) - 2: [3, 12], // General (1:350 000) - 3: [6, 15], // Coastal (1:90 000) - 4: [8, 18], // Approach (1:25 000) + 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) 5: [10, 24], // Harbour (1:7 500) 6: [12, 24], // Berthing (1:2 000) };