API / geotoolkit / contour / strategy / MajorMinorLabelingStrategy / MajorMinorLabelingStrategy
strategy.MajorMinorLabelingStrategy.MajorMinorLabelingStrategy
This is an abstract strategy class which defines how contour labels should be rendered.
AbstractContourLabelingStrategy↳
MajorMinorLabelingStrategy
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
labelformat | NumberFormat | Label format |
labelformat-fulllocale | boolean | Specify format how to provide locale |
labelformat-grouplength | number | Specify group length of numbers |
labelformat-locale | string | Format locale |
labelformat-locale | Locale | Format locale |
labelformat-locale-locale | string | The name of the locale |
labelformat-locale-numberformat | NumberFormatInfo | Defines number format |
labelformat-locale-numberformat-dec | string | Defines decimal symbol |
labelformat-locale-numberformat-group | string | Defines group symbol |
labelformat-locale-numberformat-infinity | string | Defines infinity text |
labelformat-locale-numberformat-neg | string | Defines negative symbol |
labelformat-maximumfractiondigits | number | Specify maximum fraction digits |
labelformat-minimumfractiondigits | number | Specify minimum fraction digits, have to be less or equal to maximumfractiondigits |
labelformat-round | boolean | Round number |
labelmargin | number | The label margin for specified level |
labelspacing | number | The label spacing for specified level |
majorlabelformat | NumberFormat | Major label format |
majorlabelmargin | number | Label format for major isolines |
majorlabelspacing | number | Label spacing for major isolines |
majorlabelsvisible | boolean | Major labels visibility |
majorstep | number | Step for major labels |
majortextstyle | TextStyle | Major label text style |
majortextstyle-alignment | AlignmentStyle | Alignment |
majortextstyle-autosize | boolean | Auto font size on high definition display |
majortextstyle-background | string | Background style |
majortextstyle-background | FillStyle | Background style |
majortextstyle-background-color | string | Color in CSS form |
majortextstyle-background-evenoddmode | boolean | Even-odd fill mode |
majortextstyle-background-fillpattern | Pattern | Pattern |
majortextstyle-background-fillpattern-containername | string | An 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-patternname | string | Name of this pattern for indexing |
majortextstyle-background-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
majortextstyle-background-foreground | string | Foreground color |
majortextstyle-background-pattern | Pattern | Pattern |
majortextstyle-baseline | BaseLineStyle | Base line |
majortextstyle-color | string | Color in CSS form |
majortextstyle-fill | FillStyle | Text fill style |
majortextstyle-font | string | Font see |
majortextstyle-fonturl | string | The place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword |
majortextstyle-lineheight | string | number | Line height |
majortextstyle-multiline | boolean | Allow multi-line text |
majortextstyle-outline | string | Outline style |
majortextstyle-outline | LineStyle | Outline style |
majortextstyle-outline-color | string | Color in CSS form |
majortextstyle-outline-fill | string | Optional fill style to be used to fill lines generated with this style |
majortextstyle-outline-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
majortextstyle-outline-linecap | CapStyle | The line cap style |
majortextstyle-outline-linedashoffset | number | Line dash offset of dashed line |
majortextstyle-outline-linejoin | JoinStyle | The line join style |
majortextstyle-outline-pixelsnapmode | boolean | Pixel Snap Mode, default( |
majortextstyle-outline-scalable | boolean | True if width should depend on transformation |
majortextstyle-outline-unit | string | Optional unit for the width |
majortextstyle-outline-width | number | string | The line thickness |
majortextstyle-overflowwrap | OverflowWrapStyle | Overflow wrap |
majortextstyle-strikethrough | string | Strikethrough style |
majortextstyle-strikethrough | LineStyle | Strikethrough style |
majortextstyle-textoverflow | TextOverflowStyle | Text overflow |
majortextstyle-underline | string | Underline style |
majortextstyle-underline | LineStyle | Underline style |
majortextstyle-underlineoffset | string | number | Underline offset distance |
majortextstyle-whitespace | WhiteSpaceStyle | White space |
majortextstyle-wordbreak | WordBreakStyle | Word break |
majorusefontcolorforlabels | boolean | Flag which indicates if font color is used for major label text color |
minorlabelformat | NumberFormat | Minor label format |
minorlabelmargin | number | Label format for minor isolines |
minorlabelspacing | number | Label spacing for minor isolines |
minorlabelsvisible | boolean | Minor labels visibility |
minorstep | number | Step for minor labels |
minortextstyle | TextStyle | Minor label text style |
minorusefontcolorforlabels | boolean | Flag which indicates if font color is used for minor label text color |
textstyle | TextStyle | The text style for specified level |
usefontcolorforlabels | boolean | Flag which indicates if font color is used for label text color |
Constructors
• new MajorMinorLabelingStrategy(options?)
| Name | Type | Description |
|---|---|---|
Optional options | Options | labeling strategy properties |
AbstractContourLabelingStrategy.constructor
Methods
▸ getClassName(): string
string
AbstractContourLabelingStrategy.getClassName
▸ getDesiredLabelCount(modelToDevice, modelLimits, isolineLength, labelGap): number
Desired number of labels on the isoline
| Name | Type | Description |
|---|---|---|
modelToDevice | Transformation | Model to device transformation. |
modelLimits | Rect | Model limits of the contour. |
isolineLength | number | Length of isoline in device coordinate space. |
labelGap | number | Length of gap for a label on isoline in device coordinate space. |
number
count The label count.
AbstractContourLabelingStrategy.getDesiredLabelCount
▸ getLabelFormat(level?): NumberFormat
Gets label format.
| Name | Type | Description |
|---|---|---|
Optional level | number | level index |
format
AbstractContourLabelingStrategy.getLabelFormat
▸ getLabelMargin(level?): number
Gets label margin for specified level
| Name | Type | Description |
|---|---|---|
Optional level | number | level index |
number
AbstractContourLabelingStrategy.getLabelMargin
▸ getLabelScale(modelToDevice, modelLimits, height): number
Gets the labeling scale factor
| Name | Type | Description |
|---|---|---|
modelToDevice | Transformation | Model to device transformation. |
modelLimits | Rect | Model limits of the contour. |
height | number | Height of non-scaled label in device coordinate space. |
number
scale The label scale.
AbstractContourLabelingStrategy.getLabelScale
▸ getLabelSpacing(level?): number
Gets label spacing for specified level
| Name | Type | Description |
|---|---|---|
Optional level | number | level index |
number
AbstractContourLabelingStrategy.getLabelSpacing
▸ getLabelsVisible(level): boolean
Returns if labels of specified level should be drawn
| Name | Type | Description |
|---|---|---|
level | number | level |
boolean
AbstractContourLabelingStrategy.getLabelsVisible
▸ getMajorLabelFormat(): NumberFormat
Gets major label format
▸ getMajorLabelMargin(): number
Gets label margin for major isolines
number
▸ getMajorLabelSpacing(): number
Gets label spacing for major isolines
number
▸ getMajorLabelsVisible(): boolean
Gets show major labels
boolean
▸ getMajorStep(): number
Gets step for major labels
number
▸ getMajorTextStyle(): TextStyle
Gets text style for major isolines
▸ getMajorUseFontColorForLabels(): boolean
Gets if use font color for major labels
boolean
▸ getMinorLabelFormat(): NumberFormat
Gets minor label format
▸ getMinorLabelMargin(): number
Gets label margin for minor isolines
number
▸ getMinorLabelSpacing(): number
Gets label spacing for minor isolines
number
▸ getMinorLabelsVisible(): boolean
Gets show minor labels
boolean
▸ getMinorStep(): number
Gets step for major labels
number
▸ getMinorTextStyle(): TextStyle
Gets text style for minor isolines
▸ getMinorUseFontColorForLabels(): boolean
Gets if use font color for minor labels
boolean
▸ getProperties(): Options
Gets labeling strategy properties
labeling strategy properties
AbstractContourLabelingStrategy.getProperties
▸ getTextStyle(level?): TextStyle
Gets text style for specified level
| Name | Type | Description |
|---|---|---|
Optional level | number | level index |
AbstractContourLabelingStrategy.getTextStyle
▸ getUseFontColorForLabels(level?): boolean
Gets the flag which indicates if font color is used for label text color.
| Name | Type | Description |
|---|---|---|
Optional level | number | level index |
boolean
useFontColor Flag which indicates if font color is used for label text color.
AbstractContourLabelingStrategy.getUseFontColorForLabels
▸ isMajorLevel(i): boolean
Gets if level is major
| Name | Type | Description |
|---|---|---|
i | number | level index |
boolean
▸ isMinorLevel(i): boolean
Gets if level is minor
| Name | Type | Description |
|---|---|---|
i | number | level index |
boolean
▸ setLabelFormat(format?): MajorMinorLabelingStrategy
Sets label format.
| Name | Type | Description |
|---|---|---|
Optional format | NumberFormat | format |
this
AbstractContourLabelingStrategy.setLabelFormat
▸ setMajorLabelFormat(format): MajorMinorLabelingStrategy
Sets major label format
| Name | Type |
|---|---|
format | NumberFormat |
▸ setMajorLabelMargin(margin): MajorMinorLabelingStrategy
Sets label margin for major isolines
| Name | Type | Description |
|---|---|---|
margin | number | label margin |
▸ setMajorLabelSpacing(spacing): MajorMinorLabelingStrategy
Sets label spacing for major isolines
| Name | Type | Description |
|---|---|---|
spacing | number | label spacing |
▸ setMajorLabelsVisible(visible): MajorMinorLabelingStrategy
Sets show major labels
| Name | Type | Description |
|---|---|---|
visible | boolean | visible |
▸ setMajorStep(step): MajorMinorLabelingStrategy
Sets step for major labels
| Name | Type | Description |
|---|---|---|
step | number | step |
▸ setMajorTextStyle(style): MajorMinorLabelingStrategy
Sets text style for major isolines
| Name | Type | Description |
|---|---|---|
style | TextStyle | style |
▸ setMajorUseFontColorForLabels(use): MajorMinorLabelingStrategy
Sets if use font color for major labels
| Name | Type | Description |
|---|---|---|
use | boolean | use |
▸ setMinorLabelFormat(format): MajorMinorLabelingStrategy
Sets minor label format
| Name | Type |
|---|---|
format | NumberFormat |
▸ setMinorLabelMargin(margin): MajorMinorLabelingStrategy
Sets label margin for minor isolines
| Name | Type | Description |
|---|---|---|
margin | number | label margin |
▸ setMinorLabelSpacing(spacing): MajorMinorLabelingStrategy
Sets label spacing for minor isolines
| Name | Type | Description |
|---|---|---|
spacing | number | label spacing |
▸ setMinorLabelsVisible(visible): MajorMinorLabelingStrategy
Sets show major labels
| Name | Type | Description |
|---|---|---|
visible | boolean | visible |
▸ setMinorStep(step): MajorMinorLabelingStrategy
Sets step for minor labels
| Name | Type | Description |
|---|---|---|
step | number | step |
▸ setMinorTextStyle(style): MajorMinorLabelingStrategy
Sets text style for minor isolines
| Name | Type | Description |
|---|---|---|
style | TextStyle | style |
▸ setMinorUseFontColorForLabels(use): MajorMinorLabelingStrategy
Sets if use font color for minor labels
| Name | Type | Description |
|---|---|---|
use | boolean | use |
▸ setProperties(props?): MajorMinorLabelingStrategy
Sets labeling strategy properties
| Name | Type | Description |
|---|---|---|
Optional props | Options | labeling strategy properties |
this
AbstractContourLabelingStrategy.setProperties
▸ Static getClassName(): string
string