fix(map): the recorded Dawarich route reads on a busy street map

A thin, translucent dash over a nearly opaque white casing read as a pale trace and was barely visible on past trips. Full colour, a wider line and longer dashes, shared by the Leaflet and GL layers. TestFlight feedback, 5.1.3.
This commit is contained in:
Maurice
2026-11-11 20:41:24 +00:00
parent 7db5ec0721
commit 231a610466
5 changed files with 41 additions and 16 deletions
@@ -182,14 +182,17 @@ describe('useDawarichTrailGL', () => {
const [casingCall, lineCall] = gl.spies.addLayer.mock.calls
expect(casingCall[0].id).toBe(CASING_LAYER)
expect(casingCall[0].paint['line-color']).toBe(DAWARICH_TRAIL_CASING)
expect(casingCall[0].paint['line-width']).toBe(6)
expect(casingCall[0].paint['line-width']).toBe(7)
expect(casingCall[0].paint['line-opacity']).toBe(0.9)
expect(lineCall[0].id).toBe(LINE_LAYER)
// Per-feature colour, with the casing white as the fallback a feature
// without one falls back to. The GPX layer uses the same shape.
expect(lineCall[0].paint['line-color']).toEqual(['coalesce', ['get', 'color'], DAWARICH_TRAIL_CASING])
// Dashed, so the recording is distinguishable from the planned route for
// someone who cannot tell the two hues apart.
expect(lineCall[0].paint['line-dasharray']).toEqual([2, 1.6])
expect(lineCall[0].paint['line-dasharray']).toEqual([2.5, 1.25])
expect(lineCall[0].paint['line-width']).toBe(4)
expect(lineCall[0].paint['line-opacity']).toBe(1)
// Both go beneath the planned route's casing. The line is inserted second
// and therefore ends up above its own casing and still below the plan.