Class: TextStyleModel

TextStyleModel

TextStyleModel

new TextStyleModel()

modules/vectorStyle/textStyle.js, line 15
Class to create ol.style/Text
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

staticTextStyleModel.clusterTextstring

text to show if clusterTextType: "text"

staticTextStyleModel.clusterTextAlignstring

See:

staticTextStyleModel.clusterTextFontstring

See:

staticTextStyleModel.clusterTextOffsetXnumber

staticTextStyleModel.clusterTextOffsetYnumber

staticTextStyleModel.clusterTextScalenumber

staticTextStyleModel.clusterTextStrokeWidthnumber

staticTextStyleModel.clusterTextTypestring

staticTextStyleModel.textOffsetXnumber

staticTextStyleModel.textOffsetYnumber

staticTextStyleModel.textScalenumber

staticTextStyleModel.textStrokeWidthnumber

Methods

createClusteredTextStyle(){ol/style/Text}

modules/vectorStyle/textStyle.js, line 114
Creates text style for clustered features. The text attribute is set according to "clusterTextType". "clusterTextType" === "counter" sets the number of clustered features. "clusterTextType" === "text" sets the value of "clusterText" or "undefined".
Returns:
The created style.

createLabeledTextStyle(){ol/style/Text}

modules/vectorStyle/textStyle.js, line 149
Creates text style for simple features. The text attribute is set using "labelField".
Returns:
The created style.

getStyle(){ol/style}

modules/vectorStyle/textStyle.js, line 93
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.

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.