Returns true if all the inputs are true, false otherwise. The
inputs are evaluated in order, and evaluation is short-circuiting:
once an input expression evaluates to false, the result is false
and no further input expressions are evaluated.
Returns true if any of the inputs are true, false otherwise. The
inputs are evaluated in order, and evaluation is short-circuiting:
once an input expression evaluates to true, the result is true and
no further input expressions are evaluated.
Asserts that the input is an array (optionally with a specific item
type and length). If, when the input expression is evaluated, it is
not of the asserted type, then this assertion will cause the whole
expression to be aborted.
Asserts that the input value is a boolean. If multiple values are
provided, each one is evaluated in order until a boolean is obtained.
If none of the inputs are booleans, the expression is an error.
Returns a collator for use in locale-dependent comparison
operations. The case-sensitive and diacritic-sensitive options
default to false. The locale argument specifies the IETF language
tag of the locale to use. If none is provided, the default locale is
used. If the requested locale is not available, the collator will
use a system-defined fallback locale. Use resolved-locale to test
the results of locale fallback behavior.
Returns the input string converted to lowercase. Follows the Unicode
Default Case Conversion algorithm and the locale-insensitive case
mappings in the Unicode Character Database.
Returns true if the input values are equal, false otherwise. The
comparison is strictly typed: values of different runtime types are
always considered unequal. Cases where the types are known to be
different at parse time are considered invalid and will produce a
parse error. Accepts an optional collator argument to control
locale-dependent string comparisons.
Retrieves a property value from the current feature's state. Returns
null if the requested property is not present on the feature's state.
A feature's state is not part of the GeoJSON or vector tile data, and
must be set programmatically on each feature. Features are identified
by their id attribute, which must be an integer or a string that can
be cast to an integer. Note that "feature-state" can only be used
with paint properties that support data-driven styling.
Returns formatted text containing annotations for use in
mixed-format text-field entries. For a text-field entries of a
string type, following option object's properties are supported: If
set, the text-font value overrides the font specified by the root
layout properties. If set, the font-scale value specifies a scaling
factor relative to the text-size specified in the root layout
properties. If set, the text-color value overrides the color
specified by the root paint properties for this layer.
Retrieves a property value from the current feature's properties, or
from another object if a second argument is provided. Returns null if
the requested property is missing.
Gets the kernel density estimation of a pixel in a heatmap layer,
which is a relative measure of how many data points are crowded around
a particular pixel. Can only be used in the heatmap-color property.
Returns an image type for use in icon-image, *-pattern entries
and as a section in the format expression. If set, the image
argument will check that the requested image exists in the style and
will return either the resolved image name or null, depending on
whether or not the image is currently in the style. This validation
process is synchronous and requires the image to have been added to
the style before requesting it in the image argument.
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.Interpolation types:-
["linear"]: interpolates linearly between the pair of stops just
less than and just greater than the input.- ["exponential", base]:
interpolates exponentially between the stops just less than and just
greater than the input. base controls the rate at which the output
increases: higher values make the output increase more towards the
high end of the range. With values close to 1 the output increases
linearly.- ["cubic-bezier", x1, y1, x2, y2]: interpolates using the
cubic bezier curve defined by the given control points.
Produces continuous, smooth results by interpolating between pairs of
input and output values ("stops"). Works like interpolate, but the
output type must be color, and the interpolation is performed in the
Hue-Chroma-Luminance color space.
Produces continuous, smooth results by interpolating between pairs of
input and output values ("stops"). Works like interpolate, but the
output type must be color, and the interpolation is performed in the
CIELAB color space.
Returns true if the input string is expected to render legibly.
Returns false if the input string contains sections that cannot be
rendered without potential loss of meaning (e.g. Indic scripts that
require complex text shaping, or right-to-left scripts if the the
mapbox-gl-rtl-text plugin is not in use in MapLibre GL JS).
Returns true if the first input is strictly greater than the second,
false otherwise. The arguments are required to be either both
strings or both numbers; if during evaluation they are not, expression
evaluation produces an error. Cases where this constraint is known not
to hold at parse time are considered in valid and will produce a parse
error. Accepts an optional collator argument to control
locale-dependent string comparisons.
Returns true if the first input is greater than or equal to the
second, false otherwise. The arguments are required to be either
both strings or both numbers; if during evaluation they are not,
expression evaluation produces an error. Cases where this constraint
is known not to hold at parse time are considered in valid and will
produce a parse error. Accepts an optional collator argument to
control locale-dependent string comparisons.
Selects the output whose label value matches the input value, or the
fallback value if no match is found. The input can be any expression
(e.g. ["get", "building_type"]). Each label must be either:
Returns true if the input values are not equal, false otherwise.
The comparison is strictly typed: values of different runtime types
are always considered unequal. Cases where the types are known to be
different at parse time are considered invalid and will produce a
parse error. Accepts an optional collator argument to control
locale-dependent string comparisons.
Asserts that the input value is a number. If multiple values are
provided, each one is evaluated in order until a number is obtained.
If none of the inputs are numbers, the expression is an error.
Converts the input number into a string representation using the
providing formatting rules. If set, the locale argument specifies
the locale to use, as a BCP 47 language tag. If set, the currency
argument specifies an ISO 4217 code to use for currency-style
formatting. If set, the min-fraction-digits and
max-fraction-digits arguments specify the minimum and maximum number
of fractional digits to include.
Asserts that the input value is an object. If multiple values are
provided, each one is evaluated in order until an object is obtained.
If none of the inputs are objects, the expression is an error.
Returns the IETF language tag of the locale being used by the provided
collator. This can be used to determine the default system locale,
or to determine if a requested locale was successfully loaded.
Creates a color value from red, green, and blue components, which must
range between 0 and 255, and an alpha component of 1. If any component
is out of range, the expression is an error.
Creates a color value from red, green, blue components, which must
range between 0 and 255, and an alpha component which must range
between 0 and 1. If any component is out of range, the expression is
an error.
Returns true if the first input is strictly less than the second,
false otherwise. The arguments are required to be either both
strings or both numbers; if during evaluation they are not, expression
evaluation produces an error. Cases where this constraint is known not
to hold at parse time are considered in valid and will produce a parse
error. Accepts an optional collator argument to control
locale-dependent string comparisons.
Returns true if the first input is less than or equal to the second,
false otherwise. The arguments are required to be either both
strings or both numbers; if during evaluation they are not, expression
evaluation produces an error. Cases where this constraint is known not
to hold at parse time are considered in valid and will produce a parse
error. Accepts an optional collator argument to control
locale-dependent string comparisons.
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 output if the input is less than the first stop.
Asserts that the input value is a string. If multiple values are
provided, each one is evaluated in order until a string is obtained.
If none of the inputs are strings, the expression is an error.
Converts the input value to a color. If multiple values are provided,
each one is evaluated in order until the first successful conversion
is obtained. If none of the inputs can be converted, the expression is
an error.
Converts the input value to a number, if possible. If the input is
null or false, the result is 0. If the input is true, the result
is 1. If the input is a string, it is converted to a number as
specified by the "ToNumber Applied to the String Type"
algorithm
of the ECMAScript Language Specification. If multiple values are
provided, each one is evaluated in order until the first successful
conversion is obtained. If none of the inputs can be converted, the
expression is an error.
Converts the input value to a string. If the input is null, the
result is "". If the input is a boolean, the result is "true" or
"false". If the input is a number, it is converted to a string as
specified by the "NumberToString"
algorithm
of the ECMAScript Language Specification. If the input is a color, it
is converted to a string of the form "rgba(r,g,b,a)", where r,
g, and b are numerals ranging from 0 to 255, and a ranges from 0
to 1. Otherwise, the input is converted to a string in the format
specified by the
JSON.stringify
function of the ECMAScript Language Specification.
Returns the input string converted to uppercase. Follows the Unicode
Default Case Conversion algorithm and the locale-insensitive case
mappings in the Unicode Character Database.
Gets the current zoom level. Note that in style layout and paint
properties, "zoom" may only appear as the input to a top-level
"step" or "interpolate" expression.