Last updated

API / geotoolkit / contour / strategy / MajorMinorLabelingStrategy / MajorMinorLabelingStrategy

Class: MajorMinorLabelingStrategy

strategy.MajorMinorLabelingStrategy.MajorMinorLabelingStrategy

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
majorlabelformatNumberFormatMajor label format
majorlabelmarginnumberLabel format for major isolines
majorlabelspacingnumberLabel spacing for major isolines
majorlabelsvisiblebooleanMajor labels visibility
majorstepnumberStep for major labels
majortextstyleTextStyleMajor label text style
majortextstyle-alignmentAlignmentStyleAlignment
majortextstyle-autosizebooleanAuto font size on high definition display
majortextstyle-backgroundstringBackground style
majortextstyle-backgroundFillStyleBackground style
majortextstyle-background-colorstringColor in CSS form
majortextstyle-background-evenoddmodebooleanEven-odd fill mode
majortextstyle-background-fillpatternPatternPattern
majortextstyle-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
majortextstyle-background-fillpattern-patternnamestringName of this pattern for indexing
majortextstyle-background-fillpattern-scalablebooleanFlag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported)
majortextstyle-background-foregroundstringForeground color
majortextstyle-background-patternPatternPattern
majortextstyle-baselineBaseLineStyleBase line
majortextstyle-colorstringColor in CSS form
majortextstyle-fillFillStyleText fill style
majortextstyle-fontstringFont see
majortextstyle-fonturlstringThe place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword
majortextstyle-lineheightstring | numberLine height
majortextstyle-multilinebooleanAllow multi-line text
majortextstyle-outlinestringOutline style
majortextstyle-outlineLineStyleOutline style
majortextstyle-outline-colorstringColor in CSS form
majortextstyle-outline-fillstringOptional fill style to be used to fill lines generated with this style
majortextstyle-outline-fillFillStyleOptional fill style to be used to fill lines generated with this style
majortextstyle-outline-linecapCapStyleThe line cap style
majortextstyle-outline-linedashoffsetnumberLine dash offset of dashed line
majortextstyle-outline-linejoinJoinStyleThe line join style
majortextstyle-outline-pixelsnapmodebooleanPixel Snap Mode, default(
majortextstyle-outline-scalablebooleanTrue if width should depend on transformation
majortextstyle-outline-unitstringOptional unit for the width
majortextstyle-outline-widthnumber | stringThe line thickness
majortextstyle-overflowwrapOverflowWrapStyleOverflow wrap
majortextstyle-strikethroughstringStrikethrough style
majortextstyle-strikethroughLineStyleStrikethrough style
majortextstyle-textoverflowTextOverflowStyleText overflow
majortextstyle-underlinestringUnderline style
majortextstyle-underlineLineStyleUnderline style
majortextstyle-underlineoffsetstring | numberUnderline offset distance
majortextstyle-whitespaceWhiteSpaceStyleWhite space
majortextstyle-wordbreakWordBreakStyleWord break
majorusefontcolorforlabelsbooleanFlag which indicates if font color is used for major label text color
minorlabelformatNumberFormatMinor label format
minorlabelmarginnumberLabel format for minor isolines
minorlabelspacingnumberLabel spacing for minor isolines
minorlabelsvisiblebooleanMinor labels visibility
minorstepnumberStep for minor labels
minortextstyleTextStyleMinor label text style
minorusefontcolorforlabelsbooleanFlag which indicates if font color is used for minor label text color
textstyleTextStyleThe text style for specified level
usefontcolorforlabelsbooleanFlag which indicates if font color is used for label text color

Contents

Constructors

new MajorMinorLabelingStrategy(options)

new MajorMinorLabelingStrategy(options?)

Parameters

Name Type Description
Optional optionsOptionslabeling strategy properties

Overrides

AbstractContourLabelingStrategy.constructor

Methods

getClassName

getClassName(): string

Returns

string

Inherited from

AbstractContourLabelingStrategy.getClassName


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.

Inherited from

AbstractContourLabelingStrategy.getDesiredLabelCount


getLabelFormat

getLabelFormat(level?): NumberFormat

Gets label format.

Parameters

Name Type Description
Optional levelnumberlevel index

Returns

NumberFormat

format

Inherited from

AbstractContourLabelingStrategy.getLabelFormat


getLabelMargin

getLabelMargin(level?): number

Gets label margin for specified level

Parameters

Name Type Description
Optional levelnumberlevel index

Returns

number

Inherited from

AbstractContourLabelingStrategy.getLabelMargin


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.

Inherited from

AbstractContourLabelingStrategy.getLabelScale


getLabelSpacing

getLabelSpacing(level?): number

Gets label spacing for specified level

Parameters

Name Type Description
Optional levelnumberlevel index

Returns

number

Inherited from

AbstractContourLabelingStrategy.getLabelSpacing


getLabelsVisible

getLabelsVisible(level): boolean

Returns if labels of specified level should be drawn

Parameters

Name Type Description
levelnumberlevel

Returns

boolean

Inherited from

AbstractContourLabelingStrategy.getLabelsVisible


getMajorLabelFormat

getMajorLabelFormat(): NumberFormat

Gets major label format

Returns

NumberFormat


getMajorLabelMargin

getMajorLabelMargin(): number

Gets label margin for major isolines

Returns

number


getMajorLabelSpacing

getMajorLabelSpacing(): number

Gets label spacing for major isolines

Returns

number


getMajorLabelsVisible

getMajorLabelsVisible(): boolean

Gets show major labels

Returns

boolean


getMajorStep

getMajorStep(): number

Gets step for major labels

Returns

number


getMajorTextStyle

getMajorTextStyle(): TextStyle

Gets text style for major isolines

Returns

TextStyle


getMajorUseFontColorForLabels

getMajorUseFontColorForLabels(): boolean

Gets if use font color for major labels

Returns

boolean


getMinorLabelFormat

getMinorLabelFormat(): NumberFormat

Gets minor label format

Returns

NumberFormat


getMinorLabelMargin

getMinorLabelMargin(): number

Gets label margin for minor isolines

Returns

number


getMinorLabelSpacing

getMinorLabelSpacing(): number

Gets label spacing for minor isolines

Returns

number


getMinorLabelsVisible

getMinorLabelsVisible(): boolean

Gets show minor labels

Returns

boolean


getMinorStep

getMinorStep(): number

Gets step for major labels

Returns

number


getMinorTextStyle

getMinorTextStyle(): TextStyle

Gets text style for minor isolines

Returns

TextStyle


getMinorUseFontColorForLabels

getMinorUseFontColorForLabels(): boolean

Gets if use font color for minor labels

Returns

boolean


getProperties

getProperties(): Options

Gets labeling strategy properties

Returns

Options

labeling strategy properties

Overrides

AbstractContourLabelingStrategy.getProperties


getTextStyle

getTextStyle(level?): TextStyle

Gets text style for specified level

Parameters

Name Type Description
Optional levelnumberlevel index

Returns

TextStyle

Inherited from

AbstractContourLabelingStrategy.getTextStyle


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.

Inherited from

AbstractContourLabelingStrategy.getUseFontColorForLabels


isMajorLevel

isMajorLevel(i): boolean

Gets if level is major

Parameters

Name Type Description
inumberlevel index

Returns

boolean


isMinorLevel

isMinorLevel(i): boolean

Gets if level is minor

Parameters

Name Type Description
inumberlevel index

Returns

boolean


setLabelFormat

setLabelFormat(format?): MajorMinorLabelingStrategy

Sets label format.

Parameters

Name Type Description
Optional formatNumberFormatformat

Returns

MajorMinorLabelingStrategy

this

Inherited from

AbstractContourLabelingStrategy.setLabelFormat


setMajorLabelFormat

setMajorLabelFormat(format): MajorMinorLabelingStrategy

Sets major label format

Parameters

Name Type
formatNumberFormat

Returns

MajorMinorLabelingStrategy


setMajorLabelMargin

setMajorLabelMargin(margin): MajorMinorLabelingStrategy

Sets label margin for major isolines

Parameters

Name Type Description
marginnumberlabel margin

Returns

MajorMinorLabelingStrategy


setMajorLabelSpacing

setMajorLabelSpacing(spacing): MajorMinorLabelingStrategy

Sets label spacing for major isolines

Parameters

Name Type Description
spacingnumberlabel spacing

Returns

MajorMinorLabelingStrategy


setMajorLabelsVisible

setMajorLabelsVisible(visible): MajorMinorLabelingStrategy

Sets show major labels

Parameters

Name Type Description
visiblebooleanvisible

Returns

MajorMinorLabelingStrategy


setMajorStep

setMajorStep(step): MajorMinorLabelingStrategy

Sets step for major labels

Parameters

Name Type Description
stepnumberstep

Returns

MajorMinorLabelingStrategy


setMajorTextStyle

setMajorTextStyle(style): MajorMinorLabelingStrategy

Sets text style for major isolines

Parameters

Name Type Description
styleTextStylestyle

Returns

MajorMinorLabelingStrategy


setMajorUseFontColorForLabels

setMajorUseFontColorForLabels(use): MajorMinorLabelingStrategy

Sets if use font color for major labels

Parameters

Name Type Description
usebooleanuse

Returns

MajorMinorLabelingStrategy


setMinorLabelFormat

setMinorLabelFormat(format): MajorMinorLabelingStrategy

Sets minor label format

Parameters

Name Type
formatNumberFormat

Returns

MajorMinorLabelingStrategy


setMinorLabelMargin

setMinorLabelMargin(margin): MajorMinorLabelingStrategy

Sets label margin for minor isolines

Parameters

Name Type Description
marginnumberlabel margin

Returns

MajorMinorLabelingStrategy


setMinorLabelSpacing

setMinorLabelSpacing(spacing): MajorMinorLabelingStrategy

Sets label spacing for minor isolines

Parameters

Name Type Description
spacingnumberlabel spacing

Returns

MajorMinorLabelingStrategy


setMinorLabelsVisible

setMinorLabelsVisible(visible): MajorMinorLabelingStrategy

Sets show major labels

Parameters

Name Type Description
visiblebooleanvisible

Returns

MajorMinorLabelingStrategy


setMinorStep

setMinorStep(step): MajorMinorLabelingStrategy

Sets step for minor labels

Parameters

Name Type Description
stepnumberstep

Returns

MajorMinorLabelingStrategy


setMinorTextStyle

setMinorTextStyle(style): MajorMinorLabelingStrategy

Sets text style for minor isolines

Parameters

Name Type Description
styleTextStylestyle

Returns

MajorMinorLabelingStrategy


setMinorUseFontColorForLabels

setMinorUseFontColorForLabels(use): MajorMinorLabelingStrategy

Sets if use font color for minor labels

Parameters

Name Type Description
usebooleanuse

Returns

MajorMinorLabelingStrategy


setProperties

setProperties(props?): MajorMinorLabelingStrategy

Sets labeling strategy properties

Parameters

Name Type Description
Optional propsOptionslabeling strategy properties

Returns

MajorMinorLabelingStrategy

this

Overrides

AbstractContourLabelingStrategy.setProperties


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractContourLabelingStrategy.getClassName