Quick Filter control
The Quick Filter (labelled Filter in the config panel) is a custom, pill-style control that applies one of a curated set of attribute filters to the WebMap's layers via a layer definition expression—without opening a full query builder.
What it does
Renders one pill per configured filter. Activating a pill builds a SQL definition expression from that filter's clauses and applies it to the target layer, hiding features that don't match. Filters apply one at a time.
Configuration
| Field | Type | Default | Purpose |
|---|---|---|---|
quickFilter.placement | ControlPlacement | null | null | Corner placement, or null to hide. |
quickFilter.filters | QuickFilterOption[] (max 8) | [] | Filters the viewer can apply. |
Each QuickFilterOption is { layerId, label, clauses }:
layerId— operational layer id the filter targets.label— text shown on the pill.clauses— the attribute clauses combined into the definition expression.
Building a filter
A filter is a multi-clause expression. Each clause picks:
- a field,
- an operator — which operators are offered depends on the field's type (see below),
- and either a typed value or another field to compare against.
Value inputs adapt to the field type (date picker, number input, or text). For
equal / not equal on a non-date field, the value is chosen from the field's
distinct values, queried live from the layer. Clauses are chained with AND /
OR, and a live preview shows the expression as it is built.
Date fields
When the chosen field is a date, the operator list switches to a set of date-aware operators, and the value inputs change to match:
| Operator | Value input | Meaning |
|---|---|---|
| is on / is not on | one date picker | Matches (or excludes) the whole calendar day. |
| is before / is after | one date picker | Strictly before / strictly after the day. |
| is before or equal to / is after or equal to | one date picker | Includes the boundary day. |
| is between / is not between | from + to date pickers | Inclusive of both whole days. |
| includes / excludes | a list of date pickers (add/remove) | Matches any (or none) of the chosen days. |
| in the last / not in the last | a number stepper + a unit dropdown | A rolling window of N minutes/hours/days/weeks/months/years before now. |
| is blank / is not blank | none | The date is null / not null. |
Date comparisons use whole-calendar-day semantics, so a record's time component never causes it to be missed. The in the last window is anchored to the current time when the expression is built, producing a concrete date range that is database-agnostic.
The control turns the expression into a layer definition expression: string and date values are quoted, numeric values are not, based on the field's type.
Each clause has a remove (✕) button. Removing a clause from a multi-clause expression deletes just that clause; removing the last remaining clause clears the filter back to a single empty clause (no SQL is produced). To delete a whole filter pill, use the ✕ on its card in the Quick filters editor.
In the config panel
- Open Appearance → UI controls and drag the Filter chip onto a corner (or into a corner's expand).
- Once placed, a Quick filters editor appears. Add up to eight filters, each targeting a layer, labelled, and built from one or more clauses. A WebMap must be loaded so its layers and fields are available.
Behavior
- One at a time. Clicking a pill applies its filter; clicking it again or switching pills restores the previously-filtered layer to its authored definition expression, read back from the WebMap item (no filter state is stored locally).
- No filter on load, so data is never unexpectedly hidden.
- Field types are resolved at runtime to decide value quoting, so the same filter works across number, string, and date fields.