step

open fun step(@NonNull input: Number, @NonNull defaultOutput: Expression, stops: Array<Expression>): Expression(source)

Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(
        step(zoom(), literal(0.0f),
        literal(1.0f), literal(2.5f),
        literal(10.0f), literal(5.0f))
    )
);

Return

expression

Parameters

input

the input value

defaultOutput

the default output expression

stops

pair of input and output values

See also


open fun step(@NonNull input: Expression, @NonNull defaultOutput: Expression, @NonNull stops: Array<Expression>): Expression(source)

Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(
        step(zoom(), literal(0.0f),
        literal(1.0f), literal(2.5f),
        literal(10.0f), literal(5.0f))
    )
);

Return

expression

Parameters

input

the input expression

defaultOutput

the default output expression

stops

pair of input and output values

See also


open fun step(@NonNull input: Number, @NonNull defaultOutput: Expression, stops: Array<Expression.Stop>): Expression(source)
open fun step(@NonNull input: Expression, @NonNull defaultOutput: Expression, stops: Array<Expression.Stop>): Expression(source)

Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(
        step(zoom(), literal(0.0f),
        stop(1, 2.5f),
        stop(10, 5.0f))
    )
);

Return

expression

Parameters

input

the input value

defaultOutput

the default output expression

stops

pair of input and output values

See also


open fun step(@NonNull input: Number, @NonNull defaultOutput: Number, stops: Array<Expression>): Expression(source)

Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(
        step(1.0f, 0.0f,
        literal(1.0f), literal(2.5f),
        literal(10.0f), literal(5.0f))
    )
);

Return

expression

Parameters

input

the input value

defaultOutput

the default output expression

stops

pair of input and output values

See also


open fun step(@NonNull input: Expression, @NonNull defaultOutput: Number, stops: Array<Expression>): Expression(source)

Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(
        step(zoom(), 0.0f,
        literal(1.0f), literal(2.5f),
        literal(10.0f), literal(5.0f))
    )
);

Return

expression

Parameters

input

the input expression

defaultOutput

the default output expression

stops

pair of input and output values

See also


open fun step(@NonNull input: Number, @NonNull defaultOutput: Number, stops: Array<Expression.Stop>): Expression(source)
open fun step(@NonNull input: Expression, @NonNull defaultOutput: Number, stops: Array<Expression.Stop>): Expression(source)

Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values (\"stops\"). The `input` may be any numeric expression (e.g., `[\"get\", \"population\"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first input if the input is less than the first stop.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(
        step(zoom(), 0.0f,
        stop(1, 2.5f),
        stop(10, 5.0f))
    )
);

Return

expression

Parameters

input

the input value

defaultOutput

the default output expression

stops

pair of input and output values

See also