new Parser()
modules/core/configLoader/parser.js, line 72
Parse the configured models from config datas
Models can be of type folder, layer, staticlink, tool, viewpoint, ...
Properties:
Name | Type | Default | Description |
---|---|---|---|
itemList |
Array | [ | lightModels |
overlayer |
Array | [ | Themenconfig.Fachdaten |
baselayer |
Array | [ | Themenconfig.Hintergrundkarten |
portalConfig |
Object | {} | Portalconfig |
treeType |
String | "" | the attribute Baumtyp |
categories |
Array.<String> | ["Opendata", | "Inspire", "Behörde"] categories for Fachdaten in DefaultTree |
category |
String | "Opendata" | selected category for Fachdaten in DefaultTree |
selectionIDX |
Number | -1 | Index of the last inserted layers. Required for sorting/moving (only for the treeType lightTree) |
onlyDesktopTools |
Array.<String> | ["measure", | "print", "kmlimport", "draw", "featureLister", "animation", "addWMS"] |
Fires:
- Core.ModelList#event:RadioTriggerModelListRemoveModelsByParentId
- Core.ModelList#event:RadioTriggerModelListRenderTree
- Core.ModelList#event:RadioTriggerModelListSetModelAttributesById
- Core.ModelList#event:RadioTriggerModelListRemoveModelsById
- Core.ModelList#event:RadioTriggerModelListAddModelsByAttributes
- Core.ModelList#event:RadioTriggerModelListShowModelInTree
- Core.ModelList#event:RadioTriggerModelListRefreshLightTree
- QuickHelp#event:RadioRequestQuickHelpIsSet
Listens to Events:
- Core.ConfigLoader#event:RadioRequestParserGetItemByAttributes
- Core.ConfigLoader#event:RadioRequestParserGetItemsByAttributes
- Core.ConfigLoader#event:RadioRequestParserGetTreeType
- Core.ConfigLoader#event:RadioRequestParserGetCategory
- Core.ConfigLoader#event:RadioRequestParserGetCategories
- Core.ConfigLoader#event:RadioRequestParserGetPortalConfig
- Core.ConfigLoader#event:RadioRequestParserGetItemsByMetaID
- Core.ConfigLoader#event:RadioRequestParserGetSnippetInfos
- Core.ConfigLoader#event:RadioRequestParserGetInitVisibBaselayer
- Core.ConfigLoader#event:RadioTriggerParsersetCategory
- Core.ConfigLoader#event:RadioTriggerParserAddItem
- Core.ConfigLoader#event:RadioTriggerParserAddItemAtTop
- Core.ConfigLoader#event:RadioTriggerParserAddItems
- Core.ConfigLoader#event:RadioTriggerParserAddFolder
- Core.ConfigLoader#event:RadioTriggerParserAddLayer
- Core.ConfigLoader#event:RadioTriggerParserAddGDILayer
- Core.ConfigLoader#event:RadioTriggerParserAddGeoJSONLayer
- Core.ConfigLoader#event:RadioTriggerParserRemoveItem
- Core.ConfigLoader#event:ChangeCategory
- Core#event:RadioTriggerUtilIsViewMobileChanged
Extends
Methods
-
addFolder(name, id, parentId, level, isExpanded){void}
modules/core/configLoader/parser.js, line 317 -
todo
Name Type Description name
* todo id
* todo parentId
* todo level
* todo isExpanded
* todo Fires:
-
addGdiLayer(hit){void}
modules/core/configLoader/parser.js, line 517 -
Adds found layer to layer tree
Name Type Description hit
Object layer to be added Fires:
-
addGeoJSONLayer(name, id, geojson){void}
modules/core/configLoader/parser.js, line 477 -
todo
Name Type Description name
* todo id
* todo geojson
* todo -
addItem(obj){void}
modules/core/configLoader/parser.js, line 270 -
Adds an item(layer, folder, ...) to the end of the attribute "itemList".
Name Type Description obj
Object Item -
addItemAtTop(obj){void}
modules/core/configLoader/parser.js, line 592 -
Adds an item(layer, folder, ...) at the beginning to the attribute "itemList
Name Type Description obj
Object Item -
addItemByPosition(obj, position){void}
modules/core/configLoader/parser.js, line 286 -
Adds an item(layer, folder, ...) to the attribute "itemList" at the specified position.
Name Type Description obj
Object Item position
Number position in ItemList -
addItems(objs, attr){void}
modules/core/configLoader/parser.js, line 301 -
Allows to create an array of objects that all have attr in common
Name Type Description objs
array Array of related objects, e.g. categories in Themenbaum attr
object Layerobject -
addLayer(name, id, parentId, level, layers, url, version){void}
modules/core/configLoader/parser.js, line 343 -
todo
Name Type Description name
* todo id
* todo parentId
* todo level
* todo layers
* todo url
* todo version
* todo -
addOrRemove3DFolder(treeType, isMobile, overLayer3d, overLayers3DName){void}
modules/core/configLoader/parser.js, line 721 -
adds or removes a folder for 3d data to topic tree considering the map mode
Name Type Description treeType
String type of tree isMobile
boolean vsible map mode from portal overLayer3d
object contains layer fro 3d mode overLayers3DName
String Name of folder. Fires:
-
addTreeMenuItems(treeType){void}
modules/core/configLoader/parser.js, line 656 -
regulates the folder structure of the theme tree taking into account the map mode
Name Type Description treeType
String type of topic tree Fires:
-
addVectorLayer(id, name, typ, parentId, isVisibleInTree, selectionIDX){void}
modules/core/configLoader/parser.js, line 452 -
adds a vector layer to model list
Name Type Description id
string id of the layer name
string layer name typ
string layer typ parentId
string parentID of the layer isVisibleInTree
boolean true if layer should be visivle in tree selectionIDX
number id for position in layer tree -
addWmsLayer(layerConf){void}
modules/core/configLoader/parser.js, line 384 -
Adds an external WMS layer to the map and the LayerTree. Layer does not need to be in the internal layer list, since we define it directly by classic WMS params like URL, LAYERS, etc.
Name Type Description layerConf
Object Layer configuration with properties like "url", "layers", etc. -
createModelList(){ModelList}
modules/core/configLoader/parser.js, line 636 -
todo
-
createUniqId(value){String}
modules/core/configLoader/parser.js, line 813 -
Generates a Uniq ID with prefix Before that, all spaces are removed from the prefix.
Name Type Description value
String Prefix for Uniq-Id Returns:
- Uniq-Id
-
getInitVisibBaselayer(){String}
modules/core/configLoader/parser.js, line 842 -
Returns the initial visible baselayer from config.json. for array several id only the first one is passed
Returns:
inital visible baselayer
-
getItemByAttributes(value){Object}
modules/core/configLoader/parser.js, line 606 -
get an item from itemList by a given value
Name Type Description value
Object todo -
getItemsByAttributes(value){Array}
modules/core/configLoader/parser.js, line 615 -
get one ore more item from itemList by a given value
Name Type Description value
Object t odo -
getItemsByMetaID(metaID){*}
modules/core/configLoader/parser.js, line 824 -
todo
Name Type Description metaID
* todo -
getLastSelectionIdx(){Integer}
modules/core/configLoader/parser.js, line 860 -
Returns the last / max. selectionIDX of the current layers.
Returns:
max. selectionIDXs
-
mergeObjectsByIds(ids, layerlist){Array.<Object>}
modules/core/configLoader/parser.js, line 765 -
Groups objects from the layerlist that match the IDs in the passed list.
Name Type Description ids
Array.<string> Array of ids whose objects are grouped together layerlist
Array.<Object> Objects from the services.json Returns:
- Objects from the services.json
-
parseControls(items){void}
modules/core/configLoader/parser.js, line 255 -
todo
Name Type Description items
Array todo -
parseMenu(items, parentId, init){void}
modules/core/configLoader/parser.js, line 171 -
Parsed the menu entries (everything except the contents of the tree)
Name Type Description items
Object Single levels of the menu bar, e.g. contact, legend, tools and tree parentId
String indicates to whom the items will be added init
Boolean indicates initial run of loop Fires:
-
parseSearchBar(searchbarConfig){void}
modules/core/configLoader/parser.js, line 243 -
todo
Name Type Description searchbarConfig
Object todo -
postionFor3DFolder(itemList){number}
modules/core/configLoader/parser.js, line 747 -
get the position where the 3d folder has to be inserted in the itemlist
Name Type Description itemList
array contains the items Returns:
for 3d folder
-
removeItem(id){void}
modules/core/configLoader/parser.js, line 624 -
removes an item from itemList by a given id
Name Type Description id
String id from item that be removed -
setBaselayer(value){void}
modules/core/configLoader/parser.js, line 897 -
Setter for attribute "itemList"
Name Type Description value
* todo -
setCategory(value){void}
modules/core/configLoader/parser.js, line 924 -
Setter for attribute "category"
Name Type Description value
* todo -
setItemList(value){void}
modules/core/configLoader/parser.js, line 888 -
Setter for attribute "itemList"
Name Type Description value
* todo -
setOverlayer(value){void}
modules/core/configLoader/parser.js, line 906 -
Setter for attribute "overlayer"
Name Type Description value
* todo -
setTreeType(value){void}
modules/core/configLoader/parser.js, line 915 -
Setter for attribute "treeType"
Name Type Description value
* todo