Class MBRampsScalesCurves

All Implemented Interfaces:
Expression, Function

public class MBRampsScalesCurves extends MBExpression
  • Constructor Details

    • MBRampsScalesCurves

      public MBRampsScalesCurves(JSONArray json)
  • Method Details

    • rscInterpolate

      public Expression rscInterpolate()
      Produces continuous, smooth results by interpolating between 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. The output type must be number, array<number>, or color. Example: ["interpolate", interpolation: ["linear"] | ["exponential", base] | ["cubic-bezier", x1, y1, x2, y2 ], input: number, stop_input_1: number, stop_output_1: OutputType, stop_input_n: number, stop_output_n: OutputType, ... ]: OutputType (number, array<number>, or Color)"
    • rscStep

      public Expression rscStep()
      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 of the last stop less than or equal to the input, or the first output (output_0) when the input is below the first stop.
    • getExpression

      public Expression getExpression() throws MBFormatException
      Description copied from class: MBExpression
      Determines which expression to use.
      Specified by:
      getExpression in class MBExpression
      Throws:
      MBFormatException