Skip to main content

FiltersTool

geovisto-mapReadme | API


geovisto-map / FiltersTool

Class: FiltersTool

This class wraps filters, sidebar tab and state. It provides methods for filters management.

Author

Jiri Hynek

Extends

Implements

Constructors

new FiltersTool()

new FiltersTool(props?): FiltersTool

It creates a new tool with respect to the props.

Parameters

props?: IFiltersToolProps

Returns

FiltersTool

Overrides

MapTool.constructor

Source

tools/filters/model/internal/tool/FiltersTool.ts:40

Properties

mapForm

private mapForm: IMapForm

TODO: move to the state

Source

tools/filters/model/internal/tool/FiltersTool.ts:33

Methods

copy()

copy(): IFiltersTool\<IFiltersToolProps, IFiltersToolDefaults, IFiltersToolState\<IFiltersToolProps, IFiltersToolDefaults, IFiltersToolConfig>, IFiltersToolConfig, IMapToolInitProps\<IFiltersToolConfig>>

It creates a copy of the uninitialized tool.

Returns

IFiltersTool\<IFiltersToolProps, IFiltersToolDefaults, IFiltersToolState\<IFiltersToolProps, IFiltersToolDefaults, IFiltersToolConfig>, IFiltersToolConfig, IMapToolInitProps\<IFiltersToolConfig>>

Implementation of

IFiltersTool.copy

Overrides

MapTool.copy

Source

tools/filters/model/internal/tool/FiltersTool.ts:47


create()

create(): this

It creates new filter tool.

Returns

this

Implementation of

IFiltersTool.create

Overrides

MapTool.create

Source

tools/filters/model/internal/tool/FiltersTool.ts:98


createDefaults()

createDefaults(): IFiltersToolDefaults

It creates new defaults of the tool.

Returns

IFiltersToolDefaults

Overrides

MapTool.createDefaults

Source

tools/filters/model/internal/tool/FiltersTool.ts:68


createMapForm()

protected createMapForm(): IMapForm

It creates new map form.

Returns

IMapForm

Source

tools/filters/model/internal/tool/FiltersTool.ts:117


createState()

createState(): IFiltersToolState\<IFiltersToolProps, IFiltersToolDefaults, IFiltersToolConfig>

It returns default tool state.

Returns

IFiltersToolState\<IFiltersToolProps, IFiltersToolDefaults, IFiltersToolConfig>

Overrides

MapTool.createState

Source

tools/filters/model/internal/tool/FiltersTool.ts:82


getAPIGetter()

getAPIGetter(): undefined | IMapToolAPIGetter

It returns the tool API

Returns

undefined | IMapToolAPIGetter

Implementation of

IFiltersTool.getAPIGetter

Inherited from

MapTool.getAPIGetter

Source

model/internal/tool/MapTool.ts:74


getDefaults()

getDefaults(): IFiltersToolDefaults

It returns default values of the filters tool.

Returns

IFiltersToolDefaults

Implementation of

IFiltersTool.getDefaults

Overrides

MapTool.getDefaults

Source

tools/filters/model/internal/tool/FiltersTool.ts:61


getId()

getId(): string

Help function which returns the id of the object.

Returns

string

Implementation of

IFiltersTool.getId

Inherited from

MapTool.getId

Source

model/internal/object/MapObject.ts:93


getMap()

getMap(): undefined | IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

Help function returns map which uses this tool.

Do not override this function. Use the state class instead.

Returns

undefined | IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

Implementation of

IFiltersTool.getMap

Inherited from

MapTool.getMap

Source

model/internal/tool/MapTool.ts:112


getMapForm()

getMapForm(): IMapForm

It returns a map form.

Returns

IMapForm

Implementation of

IMapFormControl.getMapForm

Source

tools/filters/model/internal/tool/FiltersTool.ts:107


getProps()

getProps(): IFiltersToolProps

It returns the props given by the programmer.

Returns

IFiltersToolProps

Implementation of

IFiltersTool.getProps

Overrides

MapTool.getProps

Source

tools/filters/model/internal/tool/FiltersTool.ts:54


getState()

getState(): IFiltersToolState\<IFiltersToolProps, IFiltersToolDefaults, IFiltersToolConfig>

It returns the filters tool state.

Returns

IFiltersToolState\<IFiltersToolProps, IFiltersToolDefaults, IFiltersToolConfig>

Implementation of

IFiltersTool.getState

Overrides

MapTool.getState

Source

tools/filters/model/internal/tool/FiltersTool.ts:75


getType()

getType(): string

Help function which returns the type of the object.

Returns

string

Implementation of

IFiltersTool.getType

Inherited from

MapTool.getType

Source

model/internal/object/MapObject.ts:86


handleEvent()

handleEvent(event): void

This function is called when a custom event is invoked.

Override this function, if needed.

Parameters

event: IMapEvent\<IMapObject\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectState\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>>

Returns

void

Inherited from

MapTool.handleEvent

Source

model/internal/tool/MapTool.ts:171


initialize()

initialize(initProps): this

Overrides the super method.

Parameters

initProps: IMapToolInitProps\<IFiltersToolConfig>

Returns

this

Implementation of

IFiltersTool.initialize

Overrides

MapTool.initialize

Source

tools/filters/model/internal/tool/FiltersTool.ts:91


isEnabled()

isEnabled(): boolean

Help getter which returns enabled property of state.

Do not override this function. Use the state class instead.

Returns

boolean

Implementation of

IFiltersTool.isEnabled

Inherited from

MapTool.isEnabled

Source

model/internal/tool/MapTool.ts:130


isSingleton()

isSingleton(): boolean

Help getter which returns a logtical value whether the tool type is singleton.

Returns

boolean

Implementation of

IFiltersTool.isSingleton

Inherited from

MapTool.isSingleton

Source

model/internal/tool/MapTool.ts:81


setEnabled()

setEnabled(enabled): void

It changes filters state to enabled/disabled.

Parameters

enabled: boolean

Returns

void

Implementation of

IFiltersTool.setEnabled

Overrides

MapTool.setEnabled

Source

tools/filters/model/internal/tool/FiltersTool.ts:147


setFilterRules()

setFilterRules(filterRules): void

It updates filter rules and notifies listeners.

Parameters

filterRules: IMapFilterRule[]

Returns

void

Implementation of

IFiltersTool.setFilterRules

Source

tools/filters/model/internal/tool/FiltersTool.ts:126


setProps()

protected setProps(props): void

It updates the props.

Parameters

props: IMapObjectProps

Returns

void

Inherited from

MapTool.setProps

Source

model/internal/object/MapObject.ts:38


switchEnabled()

switchEnabled(): void

Help function which switches enabled state (enabled/disabled).

Do not override this function. Use setEnabled instead.

Returns

void

Implementation of

IFiltersTool.switchEnabled

Inherited from

MapTool.switchEnabled

Source

model/internal/tool/MapTool.ts:158