new TreeModel(config)
modules/searchbar/tree/model.js, line 25
| Name | Type | Description |
|---|---|---|
config |
object | Config parameters from config.json for searching in layer tree. |
Properties:
| Name | Type | Default | Description |
|---|---|---|---|
inUse |
boolean | false | todo |
minChars |
number | 3 | Minimum number of characters to start the search. |
layers |
Array.<object> | [ | todo |
nodes |
Array.<object> | [ | todo |
Fires:
- Core.ConfigLoader#event:RadioRequestParserGetItemsByAttributes
- Searchbar#event:RadioTriggerSearchbarCreateRecommendedList
- Searchbar#event:RadioTriggerSearchbarPushHits
- Core#event:RadioRequestParametricURLGetInitString
Listens to Events:
Extends
Methods
-
controlListeningToSearchbar(value){void}
modules/searchbar/tree/model.js, line 50 -
Deactivates the topic search if the obliqueMap is activated. Enables topic search when obliqueMap is disabled.
Name Type Description valueboolean includes whether the obliqueMap is active -
getLayerForSearch(layerModelsUniqe){Array.<object>}
modules/searchbar/tree/model.js, line 168 -
Creates new models for the search from the layerModels.
Name Type Default Description layerModelsUniqeArray.<object> [] optional Unique LightModels of the itemList from Parser. layerModels[].namestring The name of a layer model. layerModels[].idstring The id of a layer model. Returns:
for search.
-
getUniqeLayermodels(layerModels){Array.<object>}
modules/searchbar/tree/model.js, line 138 -
Duplicate layers are removed so that each layer appears only once in the search, even if it is contained in several categories and several times if it exists several times with different records. By name and id of layer model.
Name Type Default Description layerModelsArray.<object> [] optional LightModels of the itemList from Parser. layerModels[].namestring The name of a layer model. layerModels[].idstring The id of a layer model. Returns:
- Unique LightModels of the itemList from Parser.
-
getUniqeNodes(nodes){Array.<object>}
modules/searchbar/tree/model.js, line 153 -
Duplicate nodes are removed so that each node appears only once in the search, by name of node.
Name Type Default Description nodesArray.<object> [] optional Nodes. nodes[].namestring The name of a node. Returns:
- Unique LightModels of the itemList from Parser.
-
search(searchString){void}
modules/searchbar/tree/model.js, line 68 -
Searches for hits for the search string in layer models.
Name Type Description searchStringstring The input in the search bar. Fires:
-
searchInLayers(searchStringRegExp){void}
modules/searchbar/tree/model.js, line 111 -
Executes the search in the layer variable with search string and finds in the layer name and dataset name.
Name Type Description searchStringRegExpstring Suchstring as RegExp. Fires:
-
searchInNodes(searchStringRegExp){void}
modules/searchbar/tree/model.js, line 93 -
Executes the search in the node variable.
Name Type Description searchStringRegExpstring Suchstring as RegExp. Fires:
-
setLayers(layers){void}
modules/searchbar/tree/model.js, line 198 -
Setter for layers.
Name Type Description layersArray.<object> Layers for search.