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.

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.