Skip to main content
Version: 1.5.2


Using the addFilter(...) API function user can set and apply filtering on added layers (based on datasets).

addFilter(filter: FilterCreationProps): Filter
type FilterCreationProps = {
id: string;
type: 'range' | 'select' | 'time-range' | 'multi-select' | 'polygon';
sources: {
dataId?: string;
fieldName: string;
value: Range | boolean | Range | string[] | Feature;


  • NameDescription
    id string
    Unique filter id
    'type' string
    dataId string
    (Optional) Dataset id (if omitted, the first dataset which has a field with the name specified in field will be used)
    fieldName string
    Name of the field to apply the filter to
    value FilterValueType
    Filter value (the type depends on the filter kind, e.g. an array of two numbers for a range filter)