lineGradient

Mapbox line-gradient — a color expression that varies along the line's arc-length parameter via ["line-progress"]. The layer subdivides each polyline into GRADIENT_SUBDIVISIONS segments and samples the gradient at each segment's midpoint to produce a piecewise-constant approximation that flows through the existing batched line path (no shader changes). Visually close enough for standard "elevation-tinted route" use; near-instant transitions look slightly stepped at the segment boundaries.