Filters


Filters: FilterTernary | FilterExpression | null | boolean

Filters can be used to change which features in a layer are rendered. Filters can be applied to a layer by the setLayerFilters method on the Felt controller.

Filters use a tree structure for combining expressions with logical operators, called a FilterTernary. When combining three or more conditions, you must use proper nesting rather than a flat list.

See the examples below for the correct structure to use when building complex filters.

Remarks

The possible operators are:

  • lt: Less than

  • gt: Greater than

  • le: Less than or equal to

  • ge: Greater than or equal to

  • eq: Equal to

  • ne: Not equal to

  • cn: Contains

  • nc: Does not contain

  • is: Is

  • isnt: Is not

  • in: In

  • ni: Not in

The allowed boolean operators are:

  • and: Logical AND

  • or: Logical OR

Example

Last updated

Was this helpful?