Repository navigation
fix(coverage): Mapterhorn credit on MapLibre and antimeridian regions - #7759
Conversation
A coverage estimate is a GeoJSON source, which carries no attribution, so the MapLibre map credited Mapterhorn only while hillshade drew. A coverage layer now carries the credit and the main map adds it to the attribution button, deduplicated against the hillshade credit.
A region whose west is east of its east crosses the 180th meridian, and the overlap check rejected ground on both sides of it, so the estimate went to the network for terrain the region holds.
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: meshtastic/Meshtastic-Android
- Branch: fix/coverage-followups
- File: .coderabbit.yaml
- Commit: a7d3107
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
7ff964db-dbb6-4ad9-8b17-1636ffcbcbd8
Files selected for processing: 11-
feature/coverage/src/commonMain/kotlin/org/meshtastic/feature/coverage/RegionTerrain.ktfeature/coverage/src/commonTest/kotlin/org/meshtastic/feature/coverage/RegionTerrainTest.ktfeature/map-maplibre/src/commonMain/kotlin/org/meshtastic/feature/map/maplibre/MapLibreMapViewProvider.ktfeature/map-maplibre/src/commonMain/kotlin/org/meshtastic/feature/map/maplibre/MeshMap.ktfeature/map-maplibre/src/commonMain/kotlin/org/meshtastic/feature/map/maplibre/NodeTrackMap.ktfeature/map-maplibre/src/commonMain/kotlin/org/meshtastic/feature/map/maplibre/SecondaryMaps.ktfeature/map-maplibre/src/commonMain/kotlin/org/meshtastic/feature/map/maplibre/component/MapOrnaments.ktfeature/map-maplibre/src/commonMain/kotlin/org/meshtastic/feature/map/maplibre/component/ZoomControls.ktfeature/map-maplibre/src/commonMain/kotlin/org/meshtastic/feature/map/maplibre/layers/CustomLayer.ktfeature/map-maplibre/src/commonMain/kotlin/org/meshtastic/feature/map/maplibre/layers/RenderableLayers.ktfeature/map-maplibre/src/commonMain/kotlin/org/meshtastic/feature/map/maplibre/layers/TerrainLayers.kt
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
-
The library button draws nothing for a style with no attribution, as a custom raster basemap may have, which dropped the Mapterhorn credit with it. The main map now uses the same held-state button as the small maps, fed the extra credit.
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: meshtastic/Meshtastic-Android
- Branch: fix/coverage-followups
- File: .coderabbit.yaml
- Commit: 18ffa4a
- Layers: Repository YAML
- Review profile: CHILL
- Plan: Advanced
- Run ID:
cd7c77b7-0ddd-42aa-8e08-ea7d7e41c003
Files selected for processing: 1-
feature/map-maplibre/src/commonMain/kotlin/org/meshtastic/feature/map/maplibre/component/MapOrnaments.kt
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
-
Two follow-ups from #7758. The MapLibre map didn't credit Mapterhorn under a coverage layer, because a GeoJSON source has no attribution field. And an offline region that crosses the antimeridian never matched the ground it holds.
🐛 Bug Fixes
GeoBounds.intersectssplits a region whose west is east of its east at ±180°, so the estimate reads that region's terrain on both sides of the line.Testing Performed
RegionTerrainTest: a wrapped region meets ground on both sides of the line, misses ground between its ends, and boxes that only touch do not intersect.Summary by CodeRabbit