mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 18:54:17 +00:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user