Mapbox-gl-js: Add fallback option for ramps, scales and curves

Created on 17 May 2019  路  1Comment  路  Source: mapbox/mapbox-gl-js

Motivation

Mapbox already asigns the colour black as a fallback output for out-of-range inputs, so why not leave the use decide which colour should that be?

Implementation

["interpolate" | "interpolate-hcl" | "interpolate-lab" | "step",
    interpolation: ["linear"] | ["exponential", base] | ["cubic-bezier", x1, y1, x2, y2 ], // if not discrete
    input: number,
    stop_output_0: OutputType,
    stop_input_1: number, stop_output_1: OutputType,
    stop_input_n: number, stop_output_n: OutputType,
    ...,
    fallback: OutputType
]: OutputType
api cross-platform feature

Most helpful comment

not only out of range, also null

>All comments

not only out of range, also null

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aderaaij picture aderaaij  路  3Comments

stevage picture stevage  路  3Comments

muesliq picture muesliq  路  3Comments

Scarysize picture Scarysize  路  3Comments

iamdenny picture iamdenny  路  3Comments