Compare commits

..
Author SHA1 Message Date
atsunatsu 0ec4c5dc6c chore: bump version to 4.4.7-ba7opf.11.3 (versionCode 484) 2026-09-21 11:35:33 +08:00
atsunatsu 8e8a3849df fix(map): first-call labels now appear exactly when grid lines do
The 11.2 gate only relaxed the pre-return zoom check, but the showLabels
gate below it still required LABEL_ZOOM_SUB (6.5), so first-call labels
stayed hidden in the 6.0..6.5 band where the 4-char grid lines render.
- Gate showLabels on GRID_ZOOM_SUB (6.0) when showFirstCallLabels is on.
- Relax MIN_LABEL_CELL_PX (48) to 0.6x for first-call mode so 1° cells
  (~45 px on the equator at zoom 6.0) are not filtered out.
Normal grid-code labels are unchanged (still LABEL_ZOOM_SUB).
2026-09-21 11:35:10 +08:00
2 changed files with 14 additions and 4 deletions

No files matched your search

@@ -370,7 +370,13 @@ class MaidenheadGridOverlay : Overlay() {
// Show as soon as the 4-char grid LINES appear (GRID_ZOOM_SUB), not
// only at the name-label zoom — user req 2026-09-21.
if (showFirstCallLabels && zoom < GRID_ZOOM_SUB) return
val showLabels = zoom >= LABEL_ZOOM_SUB || cellLat == FIELD_LAT
// First-call labels gate on the grid-LINE zoom; normal labels keep the
// name-label zoom (one level above the lines).
val showLabels = if (showFirstCallLabels) {
zoom >= GRID_ZOOM_SUB
} else {
zoom >= LABEL_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.
@@ -378,7 +384,11 @@ class MaidenheadGridOverlay : Overlay() {
val y2 = projectionToY(projection, 1.0)
if (y1 == null || y2 == null) return
val pixelsPerDegree = Math.abs(y2 - y1)
if (pixelsPerDegree * cellLat < MIN_LABEL_CELL_PX) return
// First-call labels must appear as soon as the 4-char grid LINES do
// (zoom 6.0), where 1° cells are ~45 px on the equator — below the
// 48 px normal-label threshold. Relax the pixel gate for this mode only.
val minCellPx = if (showFirstCallLabels) MIN_LABEL_CELL_PX * 0.6f else MIN_LABEL_CELL_PX
if (pixelsPerDegree * cellLat < minCellPx) return
val activePaint = if (showFirstCallLabels) firstCallPaint else labelPaint
activePaint.textAlign = Paint.Align.CENTER
+2 -2
View File
@@ -1,8 +1,8 @@
[versions]
#noinspection UnusedVersionCatalogEntry
appVersionCode = "483"
appVersionCode = "484"
#noinspection UnusedVersionCatalogEntry
appVersionName = "4.4.7-ba7opf.11.2"
appVersionName = "4.4.7-ba7opf.11.3"
#noinspection UnusedVersionCatalogEntry
compileSdk = "37"
#noinspection UnusedVersionCatalogEntry