Class: PointStyleModel

PointStyleModel

PointStyleModel

new PointStyleModel()

modules/vectorStyle/pointStyle.js, line 15
Class to create ol.style/Style
Properties:
Name Type Description
feature ol/feature Feature to be styled.
styles object styling properties to overwrite defaults
isClustered Boolean Flag to show if feature is clustered.

Extends

Members

staticPointStyleModel.clusterTypestring

staticPointStyleModel.typestring

Methods

calculateCircleSegment(startAngelDegree, endAngelDegree, circleRadius, size, gap){String}

modules/vectorStyle/pointStyle.js, line 539
Create circle segments
Name Type Description
startAngelDegree number start with circle segment
endAngelDegree number finish with circle segment
circleRadius number radius from circle
size number size of the window to be draw
gap number gap between segments
Returns:
circle segments

calculateLengthIntervalCircleBar(size, circleBarRadius, stateValue, circleBarScalingFactor){number}

modules/vectorStyle/pointStyle.js, line 619
Calculate the length for the bar
Name Type Description
size number size of the section to be drawn
circleBarRadius number radius from point
stateValue number value from feature
circleBarScalingFactor number factor is multiplied by the stateValue

calculateSizeIntervalCircleBar(stateValue, circleBarScalingFactor, circleBarLineStroke, circleBarRadius){number}

modules/vectorStyle/pointStyle.js, line 601
Calculate size for intervalscaled circle bar
Name Type Description
stateValue number value from feature
circleBarScalingFactor number factor is multiplied by the stateValue
circleBarLineStroke number stroke from bar
circleBarRadius number radius from point
Returns:
- size of the section to be drawn

componentToHex(c){String}

modules/vectorStyle/pointStyle.js, line 333
Converts number to hex string.
Name Type Description
c Number Color value as number.
Returns:
Converted color number as hex string.

createCircleClusterStyle(){ol/style}

modules/vectorStyle/pointStyle.js, line 148
Creates circleClusterStyle. all clustered features get same circle.
Returns:
The created style.

createCirclePointStyle(){ol/style}

modules/vectorStyle/pointStyle.js, line 202
Creates circlePointStyle. all features get same circle.
Returns:
The created style.

createIconClusterStyle(){ol/style}

modules/vectorStyle/pointStyle.js, line 123
Creates simpleClusterStyle. all clustered features get same image.
Returns:
The created style.

createIconPointStyle(){ol/style}

modules/vectorStyle/pointStyle.js, line 173
Creates pointStyle as icon. all features get same image.
Returns:
The created style.

createIntervalCircleBar(feature){String}

modules/vectorStyle/pointStyle.js, line 572
Create interval circle bar
Name Type Description
feature ol.Feature contains features to draw

createIntervalPointStyle(){ol.Style}

modules/vectorStyle/pointStyle.js, line 254
create interval scaled advanced style for pointFeatures

createNominalCircleSegments(feature){String}

modules/vectorStyle/pointStyle.js, line 374
Create a svg with colored circle segments by nominal scaling
Name Type Description
feature ol.Feature feature to be draw
Returns:
with colored circle segments

createNominalPointStyle(){ol.Style}

modules/vectorStyle/pointStyle.js, line 226
create nominal scaled advanced style for pointFeatures

createSvgIntervalCircleBar(size, barLength, circleBarCircleFillColor, circleBarCircleStrokeColor, circleBarCircleStrokeWidth, circleBarLineStrokeColor, circleBarLineStroke, circleBarRadius){String}

modules/vectorStyle/pointStyle.js, line 647
Create SVG for intervalscaled circle bars
Name Type Description
size number size of the section to be drawn
barLength number length from bar
circleBarCircleFillColor String fill color from circle
circleBarCircleStrokeColor String stroke color from circle
circleBarCircleStrokeWidth number stroke width from circle
circleBarLineStrokeColor String stroke color from bar
circleBarLineStroke number stroke from bar
circleBarRadius number radius from point

createSvgNominalCircleSegments(size, circleSegmentsRadius, circleSegmentsBackgroundColor, circleSegmentsStrokeWidth, circleSegmentsFillOpacity){String}

modules/vectorStyle/pointStyle.js, line 496
Create SVG for nominalscaled circle segments
Name Type Description
size number size of the section to be drawn
circleSegmentsRadius number radius from circlesegment
circleSegmentsBackgroundColor String backgroundcolor from circlesegment
circleSegmentsStrokeWidth number strokewidth from circlesegment
circleSegmentsFillOpacity String opacity from circlesegment

createSVGStyle(svgPath){ol.Style}

modules/vectorStyle/pointStyle.js, line 267
create Style for SVG
Name Type Description
svgPath String contains the params to be draw

extendsSvgNominalCircleSegments(svg, circleSegmentsStrokeWidth, strokeColor, d){String}

modules/vectorStyle/pointStyle.js, line 522
Extends the SVG with given tags
Name Type Description
svg String String with svg tags
circleSegmentsStrokeWidth number strokewidth from circlesegment
strokeColor String strokecolor from circlesegment
d String circle segment
Returns:
svg

fillScalingAttributes(scalingAttributesAsObject, scalingAttribute){Object}

modules/vectorStyle/pointStyle.js, line 444
Fills the object with values
Name Type Description
scalingAttributesAsObject object object with possible attributes as keys and values = 0
scalingAttribute string actual states from feature
Returns:
- contains the states

getScalingAttributesAsObject(scalingValues){object}

modules/vectorStyle/pointStyle.js, line 472
Convert scalingAttributes to object
Name Type Description
scalingValues object contains attribute with color
Returns:
with value 0

getStyle(){ol/style}

modules/vectorStyle/pointStyle.js, line 89
This function returns a style for each feature.
Returns:
The created style.

inherited getValueFromPath(featureProperties, path){*}

modules/vectorStyle/style.js, line 68
Returns the value from the given path.
Name Type Description
featureProperties Object Feature properties.
path String Field as object path.
Returns:
Value from given path.

hexToRgb(hex){Array.<Number>}

modules/vectorStyle/pointStyle.js, line 344
Converts hex value to rgbarray.
Name Type Description
hex String Color as hex string.
Returns:
Color als rgb array.

normalizeRgbColor(newColor){array}

modules/vectorStyle/pointStyle.js, line 363
Makes sure that one rgb color always consists of four values
Name Type Description
newColor array Color in rgb

inherited prepareField(featureProperties, field){*}

modules/vectorStyle/style.js, line 49
Returns the value of the given field. Also considers that the field can be an object path.
Name Type Description
featureProperties Object Feature properties.
field String Field to get value.
Returns:
Value from given field.

returnColor(color, dest){String|Array.<Number>}

modules/vectorStyle/pointStyle.js, line 286
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
color Array.<Number> | String The color to return.
dest String Destination color type.
Returns:
The converted color.

rgbToHex(r, g, b){String}

modules/vectorStyle/pointStyle.js, line 324
Converts rgb to hex.
Name Type Description
r Number Red value.
g Number Green Value.
b Number Blue value.
Returns:
Hex color string.

setCircleSegmentsBackgroundColor(value){void}

modules/vectorStyle/pointStyle.js, line 678
Setter for circleSegmentsBackgroundColor
Name Type Description
value Array.<Number> Color

setImagePath(value){void}

modules/vectorStyle/pointStyle.js, line 696
Setter for imagePath.
Name Type Description
value String Image path.

setSize(size){void}

modules/vectorStyle/pointStyle.js, line 687
Setter for size.
Name Type Description
size * Size