linear

interpolates linearly between the pair of stops just less than and just greater than the input.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setProperties(
    fillColor(
      interpolate(
        linear(), zoom(),
        stop(1.0f, color(Color.RED)),
        stop(5.0f, color(Color.BLUE)),
        stop(10.0f, color(Color.GREEN))
      )
    )
);

Return

expression

See also