diff --git a/frontend/js/map.js b/frontend/js/map.js index dec54f9..4bd23c3 100644 --- a/frontend/js/map.js +++ b/frontend/js/map.js @@ -1579,27 +1579,46 @@ function encStyle(feature, resolution) { break; } // ── Cardinal buoys ────────────────────────────────────────────────────── + // Usan _encCardinalCanvas (3-D, sz=48) para igualar el tamaño de las boyas + // laterales (_encBuoyCanvas sz=52). Las funciones IALA SVG-port producían + // un canvas de ~17×35 px que resultaba demasiado pequeño en el mapa. case 'CARDINAL_N': case 'CARDINAL_E': case 'CARDINAL_S': case 'CARDINAL_W': { const q = aidType.split('_')[1]; - canvas = _cachedIcon(`iala_car_${q}_${hasLight}`, - () => _withFlare(() => _ialaBoyCar(q), 2 * _IALA_S, _lightCss)); + canvas = _cachedIcon(`enc_car_${q}_${hasLight}`, () => { + const cv = _encCardinalCanvas(q, 48); + if (hasLight) _drawLightFlare(cv.getContext('2d'), cv.width / 2, + cv.height * 0.08, _lightCss); + return cv; + }); break; } case 'CARDINAL_UNKNOWN': - canvas = _cachedIcon(`iala_car_unk_${hasLight}`, - () => _withFlare(() => _ialaBoyCar('N'), 2 * _IALA_S, _lightCss)); + canvas = _cachedIcon(`enc_car_unk_${hasLight}`, () => { + const cv = _encCardinalCanvas('N', 48); + if (hasLight) _drawLightFlare(cv.getContext('2d'), cv.width / 2, + cv.height * 0.08, _lightCss); + return cv; + }); break; // ── Other buoy types ──────────────────────────────────────────────────── case 'ISOLATED_DANGER': - canvas = _cachedIcon(`iala_isd_${hasLight}`, - () => _withFlare(() => _ialaBoyIsd(), 2 * _IALA_S, '#cc0000')); + canvas = _cachedIcon(`enc_isd_${hasLight}`, () => { + const cv = _encIsdCanvas(48); + if (hasLight) _drawLightFlare(cv.getContext('2d'), cv.width / 2, + cv.height * 0.08, _lightCss); + return cv; + }); break; case 'SAFE_WATER': - canvas = _cachedIcon(`iala_saw_${hasLight}`, - () => _withFlare(() => _ialaBoySaw(), 2 * _IALA_S, '#cc0000')); + canvas = _cachedIcon(`enc_saw_${hasLight}`, () => { + const cv = _encSawCanvas(48); + if (hasLight) _drawLightFlare(cv.getContext('2d'), cv.width / 2, + cv.height * 0.08, _lightCss); + return cv; + }); break; case 'SPECIAL': { // BOYSPEC/BOYSPP — route through _encBuoyCanvas with sphere or special shape