Last updated

API / geotoolkit / contour / strategy / AbstractContourLabelingStrategy / AbstractContourLabelingStrategy

Class: AbstractContourLabelingStrategy

strategy.AbstractContourLabelingStrategy.AbstractContourLabelingStrategy

This is an abstract strategy class which defines how contour labels should be rendered.

Hierarchy

Table of contents

Constructors
Methods
Css Properties
Name Type Description
labelformatNumberFormatLabel format
labelformat-fulllocalebooleanSpecify format how to provide locale
labelformat-grouplengthnumberSpecify group length of numbers
labelformat-localestringFormat locale
labelformat-localeLocaleFormat locale
labelformat-locale-localestringThe name of the locale
labelformat-locale-numberformatNumberFormatInfoDefines number format
labelformat-locale-numberformat-decstringDefines decimal symbol
labelformat-locale-numberformat-groupstringDefines group symbol
labelformat-locale-numberformat-infinitystringDefines infinity text
labelformat-locale-numberformat-negstringDefines negative symbol
labelformat-maximumfractiondigitsnumberSpecify maximum fraction digits
labelformat-minimumfractiondigitsnumberSpecify minimum fraction digits, have to be less or equal to maximumfractiondigits
labelformat-roundbooleanRound number
labelmarginnumberThe label margin for specified level
labelspacingnumberThe label spacing for specified level
textstyleTextStyleThe text style for specified level
textstyle-alignmentAlignmentStyleAlignment
textstyle-autosizebooleanAuto font size on high definition display
textstyle-backgroundstringBackground style
textstyle-backgroundFillStyleBackground style
textstyle-background-colorstringColor in CSS form
textstyle-background-evenoddmodebooleanEven-odd fill mode
textstyle-background-fillpatternPatternPattern
textstyle-background-fillpattern-containernamestringAn optional container name, which creates an image pattern. This parameter is used for serialization if you want to save are reference to pattern instead of the pattern itself
textstyle-background-fillpattern-patternnamestringName of this pattern for indexing
textstyle-background-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
textstyle-background-foregroundstringForeground color
textstyle-background-patternPatternPattern
textstyle-baselineBaseLineStyleBase line
textstyle-colorstringColor in CSS form
textstyle-fillFillStyleText fill style
textstyle-fontstringFont see
textstyle-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
textstyle-lineheightstring | numberLine height
textstyle-multilinebooleanAllow multi-line text
textstyle-outlinestringOutline style
textstyle-outlineLineStyleOutline style
textstyle-outline-colorstringColor in CSS form
textstyle-outline-fillstringOptional fill style to be used to fill lines generated with this style
textstyle-outline-fillFillStyleOptional fill style to be used to fill lines generated with this style
textstyle-outline-linecapCapStyleThe line cap style
textstyle-outline-linedashoffsetnumberLine dash offset of dashed line
textstyle-outline-linejoinJoinStyleThe line join style
textstyle-outline-pixelsnapmodebooleanPixel Snap Mode, default(
textstyle-outline-scalablebooleanTrue if width should depend on transformation
textstyle-outline-unitstringOptional unit for the width
textstyle-outline-widthnumber | stringThe line thickness
textstyle-overflowwrapOverflowWrapStyleOverflow wrap
textstyle-strikethroughstringStrikethrough style
textstyle-strikethroughLineStyleStrikethrough style
textstyle-textoverflowTextOverflowStyleText overflow
textstyle-underlinestringUnderline style
textstyle-underlineLineStyleUnderline style
textstyle-underlineoffsetstring | numberUnderline offset distance
textstyle-whitespaceWhiteSpaceStyleWhite space
textstyle-wordbreakWordBreakStyleWord break
usefontcolorforlabelsbooleanFlag which indicates if font color is used for label text color

Contents

Constructors

new AbstractContourLabelingStrategy(options)

new AbstractContourLabelingStrategy(options?)

Parameters

Name Type Description
Optional optionsOptionslabeling strategy properties
Methods

getClassName

getClassName(): string

Returns

string


getDesiredLabelCount

getDesiredLabelCount(modelToDevice, modelLimits, isolineLength, labelGap): number

Desired number of labels on the isoline

Parameters

Name Type Description
modelToDeviceTransformationModel to device transformation.
modelLimitsRectModel limits of the contour.
isolineLengthnumberLength of isoline in device coordinate space.
labelGapnumberLength of gap for a label on isoline in device coordinate space.

Returns

number

count The label count.


getLabelFormat

getLabelFormat(level?): NumberFormat

Gets label format.

Parameters

Name Type Description
Optional levelnumberlevel index

Returns

NumberFormat

format


getLabelMargin

getLabelMargin(level?): number

Gets label margin for specified level

Parameters

Name Type Description
Optional levelnumberlevel index

Returns

number


getLabelScale

getLabelScale(modelToDevice, modelLimits, height): number

Gets the labeling scale factor

Parameters

Name Type Description
modelToDeviceTransformationModel to device transformation.
modelLimitsRectModel limits of the contour.
heightnumberHeight of non-scaled label in device coordinate space.

Returns

number

scale The label scale.


getLabelSpacing

getLabelSpacing(level?): number

Gets label spacing for specified level

Parameters

Name Type Description
Optional levelnumberlevel index

Returns

number


getLabelsVisible

getLabelsVisible(level): boolean

Returns if labels of specified level should be drawn

Parameters

Name Type Description
levelnumberlevel

Returns

boolean


getProperties

getProperties(): Options

Gets labeling strategy properties

Returns

Options

labeling strategy properties


getTextStyle

getTextStyle(level?): TextStyle

Gets text style for specified level

Parameters

Name Type Description
Optional levelnumberlevel index

Returns

TextStyle


getUseFontColorForLabels

getUseFontColorForLabels(level?): boolean

Gets the flag which indicates if font color is used for label text color.

Parameters

Name Type Description
Optional levelnumberlevel index

Returns

boolean

useFontColor Flag which indicates if font color is used for label text color.


setLabelFormat

setLabelFormat(format?): AbstractContourLabelingStrategy

Sets label format.

Parameters

Name Type Description
Optional formatNumberFormatformat

Returns

AbstractContourLabelingStrategy

this


setProperties

setProperties(props?): AbstractContourLabelingStrategy

Sets labeling strategy properties

Parameters

Name Type Description
Optional propsOptionslabeling strategy properties

Returns

AbstractContourLabelingStrategy

this


getClassName

Static getClassName(): string

Returns

string