From 3eebf4fdb93b9e08703644dc81127868a66b01bb Mon Sep 17 00:00:00 2001 From: jubnl Date: Fri, 15 May 2026 22:05:26 +0200 Subject: [PATCH] fix(map): enable 3D terrain for Mapbox outdoors style in trip planner wantsTerrain() only matched satellite styles, so the outdoors-v12 style was flat in the planner despite showing correct 3D terrain in the settings preview. Added outdoors-v12 to the allowlist; marker drift is already handled by syncMarkerAltitudes(). Fixes #1002 --- client/src/components/Map/mapboxSetup.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client/src/components/Map/mapboxSetup.ts b/client/src/components/Map/mapboxSetup.ts index b3fc9071..a77fa2d0 100644 --- a/client/src/components/Map/mapboxSetup.ts +++ b/client/src/components/Map/mapboxSetup.ts @@ -8,13 +8,15 @@ export function isStandardFamily(style: string): boolean { return style === 'mapbox://styles/mapbox/standard' || style === 'mapbox://styles/mapbox/standard-satellite' } -// Terrain is only genuinely useful for the satellite imagery styles — on -// clean flat styles like streets/light/dark it nudges route lines onto -// the DEM while our HTML markers stay at Z=0, which causes the visible -// offset when the map is pitched. Restrict terrain to satellite. +// Terrain is only genuinely useful for styles that benefit from elevation +// data. On flat vector styles (streets/light/dark) it nudges route lines +// onto the DEM while HTML markers stay at Z=0, causing a visible drift +// when the map is pitched. Satellite and Outdoors are the intended styles +// for terrain; markers are re-pinned by syncMarkerAltitudes(). export function wantsTerrain(style: string): boolean { return style === 'mapbox://styles/mapbox/satellite-v9' || style === 'mapbox://styles/mapbox/satellite-streets-v12' + || style === 'mapbox://styles/mapbox/outdoors-v12' } // 3D can be added to every style now — the standard family has it built-in