t-ujiie-g/mbtmap/expr does not have a README file

    Curve

    pub(all) enum Curve {
    Linear
    Exponential(Double)
    CubicBezier(Double, Double, Double, Double)
    }

    How interpolate goes between stops: straight, exponentially with a base, or along a cubic Bézier curve.

    Expr

    pub struct Expr {
    // private fields
    }

    A value of a style property or filter: a constant or one of MapLibre's expressions (https://maplibre.org/maplibre-style-spec/expressions/), held as the JSON the style takes.

    Expr::to_json

    The JSON the style takes for self.

    add

    fn add(a : Expr, b : Expr) -> Expr

    all

    fn all(conditions : Array[Expr]) -> Expr

    any

    fn any(conditions : Array[Expr]) -> Expr

    bool

    fn bool(b : Bool) -> Expr

    case_

    fn case_(branches : Array[(Expr, Expr)], default~ : Expr) -> Expr

    The output of the first condition of branches that holds, else default.

    coalesce

    fn coalesce(values : Array[Expr]) -> Expr

    The first of values that is not null.

    color

    fn color(css : String) -> Expr

    A CSS color: "#2166ac", "rgba(0, 0, 0, 0.5)", "steelblue", …

    concat

    fn concat(values : Array[Expr]) -> Expr

    The text of values joined.

    div

    fn div(a : Expr, b : Expr) -> Expr

    fn eq(a : Expr, b : Expr) -> Expr

    feature_state

    fn feature_state(key : String) -> Expr

    The feature's state key (Map::set_feature_state).
    fn ge(a : Expr, b : Expr) -> Expr

    geometry_type

    fn geometry_type() -> Expr

    The feature's geometry type: "Point", "LineString" or "Polygon".

    get

    fn get(key : String) -> Expr

    The feature's property key (["get", key]).

    global_state

    fn global_state(key : String) -> Expr

    The map's global state key.
    fn gt(a : Expr, b : Expr) -> Expr

    has

    fn has(key : String) -> Expr

    Whether the feature has property key.
    fn id() -> Expr

    The feature's id.

    image

    fn image(name : String) -> Expr

    The style image name (icon-image, *-pattern).

    in_

    fn in_(input : Expr, values : Array[
    Json
    ]) -> Expr

    Whether input is one of values (["in", input, ["literal", values]]).

    interpolate

    fn interpolate(input : Expr, stops : Array[(Double, Expr)], curve? : Curve) -> Expr

    The outputs of stops (input, output; inputs ascending) interpolated at input along curve.
    fn le(a : Expr, b : Expr) -> Expr

    literal

    fn literal(value :
    Json
    ) -> Expr

    ["literal", value]: an array or object taken as data, not as an expression.
    fn lt(a : Expr, b : Expr) -> Expr

    match_

    fn match_(input : Expr, cases : Array[(
    Json
    , Expr)], default~ : Expr) -> Expr

    The output of the first label of cases equal to input, else default. Labels are strings, numbers or arrays of them.

    mul

    fn mul(a : Expr, b : Expr) -> Expr

    fn ne(a : Expr, b : Expr) -> Expr

    not_

    fn not_(condition : Expr) -> Expr

    num

    fn num(n : Double) -> Expr

    nums

    fn nums(values : Array[Double]) -> Expr

    An array of numbers (line-dasharray, text-offset, …).

    raw

    json as it is: an expression or constant written as JSON.

    step

    fn step(input : Expr, base : Expr, stops : Array[(Double, Expr)]) -> Expr

    base below the first stop, then the output of the last stop (input, output) not above input.

    str

    fn str(s : String) -> Expr

    sub

    fn sub(a : Expr, b : Expr) -> Expr

    to_number

    fn to_number(value : Expr) -> Expr

    to_string

    fn to_string(value : Expr) -> Expr

    zoom

    fn zoom() -> Expr

    The map's zoom (only as the input of a top-level interpolate or step).

    Source Files