Fix tamaño boyas cardinal e ISD: usar funciones 3D sz=48
Las cardinales (CARDINAL_N/E/S/W) e ISD (ISOLATED_DANGER) usaban _ialaBoyCar/_ialaBoyIsd (funciones SVG-port, canvas ~17x35 px) mientras que las laterales usaban _encBuoyCanvas sz=52. La diferencia de canvas base causaba que cardinal e ISD se vieran mucho más pequeñas. Cambio a _encCardinalCanvas/_encIsdCanvas/_encSawCanvas (funciones 3D) con sz=48 — comparable a las laterales en sz=52. La luz flare se añade sobre el canvas ya dibujado si la ayuda tiene light_desc. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+27
-8
@@ -1579,27 +1579,46 @@ function encStyle(feature, resolution) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// ── Cardinal buoys ──────────────────────────────────────────────────────
|
// ── 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_N':
|
||||||
case 'CARDINAL_E':
|
case 'CARDINAL_E':
|
||||||
case 'CARDINAL_S':
|
case 'CARDINAL_S':
|
||||||
case 'CARDINAL_W': {
|
case 'CARDINAL_W': {
|
||||||
const q = aidType.split('_')[1];
|
const q = aidType.split('_')[1];
|
||||||
canvas = _cachedIcon(`iala_car_${q}_${hasLight}`,
|
canvas = _cachedIcon(`enc_car_${q}_${hasLight}`, () => {
|
||||||
() => _withFlare(() => _ialaBoyCar(q), 2 * _IALA_S, _lightCss));
|
const cv = _encCardinalCanvas(q, 48);
|
||||||
|
if (hasLight) _drawLightFlare(cv.getContext('2d'), cv.width / 2,
|
||||||
|
cv.height * 0.08, _lightCss);
|
||||||
|
return cv;
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'CARDINAL_UNKNOWN':
|
case 'CARDINAL_UNKNOWN':
|
||||||
canvas = _cachedIcon(`iala_car_unk_${hasLight}`,
|
canvas = _cachedIcon(`enc_car_unk_${hasLight}`, () => {
|
||||||
() => _withFlare(() => _ialaBoyCar('N'), 2 * _IALA_S, _lightCss));
|
const cv = _encCardinalCanvas('N', 48);
|
||||||
|
if (hasLight) _drawLightFlare(cv.getContext('2d'), cv.width / 2,
|
||||||
|
cv.height * 0.08, _lightCss);
|
||||||
|
return cv;
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
// ── Other buoy types ────────────────────────────────────────────────────
|
// ── Other buoy types ────────────────────────────────────────────────────
|
||||||
case 'ISOLATED_DANGER':
|
case 'ISOLATED_DANGER':
|
||||||
canvas = _cachedIcon(`iala_isd_${hasLight}`,
|
canvas = _cachedIcon(`enc_isd_${hasLight}`, () => {
|
||||||
() => _withFlare(() => _ialaBoyIsd(), 2 * _IALA_S, '#cc0000'));
|
const cv = _encIsdCanvas(48);
|
||||||
|
if (hasLight) _drawLightFlare(cv.getContext('2d'), cv.width / 2,
|
||||||
|
cv.height * 0.08, _lightCss);
|
||||||
|
return cv;
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'SAFE_WATER':
|
case 'SAFE_WATER':
|
||||||
canvas = _cachedIcon(`iala_saw_${hasLight}`,
|
canvas = _cachedIcon(`enc_saw_${hasLight}`, () => {
|
||||||
() => _withFlare(() => _ialaBoySaw(), 2 * _IALA_S, '#cc0000'));
|
const cv = _encSawCanvas(48);
|
||||||
|
if (hasLight) _drawLightFlare(cv.getContext('2d'), cv.width / 2,
|
||||||
|
cv.height * 0.08, _lightCss);
|
||||||
|
return cv;
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'SPECIAL': {
|
case 'SPECIAL': {
|
||||||
// BOYSPEC/BOYSPP — route through _encBuoyCanvas with sphere or special shape
|
// BOYSPEC/BOYSPP — route through _encBuoyCanvas with sphere or special shape
|
||||||
|
|||||||
Reference in New Issue
Block a user