Class: AttributionsControlModel

Controls.Attributions AttributionsControlModel

AttributionsControlModel

new AttributionsControlModel()

modules/controls/attributions/model.js, line 47
Properties:
Name Type Default Description
isContentVisible Boolean true Flag if attributions copy is visible
isVisibleInMap Boolean false true when the control is displayed on the map
isInitOpenDesktop Boolean true Flag if module is initially activated upon load in desktop environment
isInitOpenMobile Boolean false Flag if module is initially activated upon load in mobile environment
attributionList Array.<DataForAttributionList> [ Array of attributions (see DataForAttributionList above) of all layers
showAttributionsText String "" toggle text if attributions are hidden
hideAttributionsText String "" toggle text if attributions are shown
Fires:
Listens to Events:

Extends

Methods

changeLang(lng){Void}

modules/controls/attributions/model.js, line 78
change language - sets default values for the language
Name Type Description
lng String the language changed to
Fires:
  • Controls.Attributions#event:changeShowAttributionsText
  • Controls.Attributions#event:changeHideAttributionsText

createAttribution(name, text, type){Void}

modules/controls/attributions/model.js, line 116
Creates a single attribution (look above for DataForAttributionList) and pushes it into the attributions array. Sets module visibility to true and renders it.
Name Type Description
name String Attribution name
text String Attribution copy
type String Attribution type
Fires:
  • Attributions#event:AttributionsRenderAttributions

filterModelsWithLayerAttribution(modelList){Array}

modules/controls/attributions/model.js, line 180
filters the models from the modellist that have the layerAttribution parameters. Childlayers of GroupLayer are also considered.
Name Type Description
modelList Array list with all models
Returns:
with configured layer attributions

generateAttributions(filteredModelList){void}

modules/controls/attributions/model.js, line 217
Retrieves the current layers visible in the map from the ModelList, filter them out without attributions and writes them in "modelList".
Name Type Description
filteredModelList Model ModelList

isObject(obj){void}

modules/controls/attributions/model.js, line 237
Returns true, if obj is an object
Name Type Description
obj * to inspect

onCreateAttribution(name, text, type){Void}

modules/controls/attributions/model.js, line 92
Event listener function for "createAttribution" event. Activates and opens attribution pane.
Name Type Description
name String Attribution name
text String Attribution copy
type String Attribution type

onRemoveAttribution(name, text, type){Void}

modules/controls/attributions/model.js, line 104
Event listener function for "removeAttribution" event.
Name Type Description
name String Attribution name
text String Attribution copy
type String Attribution type

removeAllLayerAttributions(){void}

modules/controls/attributions/model.js, line 202
Removes all attributions of type "layer" from attributions array. Renders module.
Fires:
  • Controls.Attributions#event:AttributionsRenderAttributions

removeAttribution(name, text, type){Void}

modules/controls/attributions/model.js, line 137
Removes a single attribution from attributions array. Renders module.
Name Type Description
name String Attribution name
text String Attribution copy
type String Attribution type
Fires:
  • Controls.Attributions#event:AttributionsRenderAttributions

setAttributionList(value){void}

modules/controls/attributions/model.js, line 266
Setter for "attributionList"
Name Type Description
value Boolean flag
Fires:

setIsContentVisible(value){void}

modules/controls/attributions/model.js, line 248
Setter for "isContentVisible"
Name Type Description
value Boolean flag if attributions pane is visible
Fires:

setIsInitOpenDesktop(value){void}

modules/controls/attributions/model.js, line 275
Setter for "isInitOpenDesktop"
Name Type Description
value Boolean flag
Fires:
  • Controls.Attributions#event:changeIsInitOpenDesktop

setIsInitOpenMobile(value){void}

modules/controls/attributions/model.js, line 285
Setter for "isInitOpenMobile"
Name Type Description
value Boolean flag
Fires:
  • Controls.Attributions#event:changeIsInitOpenMobile

setIsVisibleInMap(value){void}

modules/controls/attributions/model.js, line 257
Setter for "isVisibleInMap"
Name Type Description
value Boolean flag if attributions functionality (pane + control button) is visible
Fires:

toggleIsContentVisible(){void}

modules/controls/attributions/model.js, line 293
Toggle for Attribute "isContentVisible"

updateAttributions(){Void}

modules/controls/attributions/model.js, line 155
Updates attributions functionality data. Usually called upon layer visibility change.
Fires: