ExpressionSchema
constExpressionSchema:z.ZodType<any[]>
Defined in: packages/core/src/schemas/base.schema.ts:224
MapLibre expression for data-driven styling.
Remarks
Section titled “Remarks”MapLibre expressions provide powerful data-driven styling capabilities. An expression is an array where the first element is the operator name.
Common Operators:
get- Get feature propertyinterpolate- Interpolate between valuesmatch- Match valuescase- Conditional logicstep- Step function
This schema provides basic validation (array starting with string). Full expression syntax is validated by MapLibre at runtime.
Examples
Section titled “Examples”Get Property
text-field: ["get", "name"]Interpolate by Zoom
circle-radius: - interpolate - ["linear"] - ["zoom"] - 5 - 2 - 15 - 10Match Values
circle-color: - match - ["get", "type"] - "park" - "#228B22" - "water" - "#4169E1" - "#808080"