Skip To Content
ArcGIS Developer
Dashboard

FilterManager class

The FilterManager class manages the filters to avoid filter conflict between widgets.

AMD Module Require

require(["jimu/FilterManager"], function(FilterManager) { /* code goes here */ });

Constructor

FilterManager has no constructor. Use FilterManager.getInstance() to get the FilterManager instance.

Example:

require(["jimu/dijit/FilterManager"], function(FilterManager){
          var filterManager = FilterManager.getInstance();
          ...
        });

Methods

applyWidgetFilter (layerId, widgetId, expression)

Applies a filter to a layer.

Return type: Undefined.

Parameters:

  • <String> layerId—Required. The ID of the layer where the filter is to be applied.
  • <String> widgetId—Required. The ID of the widget where the filter is to be applied.
  • <String> expression—Required. The filter expression.

getFilterExp (layerId, excludeWidgetId)

Gets the filter expressions that have been applied to a layer from all widgets unless excluded.

Return type: The filter expressions string.

Parameters:

  • <String> layerId—Required. The ID of the layer where the filter is from.
  • <String> excludeWidgetId—Optional. The ID of the widget to exclude from forming the filter expressions.

getWidgetFilter (layerId, widgetId)

Gets the filter expression that a widget has applied to a layer.

Return type: The filter expression string.

Parameters:

  • <String> layerId—Required. The ID of the layer where the filter is from.
  • <String> widgetId—Required. The ID of the widget where the filter is from.