Class: StyleWmsModel

Tools.StyleWMS StyleWmsModel

StyleWmsModel

new StyleWmsModel()

modules/tools/styleWMS/model.js, line 67
Tool that can modify the style of a WMS. Therefore a sld-body is created and sent via the get-map-request. Caution: Only works for numerical values
Properties:
Name Type Default Description
isCurrentWin Boolean false Flag if this tool is shown in the toolwindow and thus is active
isCollapsed Boolean false Flag if this tool window is collapsed
glyphicon String "glyphicon-tint" Icon that is shown before the tool name
name String "Style WMS" Name of the Tool
id String "StyleWMS" id of Tool
modelId String "" Id of layer model to be styled
model WmsLayer null Layer model to be styled
geomType String "" Geometry type of data shown in wms layer. important for creating the correct sld
attributeName String "default" Name of attribute to be styled
numberOfClassesList Array.<String> ["1", "2", "3", "4", "5"] Array that defines the maximum amount of styling classes
numberOfClasses String "default" Flag that shows how many styling classes are used
styleClassAttributes Array.<styleClassAttribute> [ Array of defined styleclassattributes
styleClassAttribute Object One user defined style class
Properties
Name Type Description
startRange Integer Start of value range to style
stopRange Integer Stop of value range to style
color String Color as hex code
styleWMSName String "" Name of Layer to be styled
styleableLayerList Array.<styleableLayer> [ List of Layers that can be used for restyling
styleableLayer Object Object containing the name and the id of the styleable layer
Properties
Name Type Description
name String Name of styleable Layer
id String Id of styleable Layer
wmsSoftware String "OGC" Flag of sld has to be created according to ogc standards or in esri style
Fires:
  • List#event:RadioRequestModelListGetModelsByAttributes
  • List#event:RadioTriggerModelListSetModelAttributesById
  • List#event:RadioRequestModelListGetModelByAttributes
  • Util#event:RadioRequestUtilGetProxyUrl
  • StyleWMS#event:RadioTriggerStyleWMSResetParamsStyleWMS
  • StyleWMS#event:RadioTriggerStyleWMSUpdateParamsStyleWMS
  • StyleWMSModel#event:sync
  • StyleWMSModel#event:changeIsactive
Listens to Events:

Extends

Methods

checkWmsSoftwareResponse(data){void}

modules/tools/styleWMS/model.js, line 301
Parses the Capabilities and looks for namespace "xmlns:esri_wms". If so the software is "ESRI", otherwise "OGC"
Name Type Description
data XMLDocument Response from getCapabilities request

createEsriNamedLayer(){string}

modules/tools/styleWMS/model.js, line 366
ESRI: Create namedLayer

createEsriPolygonSymbolizer(value){string}

modules/tools/styleWMS/model.js, line 504
ESRI: Create polygonSymbolizer
Name Type Description
value string Color as hex

createEsriRootElement(){String}

modules/tools/styleWMS/model.js, line 346
ESRI: Creates sld for version 1.0.0
Returns:
sld

createEsriRules(){string}

modules/tools/styleWMS/model.js, line 414
ESRI: Create rules

createEsriUserStyle(){string}

modules/tools/styleWMS/model.js, line 388
ESRI: Create userStyle

createFilter(startRange, stopRange){String}

modules/tools/styleWMS/model.js, line 458
Creates Filter
Name Type Description
startRange string Start of value range
stopRange string End of value range
Returns:
-tag

createIsGreaterThanOrEqualTo(value){string}

modules/tools/styleWMS/model.js, line 472
Creates propertyIsGreaterThanOrEqualTo element
Name Type Description
value string Start of value range

createIsLessThanOrEqualTo(value){string}

modules/tools/styleWMS/model.js, line 488
Creates propertyIsLessThanOrEqualTo element
Name Type Description
value string End of value range

createOgcNamedLayer(){string}

modules/tools/styleWMS/model.js, line 377
OGC: Create namedLayer

createOgcPolygonSymbolizer(value){string}

modules/tools/styleWMS/model.js, line 517
OGC: Create polygonSymbolizer
Name Type Description
value string Color as hex

createOgcRootElement(){String}

modules/tools/styleWMS/model.js, line 356
OGC: Creates sld for version 1.0.0
Returns:
sld

createOgcRules(){string}

modules/tools/styleWMS/model.js, line 435
OGC: Create rules

createOgcUserStyle(){string}

modules/tools/styleWMS/model.js, line 401
OGC: Create userStyle

createSLD(){void}

modules/tools/styleWMS/model.js, line 214
Creates sld body after attributes have been validated. Distinguished between esri and ogc

refreshStyleableLayerList(){void}

modules/tools/styleWMS/model.js, line 126
Refreshes the styleableLayerList Takes the layermodels that are selected in the layer tree. Takes the layer name and the layer id
Fires:
  • List#event:RadioRequestModelListGetModelsByAttributes

removeSLDBody(){void}

modules/tools/styleWMS/model.js, line 233
Removes sld body of getMapRequest

requestWmsSoftware(model){void}

modules/tools/styleWMS/model.js, line 285
Checks the current service if it is made from esri software or not.
Name Type Description
model Layer WmsLayerModel The model of the layer to be checked
Fires:
  • Util#event:RadioRequestUtilGetProxyUrl

resetLegend(){void}

modules/tools/styleWMS/model.js, line 329
Triggers the legend to reset the stylewms params
Fires:

resetModel(){void}

modules/tools/styleWMS/model.js, line 248
Resets the Tool

resetStyleClassAttributes(){void}

modules/tools/styleWMS/model.js, line 259
Resets styleClassAttributes to default values

setAttributeName(value){void}

modules/tools/styleWMS/model.js, line 548
Setter of attributeName
Name Type Description
value String attributeName

setErrors(value){void}

modules/tools/styleWMS/model.js, line 575
Setter of errors
Name Type Description
value Array.<Object> errors

setGeomType(value){void}

modules/tools/styleWMS/model.js, line 539
Setter of geomType
Name Type Description
value String geomType

inherited setGlyphicon(value){void}

modules/core/modelList/item.js, line 69
Setter for glyphicon
Name Type Description
value String Glyphicon

inherited setId(value){void}

modules/core/modelList/item.js, line 34
Setter for id
Name Type Description
value String Id

inherited setIsActive(value){void}

modules/core/modelList/tool/model.js, line 129
Activates or deactivates tool
Name Type Description
value Boolean Flag if tool is active

inherited setIsInThemen(value){void}

modules/core/modelList/item.js, line 78
Setter for isInThemen
Name Type Description
value Boolean Flag if item is in themen

inherited setIsVisibleInMenu(value){void}

modules/core/modelList/item.js, line 105
Setter for setIsVisibleInMenu
Name Type Description
value Boolean Flag if item is visible in menu

inherited setIsVisibleInTree(value){void}

modules/core/modelList/item.js, line 96
Setter for isVisibleInTree
Name Type Description
value Boolean Flag if item is visible in layertree

inherited setLevel(value){void}

modules/core/modelList/item.js, line 87
Setter for level
Name Type Description
value String Level

setModel(value){void}

modules/tools/styleWMS/model.js, line 530
Setter of model
Name Type Description
value Layer layer model

setModelById(id){void}

modules/tools/styleWMS/model.js, line 269
Set the selected layer model by its id
Name Type Description
id String Id of layer
Fires:
  • List#event:RadioRequestModelListGetModelByAttributes

inherited setName(value){void}

modules/core/modelList/item.js, line 52
Setter for name
Name Type Description
value String Name

setNumberOfClasses(value){void}

modules/tools/styleWMS/model.js, line 557
Setter of numberOfClasses
Name Type Description
value String numberOfClasses

inherited setParentId(value){void}

modules/core/modelList/item.js, line 43
Setter for parentId
Name Type Description
value String ParentId

setStyleClassAttributes(value){void}

modules/tools/styleWMS/model.js, line 566
Setter of styleClassAttributes
Name Type Description
value Array.<Object> styleClassAttributes

inherited setType(value){void}

modules/core/modelList/item.js, line 60
Setter for type
Name Type Description
value String Type

setWmsSoftware(value){void}

modules/tools/styleWMS/model.js, line 584
Setter of wmsSoftware
Name Type Description
value String wmsSoftware

inherited superChangeLang(){Void}

modules/core/modelList/tool/model.js, line 113
change language - sets or translates the name of this tool, if property i18nextTranslate is no function. If name is defined in config.json, the name is not translated else property nameTranslationKey is used.

updateLayerInfo(layerName){void}

modules/tools/styleWMS/model.js, line 338
Triggers the layerinfo to update
Name Type Description
layerName String Name of Layer

updateLegend(attributes){void}

modules/tools/styleWMS/model.js, line 319
Triggers the legend to update itself
Name Type Description
attributes Array.<Object> Attributes for creating the legend from StyleWMS
Fires:

validate(attributes){Array.<Object>}

modules/tools/styleWMS/model.js, line 159
If validated attributes are valid, then nothing is returned. Otherwise Error message are created Triggers "invalid" to itself if validation fails
Name Type Description
attributes Object Backbone.Model.attributes
See:
Returns:
- Die Fehlermeldungen