diff --git a/web/fleet-core.js b/web/fleet-core.js index edcce4e..a8e344a 100644 --- a/web/fleet-core.js +++ b/web/fleet-core.js @@ -206,14 +206,14 @@ export function initMap(elementId, opts = {}) { ['==', ['get', 'low_accuracy'], true], '#f59e0b', '#0b1220', ], + // zoom must stay the top-level interpolate input; the low-accuracy + // widening goes in the per-stop output (a `case`), since MapLibre + // forbids a zoom expression nested inside a `case`. 'circle-stroke-width': [ - 'case', - ['==', ['get', 'low_accuracy'], true], 2.5, - ['interpolate', ['linear'], ['zoom'], - 5, 0.5, - 12, 1.5, - 16, 2, - ], + 'interpolate', ['linear'], ['zoom'], + 5, ['case', ['==', ['get', 'low_accuracy'], true], 2.5, 0.5], + 12, ['case', ['==', ['get', 'low_accuracy'], true], 2.5, 1.5], + 16, ['case', ['==', ['get', 'low_accuracy'], true], 2.5, 2], ], }, });