lineProgress

Gets the progress along a gradient line. Can only be used in the line-gradient property.

Example usage:


LineLayer layer = new LineLayer("layer-id", "source-id");
layer.setProperties(
    lineGradient(interpolate(
        linear(), lineProgress(),
        stop(0f, rgb(0, 0, 255)),
        stop(0.5f, rgb(0, 255, 0)),
        stop(1f, rgb(255, 0, 0)))
    )
);

Return

expression

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#line-progress">Style specification</a>