TextSymbolizer

TextSymbolizer specifies how to style text features.

Parameters

Parameter NameValue TypeDescriptionRequired
ClipBooleanSpecifies whether geometry is clipped to map bounds before rendering or not. Default value is False.No
GeometryExpressionStringSpecifies the expression to compute a geometry to be used in rendering. This parameter is optional. If it is not specified, a default geometry field of a data source is used.No
LabelBehaviourLabelBehaviourSpecifies the role and behaviour of a label.Yes
LabelPlacementLabelPlacementSpecifies the type of a label placement (e.g. point-like, linear or areal labeling style)No
PriorityExpressionExpressionSpecifies the priority of a label. Being an expression, this parameter allows to take values from a data source. For example, the value can be [field_priority], where field_priority is an attribute in the data source. Note, an expression must always return a numerical value.No
TextAbbreviationTextAbbreviationSpecifies the parameters for text abbreviation.No
TextLayoutTextLayoutSpecifies the parameters that define layout of the text.No

LabelBehaviour

LabelBehaviour element specifies the role and behavior of a label placement during candidate-position generation.

Parameters

Parameter NameValue TypeDescriptionRequired
AllowOverlapBooleanSpecifies whether the label is allowed to overlap other labels.No
AvoidEdgesBooleanSpecifies whether the label is allowed to intersect boundaries of the map.No
CollisionDetectableBooleanSpecifies whether the label is considered as a candidate for a labeling algorithm. If not, the label will be simply rendered. Default value is True.No
CollisionMeasuresCollisionMeasure[]Specifies a list of collision measures.No
DropOnCollisionBooleanSpecifies whether to drop the label if any collision with other labels exists.No
IgnorePaddingBooleanSpecifies whether to ignore padding parameter of the map object or not.No
QualityFilterExpressionSpecifies the expression to filter labels by using quality functions.No

TextAbbreviation

TextAbbreviation element specifies how words in labels are abbreviated.

Parameters

Parameter NameValue TypeDescriptionRequired
DictionaryNameStringSpecifies the name of a dictionary to be used. The name should correspond to the name of one of the entries in TextAbbreviationDictionaries.Yes
EnabledBooleanSpecifies whether abbreviation is enabled or not.No
SkipOriginalTextBooleanSpecifies whether original text is skipped. If the value is False then original not-abbreviated text is tried out first for labeling. Default value is False.No
StringComparisonStringComparisonSpecifies the rules to use in the string comparison. Default value is OrdinalIgnoreCase.No
WholeWordsOnlyBooleanSpecifies whether to apply abbreviation on whole words only. Default value is False.No

At the moment MapSurfer.NET supports the following dictionary file formats:

```cs * Maplex Extension Dictionary File - v1.0 * Format: TEXT ABBREVIATION(S) TYPE * where TYPE=[Translation|Keyword|Ending]

"Street" Str St Ending "Road" Rd Ending ""Post Office"" "Post Off." PO Keyword

  • [end] ```

TextLayout

TextLayout element specifies graphical representation of labels such as font, size, color, character spacing, etc.

Parameters

Parameter NameValue TypeDescriptionRequired
AlignmentAlignmentSpecifies whether the text in the label is left-aligned, right-aligned or centered. Default value is Center.No
LeadingSingleDetermines the space between adjacent TextBlocks. Default value is 0.No
BlocksTextBlock[]Determines a list of text blocks. By default this list is empty.Yes
FontReductionFontReduction[]Specifies the set of parameters to control the reduction of the font size.No
CombinedBlocksBooleanSpecifies whether text blocks are combined, in other words whether one of the text blocks can be skipped from rendering if it does not fit into the current label placement. Default value is True. Note, this parameter is only combined with LinePlacement.No

Alignment

Alignment specifies the alignment of the text contents of the label.

Member NameDescription
CenterText is centered.
CenterAlignedText is centered with regard to the feature. At the same time text is aligned to the right or left margin of label's bounding box.
LeftText is aligned to the left.
RightText is aligned to the right.

