M/filter/Function~Function


import Function from 'M/filter/Function';

A Filter represented by a function, which determines whether a feature complies with the filter or not

new Function(filterFunction, options)

facade/js/filter/Function.js, line 21

Creates a Filter Function to filter features

Name Type Default Description
filterFunction function

function to execute

options Object {}

declare 'cqlFilter' string equivalent inside, if any

Methods

execute(features){Array.<M.Feature>}

facade/js/filter/Function.js, line 74

Executes the filter

Name Type Description
features Array.<M.Feature>

features on which the filter runs

Returns:
features that comply with the filter

getFunctionFilter(){function}

facade/js/filter/Function.js, line 61

Gets the function representing this filter

Returns:
function

setFunction(function)

facade/js/filter/Function.js, line 49

Sets the function representing this filter

Name Type Description
function function

toCQL(){string}

facade/js/filter/Function.js, line 86

Returns the CQL equivalent to the filter, if defined

Returns:
CQL query