From 052ba79c94ca1089ff51b9f065a99583e35a6cdb Mon Sep 17 00:00:00 2001 From: atsunatsu Date: Tue, 8 Sep 2026 01:51:14 +0800 Subject: [PATCH] fix(map): field labels visible at all zooms (pixel-size gated), not gated by FIELD_ZOOM_LABELS --- .../look4sat/feature/map/MaidenheadGridOverlay.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MaidenheadGridOverlay.kt b/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MaidenheadGridOverlay.kt index ed199a1a..fceb51be 100644 --- a/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MaidenheadGridOverlay.kt +++ b/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MaidenheadGridOverlay.kt @@ -201,12 +201,10 @@ class MaidenheadGridOverlay : Overlay() { } // Labels: centered in each cell, only when the cell is large enough on - // screen to hold a label (avoid clutter at low zoom) - val showLabels = when { - zoom >= GRID_ZOOM_SUB -> true - zoom >= FIELD_ZOOM_LABELS -> true - else -> false - } + // screen to hold a label (avoid clutter at low zoom). + // Field (2-char) labels show at every zoom, subject only to the pixel- + // size check below; sub-square (4-char) labels only from GRID_ZOOM_SUB. + val showLabels = zoom >= GRID_ZOOM_SUB || cellLat == FIELD_LAT if (!showLabels) return // Estimate on-screen cell height to avoid clutter at low zoom: // project two points 1° apart in latitude and measure the pixel distance.