FontReduction

FontReduction element specifies how to reduce the size and the width of the label text. This parameter allows controlling the reduction of both the width and the size of the font independently from each other.

Parameter NameValue TypeDescriptionRequired
EnabledBooleanSpecifies whether the reduction is enabled or not.No
SizeIntervalSingleDetermines a step interval between different font size variants to be tried out. Default value is 0.25.No
SizeLowerLimitSingleSpecifies the lower limit of the font size. Default value is 8.No
WidthIntervalSingleDetermines an interval which will be used in compressing the width of the font. This parameter is specified in terms of a percentage of the original font width of the label. Default value is 5. The parameter can take values in the range between 1 and 20 percent.No
WidthLowerLimitSingleSpecifies the lower limit of the font width specified in terms of a percentage of the original font width of the label. Default value is 100. The parameter can take values in the range between 1 and 100 percent.No

TextBlock

TextBlock element is responsible for displaying small amounts of text that has its own characteristics such as size, color, spacing, etc.

Parameters

Parameter NameValue TypeDescriptionRequired
FontSetNameStringThe name of a FontSet.No
SuppressInCombiningBooleanSpecifies whether the text block can be skipped or not if its label elements can not be located.No
TextExpressionExpressionThe content of the label.No
TextFormatTextFormatSpecifies the character formatting information.No

TextFormat

TextFormat element specifies character formatting information.

Parameters

Parameter NameValue TypeDescriptionRequired
BidiModeBooleanSpecifies whether bi-directional mode is enabled or not. Default value is True.No
CharPaddingPointSpecifies the size of the padding around label characters. This feature helps to control the density of labels. Default value is 0,0.No
TextSpacingTextSpacingSpecifies the set of parameters that control leading, kerning, spacing between characters and lines, as well as spreading of the text along the tagged feature.No
TextStyleTextStyleSpecifies the style of the text including font size, color, decoration effects, etc.No
TextWrappingTextWrappingDetermines whether and how text is wrapped when it reaches the specified limits.No

TextSpacing

TextSpacing element specifies a set of parameters that control leading, kerning, spacing between characters and lines, as well as spreading of the text along the tagged feature.

Parameters

Parameter NameValue TypeDescriptionRequired
CharacterSpacingSingleSpecifies the spacing between characters in words. Default value is 0.No
CollisionDetectableBooleanSpecifies whether spacing is considered in detecting collisions between labels. Default value is True.No
KerningBooleanSpecifies whether kerning is enabled or not. Default value is False.No
LeadingSingleDetermines the space between adjacent lines. Default value is 0.No
MaximumCharactersSpacingSingleSpecifies the maximum spacing between characters allowed. Default value is 0.No
SpreadCharactersBooleanSpecifies whether characters are spread along the line/through polygon or not. Default value is False.No
WordSpacingSingleSpecifies the spacing between words. Default value is 0.No

TextWrapping

TextWrapping element determines whether and how text is wrapped when it reaches the specified limits.

Parameter NameValue TypeDescriptionRequired
BeingLineWithCapitalLetterBooleanSpecifies whether the first letter in the line is capitalized or not. Default value is False.No
CharactersWrapCharacterSpecifies the characters at which line wrapping is performed. Default value is 0.No
MaxLinesIntegerSpecifies the maximum allowed number of lines in the text block. Default value is 0.No
MaxWidthSingleSpecifies the length of a line. Default value is 0.No
ModeWrapModeSpecifies the mode of text wrapping. Default value is NoWrap.No

WrapCharacter

WrapCharacter element

Parameter NameValue TypeDescriptionRequired
CharacterBooleanSpecifies the character, or even a string, at which the wrapping needs to be performed. Default value is ''.No
WrapTypeWrapTypeDetermines where the wrapping is performed, i.e. either Before or After the character. Default value is After.No

WrapMode

TextWrapping element determines whether and how text is wrapped when it reaches the specified limits.

