From 556967db5aad04843157ddd0ffe782a64a38124d Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sun, 26 Apr 2026 09:54:07 -0500 Subject: [PATCH] feat(grid): show full Maidenhead label at subsquare zoom (em13sf, not sf) --- assets/js/maidenhead_grid.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/maidenhead_grid.ts b/assets/js/maidenhead_grid.ts index 49ee23cc..fae3a13a 100644 --- a/assets/js/maidenhead_grid.ts +++ b/assets/js/maidenhead_grid.ts @@ -87,8 +87,8 @@ function drawGridSquare( const px = Math.abs(ne.x - sw.x) const minW = sub ? 25 : field ? 30 : 40 if (px > minW) { - // Subsquares show just the last 2 chars (e.g. "kp"), others show full label - const text = sub ? grid.substring(4, 6) : grid.substring(0, field ? 2 : 4) + // Show the full grid label at every level (e.g. "EM13sf" for a subsquare) + const text = field ? grid.substring(0, 2) : sub ? grid.substring(0, 6) : grid.substring(0, 4) const len = text.length const fs = Math.max(9, Math.min(sub ? 12 : 14, Math.round(px / (len * 1.2)))) layerGroup.addLayer(L.marker([c.center.lat, c.center.lon], {