new VectorStyleModel(imagePath, class, subClass, styleField, styleFieldValues, maxRangeAttribute, minRangeAttribute, labelField, imageName, imageWidth, imageHeight, imageScale, imageOffsetX, imageOffsetY, imageOffsetXUnit, imageOffsetYUnit, circleRadius, circleFillColor, circleStrokeColor, circleStrokeWidth, textAlign, textFont, textScale, textOffsetX, textOffsetY, textFillColor, textStrokeColor, textStrokeWidth, clusterClass, clusterCircleRadius, clusterCircleFillColor, clusterCircleStrokeColor, clusterCircleStrokeWidth, clusterImageName, clusterImageWidth, clusterImageHeight, clusterImageScale, clusterImageOffsetX, clusterImageOffsetY, clusterText, clusterTextAlign, clusterTextFont, clusterTextScale, clusterTextOffsetX, clusterTextOffsetY, clusterTextFillColor, clusterTextStrokeColor, clusterTextStrokeWidth, polygonFillColor, polygonStrokeColor, polygonStrokeWidth, lineStrokeColor, lineStrokeWidth, lineStrokeDash, circleSegmentsRadius, circleSegmentsStrokeWidth, circleSegmentsBackgroundColor, scalingValueDefaultColor, circleSegmentsGap, circleBarScalingFactor, circleBarRadius, circleBarLineStroke, circleBarCircleFillColor, circleBarCircleStrokeColor, circleBarCircleStrokeWidth, circleBarLineStrokeColor)
modules/vectorStyle/model.js, line 160
Style model to create an open layers vector style for each opbject in style.json.
| Name | Type | Default | Description |
|---|---|---|---|
imagePath |
String | "" | optional Path to images. |
class |
String | "POINT" | optional Class of style. Matches the geometry |
subClass |
String | "SIMPLE" | optional SubClass of style. |
styleField |
String | Object | "" | optional Attribute name to be styled with. Or object with name or condition. |
styleFieldValues |
Array.<Object> | [] | optional Values of attribute name with its style definition. |
maxRangeAttribute |
String | Number | Boolean | false | optional if String: the features attribute to get the maximum value for a range from; if number: the maximum value in itself; if false: no maximum value, therefore no relative range |
minRangeAttribute |
String | Number | 0 | optional only taken into effekt if maxRangeAttribute is given; if String: the features attribute to get the minimum value for a range from; if number: the minimum value in itslef; |
labelField |
String | "" | optional Attribute name to create style label. |
imageName |
String | "blank.png" | optional Name of image. Is used with imagePath. |
imageWidth |
Number | 1 | optional Width of image in px. |
imageHeight |
Number | 1 | optional Height of image in px. |
imageScale |
Number | 1 | optional Scale of image. |
imageOffsetX |
Number | 0.5 | optional horizontal offset of image. |
imageOffsetY |
Number | 0.5 | optional vertical offset of image. |
imageOffsetXUnit |
String | "fraction" | optional Unit of horizontal offset of image. |
imageOffsetYUnit |
String | "fraction" | optional Unit of vertical offset of image. |
circleRadius |
Number | 10 | optional Radius of Circle in px. |
circleFillColor |
Array.<Number> | [0,153,255,1] | optional Fill color of Circle in rgba-format. |
circleStrokeColor |
Array.<Number> | [0,0,0,1] | optional Stroke color of Circle in rgba-format. |
circleStrokeWidth |
Number | 2 | optional Stroke width of circle. |
textAlign |
String | "center" | optional Alignment of text. |
textFont |
String | "10px sans-serif" | optional Font of text. |
textScale |
Number | 1 | optional Scale of text. |
textOffsetX |
Number | 0 | optional Horizontal offset of text. |
textOffsetY |
Number | 0 | optional Vertical offset of text. |
textFillColor |
Array.<Number> | [255,255,255,1] | optional Fill color of test in rgba-format. |
textStrokeColor |
Array.<Number> | [0,0,0,1] | optional Stroke color of text in rgba-format. |
textStrokeWidth |
Number | 3 | optional Stroke width of text. |
clusterClass |
String | "CIRCLE" | optional Class for clustered feature. |
clusterCircleRadius |
Number | 10 | optional Circle radius for clustered feature. |
clusterCircleFillColor |
Array.<Number> | [0,153,255,1] | optional Fill color of circle for clustered feature in rgba-format. |
clusterCircleStrokeColor |
Array.<Number> | [0,0,0,1] | optional Stroke color of circle for clustered feature in rgba-format. |
clusterCircleStrokeWidth |
Number | 2 | optional Stroke width of circle for clustered feature. |
clusterImageName |
String | "blank.png" | optional Name of image for clustered feature. Is used with imagePath. |
clusterImageWidth |
Number | 1 | optional Width of image for clustered feature in px. |
clusterImageHeight |
Number | 1 | optional Height of image for clustered feature in px. |
clusterImageScale |
Number | 1 | optional Scale of image for clustered feature. |
clusterImageOffsetX |
Number | 0.5 | optional horizontal offset of image for clustered feature. |
clusterImageOffsetY |
Number | 0.5 | optional vertical offset of image for clustered feature. |
clusterText |
String | "COUNTER" | optional Flag of what text is to be shown. |
clusterTextAlign |
String | "center" | optional Alignment of text for clustered feature. |
clusterTextFont |
String | "10px sans-serif" | optional Font of text for clustered feature. |
clusterTextScale |
Number | 1 | optional Scale of text for clustered feature. |
clusterTextOffsetX |
Number | 0 | optional Horizontal offset of text for clustered feature. |
clusterTextOffsetY |
Number | 0 | optional Vertical offset of text for clustered feature. |
clusterTextFillColor |
Array.<Number> | [255,255,255,1] | optional Fill color of test in rgba-format for clustered feature. |
clusterTextStrokeColor |
Array.<Number> | [0,0,0,1] | optional Stroke color of text in rgba-format for clustered feature. |
clusterTextStrokeWidth |
Number | 3 | optional Stroke width of text for clustered feature. |
polygonFillColor |
Array.<Number> | [255,255,255,1] | optional Fill color of polygon in rgba-format. |
polygonStrokeColor |
Array.<Number> | [0,0,0,1] | optional Stroke color of polygon in rgba-format. |
polygonStrokeWidth |
Number | 2 | optional Stroke width of polygon. |
lineStrokeColor |
Array.<Number> | [0,0,0,1] | optional Stroke color of line in rgba-format. |
lineStrokeWidth |
Number | 2 | optional Stroke width of line |
lineStrokeDash |
Number | optional Stroke width of line | |
circleSegmentsRadius |
Number | 10 | optional Radius of circle segments. |
circleSegmentsStrokeWidth |
Number | 4 | optional Stroke width of circle segments. |
circleSegmentsBackgroundColor |
Array.<Number> | [255,255,255,1] | optional Background color of circle segments in rgba-format. |
scalingValueDefaultColor |
Array.<Number> | [0,0,0,1] | optional Default color of circle segments in rgba-format. |
circleSegmentsGap |
Number | 10 | optional Gap between the circle segments. |
circleBarScalingFactor |
Number | 1 | optional Scaling factor of circle bar. |
circleBarRadius |
Number | 6 | optional Radius of circle bar. |
circleBarLineStroke |
Number | 5 | optional Line stroke of circle bar. |
circleBarCircleFillColor |
Array.<Number> | [0,0,0,1] | optional Fill color of circle bar in rgba-format. |
circleBarCircleStrokeColor |
Array.<Number> | [0,0,0,1] | optional Stroke color of circle bar in rgba-format. |
circleBarCircleStrokeWidth |
Number | 1 | optional Circle stroke width of circle bar. |
circleBarLineStrokeColor |
Array.<Number> | [0,0,0,1] | optional Line stroke color of circle bar in rgba-format. |
- Deprecated
- since new styleModel. Should be removed with version 3.0.
Extends
Methods
-
addLegendInfo(geometryType, styleObject, rule){void}
modules/vectorStyle/styleModel.js, line 575 -
Adds a unique legendInfo for each id to this vectorStyle model to be used for legend descriptions.
Name Type Description geometryTypestring features geometry type needed in legend model styleObjectvectorStyle/style a vector style needed in ruleObject conditions -
calculateCircleSegment(startAngelDegree, endAngelDegree, circleRadius, size, gap){String}
modules/vectorStyle/model.js, line 1349 -
Create circle segments
Name Type Description startAngelDegreenumber start with circle segment endAngelDegreenumber finish with circle segment circleRadiusnumber radius from circle sizenumber size of the window to be draw gapnumber gap between segments Returns:
circle segments
-
calculateLengthIntervalCircleBar(size, circleBarRadius, stateValue, circleBarScalingFactor){number}
modules/vectorStyle/model.js, line 1427 -
Calculate the length for the bar
Name Type Description sizenumber size of the section to be drawn circleBarRadiusnumber radius from point stateValuenumber value from feature circleBarScalingFactornumber factor is multiplied by the stateValue -
calculateSizeIntervalCircleBar(stateValue, circleBarScalingFactor, circleBarLineStroke, circleBarRadius){number}
modules/vectorStyle/model.js, line 1409 -
Calculate size for intervalscaled circle bar
Name Type Description stateValuenumber value from feature circleBarScalingFactornumber factor is multiplied by the stateValue circleBarLineStrokenumber stroke from bar circleBarRadiusnumber radius from point Returns:
- size of the section to be drawn
-
checkIfMatchesValid(origName, condition, matches){Boolean}
modules/vectorStyle/model.js, line 809 -
Checks if the matches have exact one entry.
Name Type Description origNameString The name to be proofed against the keys. conditionString Matching conditon. matchesArray.<String> An array of all keys matching the condition. Returns:
Flag of array has exacly one entry.
-
checkProperties(feature, rule){Boolean}
modules/vectorStyle/styleModel.js, line 367 -
Loops one feature through all properties returning true if all properties are satisfied. Returns also true if rule has no "conditions" to check.
Name Type Description featureol/feature to check ruleobject the rule to check Returns:
if all properties are satisfied
-
checkProperty(featureProperties, key, value){Boolean}
modules/vectorStyle/styleModel.js, line 398 -
Checks one feature against one property returning true if property satisfies condition. if clustering is activated, the parameter featureProperties has an array of feautures. only the first feature from the array is relevant at this point, because only individual features are styled here. The styling of clustered features happens in another function.
Name Type Description featurePropertiesobject properties of the feature that has to be checked keystring attribute name or object path to check valuestring | number | array attribute value or object path to check Returns:
if property is satisfied. Otherwhile returns false.
-
compareValues(featureValue, referenceValue){Boolean}
modules/vectorStyle/styleModel.js, line 495 -
Compares values according to its type.
Name Type Description featureValuestring | number value to compare referenceValuestring | number | array value to compare Returns:
if values equal or in range
-
componentToHex(c){String}
modules/vectorStyle/model.js, line 1129 -
Converts number to hex string.
Name Type Description cNumber Color value as number. Returns:
Converted color number as hex string.
-
createAdvancedPointStyle(feature, isClustered){ol.Style}
modules/vectorStyle/model.js, line 869 -
create advanced style for pointFeatures
Name Type Description featureol.Feature feature to be draw isClusteredboolean Value includes whether features should be clustered -
createCircleClusterStyle(){ol/style}
modules/vectorStyle/model.js, line 464 -
Creates circleClusterStyle. all clustered features get same circle.
Returns:
The created style.
-
createCirclePointStyle(feature, isClustered){ol/style}
modules/vectorStyle/model.js, line 831 -
Creates circlePointStyle. all features get same circle.
Name Type Description featureol/feature Feature to be styled. isClusteredBoolean Flag if feature is clustered. Returns:
The created style.
-
createClusteredTextStyle(feature, labelField){ol/style}
modules/vectorStyle/model.js, line 1027 -
Creates clusteredTextStyle. if "clusterText" === "COUNTER" then the number if features are set if "clusterText" === "NONE" no Text is shown else all features get the text that is defined in "clusterText".
Name Type Description featureol/feature Feature to be styled. labelFieldString Attribute name of feature to build the label style. Returns:
The created style.
-
createClusterStyle(){ol/style}
modules/vectorStyle/model.js, line 414 -
Creates clusterStyle depending on the attribute "clusterClass". allowed values for "clusterClass" are "SIMPLE" and "CIRCLE".
Returns:
The created style.
-
createCustomPointStyle(feature, isClustered){ol/style}
modules/vectorStyle/model.js, line 545 -
Creates customPointStyle. each features gets a different image, depending on their attribute which is stored in "styleField".
Name Type Description featureol/feature Feature to be styled. isClusteredBoolean Flag if feature is clustered. Returns:
The created style.
-
createCustomPolygonStyle(feature){ol/style}
modules/vectorStyle/model.js, line 320 -
Created a custom polygon style.
Name Type Description featureol/feature Feature to be styled. Returns:
The created style.
-
createIntervalAdvancedPointStyle(feature){ol.Style}
modules/vectorStyle/model.js, line 933 -
create interval scaled advanced style for pointFeatures
Name Type Description featureol.Feature feature to be draw -
createIntervalCircleBar(feature){String}
modules/vectorStyle/model.js, line 1382 -
Create interval circle bar
Name Type Description featureol.Feature contains features to draw -
createLegendId(geometryType, rule){string}
modules/vectorStyle/styleModel.js, line 562 -
Returns a unique id created from geometryType and conditions using base64 decoding.
Name Type Description geometryTypestring features geometry type ruleobject a rule description -
createLegendInfo(geometryType){void}
modules/vectorStyle/styleModel.js, line 145 -
Creates the style objects for the layer
Name Type Description geometryTypeArray.<string> Array of geometry types -
createLegendLabel(rule, styleObject){String|null}
modules/vectorStyle/styleModel.js, line 599 -
Returns the label or null examining some attributes. Giving precedence to "legendValue". Otherwhile creates a string out of rules conditions.
Name Type Description ruleObject conditions styleObjectvectorStyle/style a vector style needed in Returns:
for this styleObject
-
createLineStyle(feature, styleSubClass){ol/style}
modules/vectorStyle/model.js, line 241 -
Creates lineStyle depending on the attribute "subClass". allowed values for "subClass" are "SIMPLE".
Name Type Description featureol/feature Feature to be styled. styleSubClassString Subclass of style. Returns:
The created style.
-
createNominalAdvancedPointStyle(feature){ol.Style}
modules/vectorStyle/model.js, line 906 -
create nominal scaled advanced style for pointFeatures
Name Type Description featureol.Feature feature to be draw -
createNominalCircleSegments(feature){String}
modules/vectorStyle/model.js, line 1182 -
Create a svg with colored circle segments by nominal scaling
Name Type Description featureol.Feature feature to be draw Returns:
with colored circle segments
-
createPointStyle(feature, styleSubClass, isClustered){ol/style}
modules/vectorStyle/model.js, line 390 -
Creates pointStyle depending on the attribute "subClass". allowed values for "subClass" are "SIMPLE", "CUSTOM" and "CIRCLE.
Name Type Description featureol/feature Feature to be styled. styleSubClassString StyleSubClass. isClusteredBoolean Flag if feature is clustered. Returns:
The created style.
-
createPolygonStyle(feature, styleSubClass){ol/style}
modules/vectorStyle/model.js, line 281 -
Creates polygonStyle depending on the attribute "subClass". allowed values for "subClass" are "SIMPLE".
Name Type Description featureol/feature Feature to be styled. styleSubClassString StyleSubClass Returns:
The created style.
-
createSimpleClusterStyle(){ol/style}
modules/vectorStyle/model.js, line 432 -
Creates simpleClusterStyle. all clustered features get same image.
Returns:
The created style.
-
createSimpleLineStyle(feature){ol/style}
modules/vectorStyle/model.js, line 257 -
Creates a simpleLineStyle. all features get the same style.
Name Type Description featureol/feature Feature to be styled. Returns:
The created style.
-
createSimplePointStyle(feature, isClustered){ol/style}
modules/vectorStyle/model.js, line 489 -
Creates simplePointStyle. all features get same image.
Name Type Description featureol/feature Feature to be styled. isClusteredBoolean Flag if feature is clustered. Returns:
The created style.
-
createSimplePolygonStyle(){ol/style}
modules/vectorStyle/model.js, line 299 -
Creates a simplePolygonStyle. all features get the same style.
Returns:
The created style.
-
createStyle(feature, isClustered){ol/style}
modules/vectorStyle/model.js, line 177 -
This function ist set as style. for each feature, this function is called. Depending on the attribute "class" the respective style is created. allowed values for "class" are "POINT", "LINE", "POLYGON".
Name Type Description featureol/feature Feature to be styled. isClusteredBoolean Flag to show if feature is clustered. Returns:
The created style.
-
createStyle(feature, isClustered){ol/style/Style}
modules/vectorStyle/styleModel.js, line 36 -
Function is called from layer models for each feature.
Name Type Description featureol/feature the feature to style isClusteredBoolean is feature clustered Returns:
used in layer model
-
createSvgIntervalCircleBar(size, barLength, circleBarCircleFillColor, circleBarCircleStrokeColor, circleBarCircleStrokeWidth, circleBarLineStrokeColor, circleBarLineStroke, circleBarRadius){String}
modules/vectorStyle/model.js, line 1455 -
Create SVG for intervalscaled circle bars
Name Type Description sizenumber size of the section to be drawn barLengthnumber length from bar circleBarCircleFillColorString fill color from circle circleBarCircleStrokeColorString stroke color from circle circleBarCircleStrokeWidthnumber stroke width from circle circleBarLineStrokeColorString stroke color from bar circleBarLineStrokenumber stroke from bar circleBarRadiusnumber radius from point -
createSvgNominalCircleSegments(size, circleSegmentsRadius, circleSegmentsBackgroundColor, circleSegmentsStrokeWidth, circleSegmentsFillOpacity){String}
modules/vectorStyle/model.js, line 1306 -
Create SVG for nominalscaled circle segments
Name Type Description sizenumber size of the section to be drawn circleSegmentsRadiusnumber radius from circlesegment circleSegmentsBackgroundColorString backgroundcolor from circlesegment circleSegmentsStrokeWidthnumber strokewidth from circlesegment circleSegmentsFillOpacityString opacity from circlesegment -
createSVGStyle(svgPath){ol.Style}
modules/vectorStyle/model.js, line 949 -
create Style for SVG
Name Type Description svgPathString contains the params to be draw -
createTextStyle(feature, labelField, isClustered){ol/style}
modules/vectorStyle/model.js, line 964 -
Creates textStyle if feature is clustered OR "labelField" is set
Name Type Description featureol/feature Feature to be styled. labelFieldString Attribute name of feature. isClusteredBoolean Flag if featured is clustered. Returns:
The created style.
-
createTextStyleFromObject(textObj){ol/style}
modules/vectorStyle/model.js, line 999 -
Creates an text style from given object.
Name Type Description textObjObject Object with parameters. Returns:
The created style.
-
extendClusterTextStyle(clusterTextObj){Object}
modules/vectorStyle/model.js, line 1061 -
Extends the cluster text style object.
Name Type Description clusterTextObjObject The given object. Returns:
The extended object.
-
extendsSvgNominalCircleSegments(svg, circleSegmentsStrokeWidth, strokeColor, d){String}
modules/vectorStyle/model.js, line 1332 -
Extends the SVG with given tags
Name Type Description svgString String with svg tags circleSegmentsStrokeWidthnumber strokewidth from circlesegment strokeColorString strokecolor from circlesegment dString circle segment Returns:
svg
-
fillScalingAttributes(scalingAttributesAsObject, scalingAttribute){Object}
modules/vectorStyle/model.js, line 1254 -
Fills the object with values
Name Type Description scalingAttributesAsObjectobject object with possible attributes as keys and values = 0 scalingAttributestring actual states from feature Returns:
- contains the states
-
getDefaultStyle(){ol/style}
modules/vectorStyle/model.js, line 214 -
Creates openLayers Default Style
Returns:
Open layers default style.
-
getFeaturePropertyByPath(featureProperties, path){object|null}
modules/vectorStyle/styleModel.js, line 473 -
Returns the object path of featureProperties which is defined as path. Returns null if "path" is not included in featureProperties.
Name Type Description featurePropertiesobject properties of the feature pathstring object path starting with "path://" Returns:
object of featureProperties
-
getFeatureValue(featureProperties, key){undefined}
modules/vectorStyle/styleModel.js, line 453 -
Returns feature value identified by key. If necessary it loops through the feature properties object structure.
Name Type Description featurePropertiesobject properties of the feature keystring attribute name or object path to check Returns:
property can be of any type
-
getGeometryStyle(feature, rules, isClustered){ol/style/Style}
modules/vectorStyle/styleModel.js, line 179 -
Returns the style for the geometry object
Name Type Description featureol/feature the ol/feature to style rulesArray.<object> styling rules to check. Array can be empty. isClusteredBoolean Flag to show if feature is clustered. Returns:
is always returned
-
getGeometryTypeFromWFS(wfsURL, version, featureType){void}
modules/vectorStyle/styleModel.js, line 63 -
Requests the DescribeFeatureType of the wfs layer and starts the function to parse the xml and creates the legend info
Name Type Description wfsURLstring url from layer versionstring wfs version from layer featureTypestring wfs feature type from layer -
getIndexedRule(rules, index){object|undefined}
modules/vectorStyle/styleModel.js, line 327 -
Returns the first rule that satisfies the index of the multi geometry. The "sequence" must be an integer with defined min and max values representing the index range.
Name Type Description rulesArray.<object> all rules the satisfy conditions.properties. indexinteger the simple geometries index Returns:
proper rule
-
getLabelStyle(feature, style, isClustered){ol/style/Text}
modules/vectorStyle/styleModel.js, line 345 -
Returns the style to label the object
Name Type Description featureol/feature the ol/feature to style styleobject styling rule from style.json isClusteredBoolean Flag to show if feature is clustered. Returns:
is always returned
-
getLegendInfos(){Array.<object>}
modules/vectorStyle/styleModel.js, line 626 -
returns the legend info
Returns:
objects
-
getMultiGeometryStyle(geometryType, feature, rules, isClustered){Array.<ol/style/Style>}
modules/vectorStyle/styleModel.js, line 245 -
Returns an array of simple geometry styles.
Name Type Description geometryTypestring GeometryType featureol/feature the ol/feature to style rulesArray.<object> styling rules to check. isClusteredBoolean Flag to show if feature is clustered. Returns:
array of simple geometry styles is always returned
-
getRangeValueFromRangeAttribute(feature, rangeAttribute, defaultValue){Number}
modules/vectorStyle/model.js, line 687 -
special handling of min/max-range values for the use of ranges in styleFieldValue checkes if rangeAttribute exists and is an instant number or a key for a fieldValue
Name Type Description featureol/feature Feature to relay on rangeAttribute* the rangeAttribute (maxRangeAttribute, minRangeAttribute) from the config defaultValue* the to use default value if rangeAttribute seems to be absent Returns:
range value to go with
-
getReferenceValue(featureProperties, value){undefined}
modules/vectorStyle/styleModel.js, line 426 -
Returns the reference value. If necessary it loops through the feature properties object structure.
Name Type Description featurePropertiesobject properties of the feature valuestring attribute value or object path to check Returns:
property can be of any type
-
getRuleForIndex(rules, index){object|null}
modules/vectorStyle/styleModel.js, line 298 -
Returns the best rule for the indexed feature giving precedence to the index position. Otherwhile returns the rule with conditions but without a sequence definition. Fallback is a rule without conditions. That means also: A rule with fitting properties but without fitting sequence is never used for any multi geometry.
Name Type Description rulesArray.<object> the rules to check indexinteger the index position of this geometry in the multi geometry Returns:
rule or null if no rule match the conditions
-
getRulesForFeature(feature){Array.<object>}
modules/vectorStyle/styleModel.js, line 356 -
Returning all rules that fit to the feature. Array could be empty.
Name Type Description featureol/feature the feature to check Returns:
all rules that fit to the feature
-
getScalingAttributesAsObject(scalingValues){object}
modules/vectorStyle/model.js, line 1282 -
Convert scalingAttributes to object
Name Type Description scalingValuesobject contains attribute with color Returns:
with value 0
-
getSimpleGeometryStyle(geometryType, feature, rule, isClustered){ol/style/Style}
modules/vectorStyle/styleModel.js, line 205 -
Returns the style for simple (non-multi) geometry types
Name Type Description geometryTypestring GeometryType featureol/feature the ol/feature to style ruleArray.<object> styling rules to check. isClusteredBoolean Flag to show if feature is clustered. Returns:
is always returned
-
getStyleFieldValueObject(feature, styleFieldParam, styleFieldValues, maxRangeAttribute, minRangeAttribute){Object/Boolean}
modules/vectorStyle/model.js, line 712 -
searches in a list of styleFieldValues for the value that equals styleFieldParam or matches its range with styleFieldParam
Name Type Default Description featureol/feature Feature to be styled. styleFieldParamString | Object Attribute name to be styled with. Or object with name and condition. styleFieldValuesArray.<Object> Values of attribute name with its style definition. maxRangeAttributeString | Number | Boolean false optional if String: the features attribute to get the maximum value for a range from; if number: the maximum value in itself; if false: no maximum value, therefore no relative range minRangeAttributeString | Number 0 optional only taken into effekt if maxRangeAttribute is given; if String: the features attribute to get the minimum value for a range from; if number: the minimum value in itslef; Returns:
the found styleFieldValue, null if no value has matched or false if no feature, styleField or any styleFieldValues exists
-
getSubelementsFromXML(xml, featureType){Array.<object>}
modules/vectorStyle/styleModel.js, line 101 -
Parses the xml to get the subelements from the layer
Name Type Description xmlstring response xml featureTypestring wfs feature type from layer Returns:
of the xml element
-
getTypeAttributesFromSubelements(subElements){Array.<string>}
modules/vectorStyle/styleModel.js, line 118 -
Parses the geometry types from the subelements
Name Type Description subElementsArray.<object> xml subelements Returns:
types of the layer
-
hexToRgb(hex){Array.<Number>}
modules/vectorStyle/model.js, line 1140 -
Converts hex value to rgbarray.
Name Type Description hexString Color as hex string. Returns:
Color als rgb array.
-
isFeatureValueInStyleFieldRange(featureValue, styleFieldRange, rangeMax, rangeMin){Boolean}
modules/vectorStyle/model.js, line 642 -
checks wheather or not featureValue is in the range of styleFieldRange (depending on rangeMax and rangeMin - if given)
Name Type Description featureValueFloat the featureValue to be checked (e.g. 732 cars) styleFieldRangeArray.<Float> a range as an array [x, y] - x and y should be relative if rangeMax is given, absolute otherwise - x and y can be null for infinite rangeMaxInteger | Boolean the maximum value to be expected as featureValue gets - if not given styleFieldRange should be absolute rangeMinInteger the minimum value to be expected for featureValue - is only taken into account if rangeMax is given Returns:
if featureValue is not in the range - true if featureValue is in the range
-
isMultiGeometry(geometryType){Boolean}
modules/vectorStyle/styleModel.js, line 168 -
Returns true if feature contains some kind of MultiGeometry
Name Type Description geometryTypestring the geometry type to check Returns:
geometrytype a multiGeometry
-
isObjectPath(value){Boolean}
modules/vectorStyle/styleModel.js, line 552 -
checks if value starts with special prefix to determine if value is a object path
Name Type Description valuestring string to check Returns:
is value is an object path
-
normalizeRgbColor(newColor){array}
modules/vectorStyle/model.js, line 1159 -
Makes sure that one rgb color always consists of four values
Name Type Description newColorarray Color in rgb -
returnColor(color, dest){String|Array.<Number>}
modules/vectorStyle/model.js, line 1082 -
Returns input color to destinated color. possible values for dest are "rgb" and "hex". color has to come as hex (e.g. "#ffffff" || "#fff") or as array (e.g [255,255,255,0]) or as String ("[255,255,255,0]")
Name Type Description colorArray.<Number> | String The color to return. destString Destination color type. Returns:
The converted color.
-
rgbToHex(r, g, b){String}
modules/vectorStyle/model.js, line 1120 -
Converts rgb to hex.
Name Type Description rNumber Red value. gNumber Green Value. bNumber Blue value. Returns:
Hex color string.
-
setCircleFillColor(value){void}
modules/vectorStyle/model.js, line 1638 -
Setter for circleFillColor.
Name Type Description valueArray.<Number> CircleFillColor. -
setCircleRadius(value){void}
modules/vectorStyle/model.js, line 1629 -
Setter for circleRadius.
Name Type Description valueNumber CircleRadius. -
setCircleSegmentsBackgroundColor(value){void}
modules/vectorStyle/model.js, line 1486 -
Setter for circleSegmentsBackgroundColor
Name Type Description valueArray.<Number> Color -
setCircleStrokeColor(value){void}
modules/vectorStyle/model.js, line 1647 -
Setter for circleStrokeColor.
Name Type Description valueArray.<Number> CircleStrokeColor. -
setCircleStrokeWidth(value){void}
modules/vectorStyle/model.js, line 1656 -
Setter for circleStrokeWidth.
Name Type Description valueNumber CircleStrokeWidth. -
setClass(value){void}
modules/vectorStyle/model.js, line 1513 -
Setter for class.
Name Type Description valueString Class. -
setClusterCircleFillColor(value){void}
modules/vectorStyle/model.js, line 1755 -
Setter for clusterCircleFillColor.
Name Type Description valueArray.<Object> ClusterCircleFillColor. -
setClusterCircleRadius(value){void}
modules/vectorStyle/model.js, line 1746 -
Setter for clusterCircleRadius.
Name Type Description valueString ClusterCircleRadius. -
setClusterCircleStrokeColor(value){void}
modules/vectorStyle/model.js, line 1764 -
Setter for clusterCircleStrokeColor.
Name Type Description valueArray.<Object> ClusterCircleStrokeColor. -
setClusterCircleStrokeWidth(value){void}
modules/vectorStyle/model.js, line 1773 -
Setter for clusterCircleStrokeWidth.
Name Type Description valueNumber ClusterCircleStrokeWidth. -
setClusterClass(value){void}
modules/vectorStyle/model.js, line 1737 -
Setter for clusterClass.
Name Type Description valueString ClusterClass. -
setClusterImageHeight(value){void}
modules/vectorStyle/model.js, line 1800 -
Setter for clusterImageHeight.
Name Type Description valueNumber ClusterImageHeight. -
setClusterImageName(value){void}
modules/vectorStyle/model.js, line 1782 -
Setter for clusterImageName.
Name Type Description valueString ClusterImageName. -
setClusterImageOffsetX(value){void}
modules/vectorStyle/model.js, line 1818 -
Setter for clusterImageOffsetX.
Name Type Description valueNumber ClusterImageOffsetX. -
setClusterImageOffsetY(value){void}
modules/vectorStyle/model.js, line 1827 -
Setter for clusterImageOffsetY.
Name Type Description valueNumber ClusterImageOffsetY. -
setClusterImageScale(value){void}
modules/vectorStyle/model.js, line 1809 -
Setter for clusterImageScale.
Name Type Description valueNumber ClusterImageScale. -
setClusterImageWidth(value){void}
modules/vectorStyle/model.js, line 1791 -
Setter for clusterImageWidth.
Name Type Description valueNumber ClusterImageWidth. -
setClusterText(value){void}
modules/vectorStyle/model.js, line 1836 -
Setter for clusterText.
Name Type Description valueString ClusterText. -
setClusterTextAlign(value){void}
modules/vectorStyle/model.js, line 1845 -
Setter for clusterTextAlign.
Name Type Description valueString ClusterTextAlign. -
setClusterTextFillColor(value){void}
modules/vectorStyle/model.js, line 1890 -
Setter for clusterTextFillColor.
Name Type Description valueArray.<Object> ClusterTextFillColor. -
setClusterTextFont(value){void}
modules/vectorStyle/model.js, line 1854 -
Setter for clusterTextFont.
Name Type Description valueString ClusterTextFont. -
setClusterTextOffsetX(value){void}
modules/vectorStyle/model.js, line 1872 -
Setter for clusterTextOffsetX.
Name Type Description valueNumber ClusterTextOffsetX. -
setClusterTextOffsetY(value){void}
modules/vectorStyle/model.js, line 1881 -
Setter for clusterTextOffsetY.
Name Type Description valueNumber ClusterTextOffsetY. -
setClusterTextScale(value){void}
modules/vectorStyle/model.js, line 1863 -
Setter for clusterTextScale.
Name Type Description valueNumber ClusterTextScale. -
setClusterTextStrokeColor(value){void}
modules/vectorStyle/model.js, line 1899 -
Setter for clusterTextStrokeColor.
Name Type Description valueArray.<Object> ClusterTextStrokeColor. -
setClusterTextStrokeWidth(value){void}
modules/vectorStyle/model.js, line 1908 -
Setter for clusterTextStrokeWidth.
Name Type Description valueNumber ClusterTextStrokeWidth. -
setImageHeight(value){void}
modules/vectorStyle/model.js, line 1575 -
Setter for imageHeight.
Name Type Description valueNumber Image height. -
setImageName(value){void}
modules/vectorStyle/model.js, line 1557 -
Setter for imageName.
Name Type Description valueString Image name. -
setImageOffsetX(value){void}
modules/vectorStyle/model.js, line 1593 -
Setter for imageOffsetX.
Name Type Description valueNumber Image offsetX. -
setImageOffsetXUnit(value){void}
modules/vectorStyle/model.js, line 1611 -
Setter for imageOffsetXUnit.
Name Type Description valueString Image offsetX unit. -
setImageOffsetY(value){void}
modules/vectorStyle/model.js, line 1602 -
Setter for imageOffsetY.
Name Type Description valueNumber Image offsetY. -
setImageOffsetYUnit(value){void}
modules/vectorStyle/model.js, line 1620 -
Setter for imageOffsetYUnit.
Name Type Description valueString Image offsetY unit. -
setImagePath(value){void}
modules/vectorStyle/model.js, line 1504 -
Setter for imagePath.
Name Type Description valueString Image path. -
setImageScale(value){void}
modules/vectorStyle/model.js, line 1584 -
Setter for imageScale.
Name Type Description valueNumber Image scale. -
setImageWidth(value){void}
modules/vectorStyle/model.js, line 1566 -
Setter for imageWidth.
Name Type Description valueNumber Image width. -
setLabelField(value){void}
modules/vectorStyle/model.js, line 1549 -
Setter for labelField.
Name Type Description valueString labelField. -
setLineStrokeColor(value){void}
modules/vectorStyle/model.js, line 1944 -
Setter for lineStrokeColor.
Name Type Description valueArray.<Object> LineStrokeColor. -
setLineStrokeWidth(value){void}
modules/vectorStyle/model.js, line 1953 -
Setter for lineStrokeWidth.
Name Type Description valueNumber LineStrokeWidth. -
setPolygonFillColor(value){void}
modules/vectorStyle/model.js, line 1917 -
Setter for polygonFillColor.
Name Type Description valueArray.<Object> PolygonFillColor. -
setPolygonStrokeColor(value){void}
modules/vectorStyle/model.js, line 1926 -
Setter for polygonStrokeColor.
Name Type Description valueArray.<Object> PolygonStrokeColor. -
setPolygonStrokeWidth(value){void}
modules/vectorStyle/model.js, line 1935 -
Setter for polygonStrokeWidth.
Name Type Description valueNumber PolygonStrokeWidth. -
setSize(size){void}
modules/vectorStyle/model.js, line 1495 -
Setter for size.
Name Type Description size* Size -
setStyleField(value){void}
modules/vectorStyle/model.js, line 1531 -
Setter for styleField.
Name Type Description valueString styleField. -
setStyleFieldValues(value){void}
modules/vectorStyle/model.js, line 1540 -
Setter for styleFieldValues.
Name Type Description valueArray.<Object> styleFieldValues. -
setSubClass(value){void}
modules/vectorStyle/model.js, line 1522 -
Setter for subClass.
Name Type Description valueString SubClass. -
setTextAlign(value){void}
modules/vectorStyle/model.js, line 1665 -
Setter for textAlign.
Name Type Description valueString textAlign. -
setTextFillColor(value){void}
modules/vectorStyle/model.js, line 1710 -
Setter for textFillColor.
Name Type Description valueArray.<Object> TextFillColor. -
setTextFont(value){void}
modules/vectorStyle/model.js, line 1674 -
Setter for textFont.
Name Type Description valueString textFont. -
setTextOffsetX(value){void}
modules/vectorStyle/model.js, line 1692 -
Setter for textOffsetX.
Name Type Description valueNumber TextOffsetX. -
setTextOffsetY(value){void}
modules/vectorStyle/model.js, line 1701 -
Setter for textOffsetY.
Name Type Description valueNumber TextOffsetY. -
setTextScale(value){void}
modules/vectorStyle/model.js, line 1683 -
Setter for textScale.
Name Type Description valueNumber textScale. -
setTextStrokeColor(value){void}
modules/vectorStyle/model.js, line 1719 -
Setter for textStrokeColor.
Name Type Description valueArray.<Object> TextStrokeColor. -
setTextStrokeWidth(value){void}
modules/vectorStyle/model.js, line 1728 -
Setter for textStrokeWidth.
Name Type Description valueNumber textStrokeWidth. -
translateNameFromObject(keys, name, condition){String}
modules/vectorStyle/model.js, line 764 -
Translates the given name from gfiAttribute Object based on the condition type
Name Type Description keysObject List of all keys that the feature has. nameString The name to be proofed against the keys. conditionString Condition to be proofed. Returns:
Attribute key if condition matches exactly one key; undefined if unexpected params where given