Member NameDescription
NoWrapLine wrapping is not performed.
WrapLine-breaking occurs if the line has mandatory breaking symbols (see Characters).
WrapByCharactersLine-breaking occurs if the line contains specified characters.
WrapByMaxWidthCharsLine-breaking occurs if the line exceeds MaxWidth given in chars.
WrapByMaxWidthPixelsLine-breaking occurs if the line exceeds MaxWidth given in pixels

TextStyle

TextStyle element the style of the text characteristics such as font size, color, decoration effects, etc.

Parameter NameValue TypeDescriptionRequired
ColorColorSpecifies the text color. Default value is Black.No
DecorationTextDecorationSpecifies the decoration added to text.No
FontFontSpecifies the font of the text.Yes
HaloHaloSpecifies the halo of the text.No
OpacitySingleSpecifies the opacity of the text fill. Default value is 1 (fully opaque).No

TextDecoration

TextDecoration element specifies the decoration added to text.

Parameter NameValue TypeDescriptionRequired
ColorColorSpecifies the color of the decoration. Default value is Black.No
OpacitySingleSpecifies the opacity of the decoration. Default value is 1 (fully opaque).No
ScaleSingleSpecifies the opacity of the text fill. Default value is 1. Possible values lie in the range [0.1, 5].No
TypeTextDecorationTypeSpecifies the type of the decoration. Default value is None.No

TextDecorationType

Member NameDescription
NoneDefines a normal text. This is default.
UnderlineDefines a line below the text.
OverlineDefines a line above the text.
StrikethroughDefines a line through the text.
DoubleStrikethroughDefines a double line through the text.

Font

Font element specifies the font properties.

Parameter NameValue TypeDescriptionRequired
NameStingName of the font. Default value is platform dependent.Yes
SizeSingleSize of the font measured in pixels. Default value is 10.No
StretchSingleSpecifies the font stretch parameter which allows making text wider or narrower. Default value is 1.No
StyleFontStyleDefines font style. Default value is Normal. Possible values are Normal, Oblique, Italic.No
WeightFontWeightDefines font weight. The FontWeight enumeration describes common values for degree of blackness or thickness of strokes of characters in a font. Possible values are Thin, ExtraLight, UltraLight, Light, Normal, Regular, Medium, DemiBold, SemiBold, Bold, ExtraBold, UltraBold, Black, Heavy, ExtraBlack, UltraBlack. Default value is Regular.No

Halo

Halo element specifies the representation of the halo outline around the text.

Parameter NameValue TypeDescriptionRequired
BlurFactorSingleSpecifies the radius of a Gaussian Blur effect.No
CollisionDetectableBooleanSpecifies whether the label is considered as a candidate for a labeling algorithm. If not, the label will be simply rendered. Default value is True.No
ColorColorSpecifies the halo color. Default value is white.No
ColorLuminosityHaloColorLuminositySpecifies the text luminosity. Default is None.No
ColorSourceHaloColorSourceSpecifies the source of the color.No
DisplacementPointSpecifies the displacement of a texture or a hatch pattern. Default value is (0,0)No
ModeHaloModeSpecifies the halo mode, i.e. solid or blurred.No
OpacitySingleSpecifies the halo opacity. Default value is 1 (fully opaque).No
PercOfLuminositySingleSpecifies the percentage value of the luminosity. Default value is 0.5No
RadiusSingleSpecifies the halo width. Default value is 0.No
SharpnessSingleSpecifies the threshold for alpha channel when Smooth mode is applied. Default value is 0.No

HaloColorLuminosity

Member NameDescription
NoneNo color luminosity changes. This is default.
LighterChanges the color to a lighter one.
DarkerChanges the color to a darker one.

HaloColorSource

Member NameDescription
DefaultApplies color of the text. This is default.
BackgroundApplies color of the background image.
TextApplies color of the text. This is the same as Default.

HaloMode

Member NameDescription
SolidDefines a halo type with solid outline. This is default value.
BlurredDefines a blurred halo.
SolidAndBlurredApplies both Solid and Blurred modes simultaneously.