You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(map): add polar grid overlay to Map Analysis and Unified maps (#3971)
Extend the polar grid overlay (range rings + azimuth sectors centered on the
own-node position, #2307) from NodesTab to two more map surfaces, reusing the
existing `PolarGridOverlay` component and `getPolarGridRings()` utility.
Map Analysis:
- New `PolarGridLayer` draws a theme-colored grid centered on each active
source's own-node position (resolved per `sourceId`).
- Toggle added to the toolbar, disabled when no active source has a known
own-node position.
Unified / Dashboard map:
- Renders one grid per source that has an own-node position, each colored to
match that source's per-source color (via `resolveSourceColor`), with a
legend so overlapping grids stay distinguishable.
- Toggle reuses the existing `MapContext.showPolarGrid` (unified across map
surfaces), disabled when no source has a position.
Own-node positions are resolved from each source's local `nodeNum` (surfaced by
`GET /api/sources/:id/status`) paired with that node's position in the shared
node list — see new `getOwnNodePositions` util and `useOwnNodePositions` hook.
MeshCore sources (no meshtastic nodeNum) naturally yield no grid.
`PolarGridOverlay` gains an optional `color` prop; when set it recolors the whole
grid at reduced opacity (theme palette otherwise, unchanged for NodesTab).
Tests: new ownNodePositions unit tests, PolarGridOverlay color-override test,
and a Map Analysis toolbar disabled-state test. Full suite green (0 failures).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015AFBA76hsjqhsXe1BdnYub
0 commit comments