API / geotoolkit / contour / strategy / AbstractContourLabelingStrategy / AbstractContourLabelingStrategy
strategy.AbstractContourLabelingStrategy.AbstractContourLabelingStrategy
This is an abstract strategy class which defines how contour labels should be rendered.
AbstractContourLabelingStrategy
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 |
textstyle | TextStyle | The text style for specified level |
textstyle-alignment | AlignmentStyle | Alignment |
textstyle-autosize | boolean | Auto font size on high definition display |
textstyle-background | string | Background style |
textstyle-background | FillStyle | Background style |
textstyle-background-color | string | Color in CSS form |
textstyle-background-evenoddmode | boolean | Even-odd fill mode |
textstyle-background-fillpattern | Pattern | Pattern |
textstyle-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 |
textstyle-background-fillpattern-patternname | string | Name of this pattern for indexing |
textstyle-background-fillpattern-scalable | boolean | Flag that sets scalability of the pattern coordinates, or relative to the shape it is filling (It is not supported) |
textstyle-background-foreground | string | Foreground color |
textstyle-background-pattern | Pattern | Pattern |
textstyle-baseline | BaseLineStyle | Base line |
textstyle-color | string | Color in CSS form |
textstyle-fill | FillStyle | Text fill style |
textstyle-font | string | Font see |
textstyle-fonturl | string | The place from which the font will be loaded, if null - uses system fonts. It can be base64 with url keyword |
textstyle-lineheight | string | number | Line height |
textstyle-multiline | boolean | Allow multi-line text |
textstyle-outline | string | Outline style |
textstyle-outline | LineStyle | Outline style |
textstyle-outline-color | string | Color in CSS form |
textstyle-outline-fill | string | Optional fill style to be used to fill lines generated with this style |
textstyle-outline-fill | FillStyle | Optional fill style to be used to fill lines generated with this style |
textstyle-outline-linecap | CapStyle | The line cap style |
textstyle-outline-linedashoffset | number | Line dash offset of dashed line |
textstyle-outline-linejoin | JoinStyle | The line join style |
textstyle-outline-pixelsnapmode | boolean | Pixel Snap Mode, default( |
textstyle-outline-scalable | boolean | True if width should depend on transformation |
textstyle-outline-unit | string | Optional unit for the width |
textstyle-outline-width | number | string | The line thickness |
textstyle-overflowwrap | OverflowWrapStyle | Overflow wrap |
textstyle-strikethrough | string | Strikethrough style |
textstyle-strikethrough | LineStyle | Strikethrough style |
textstyle-textoverflow | TextOverflowStyle | Text overflow |
textstyle-underline | string | Underline style |
textstyle-underline | LineStyle | Underline style |
textstyle-underlineoffset | string | number | Underline offset distance |
textstyle-whitespace | WhiteSpaceStyle | White space |
textstyle-wordbreak | WordBreakStyle | Word break |
usefontcolorforlabels | boolean | Flag which indicates if font color is used for label text color |
Constructors
• new AbstractContourLabelingStrategy(options?)
| Name | Type | Description |
|---|---|---|
Optional options | Options | labeling strategy properties |
Methods
▸ getClassName(): string
string
▸ 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.
▸ getLabelFormat(level?): NumberFormat
Gets label format.
| Name | Type | Description |
|---|---|---|
Optional level | number | level index |
format
▸ getLabelMargin(level?): number
Gets label margin for specified level
| Name | Type | Description |
|---|---|---|
Optional level | number | level index |
number
▸ 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.
▸ getLabelSpacing(level?): number
Gets label spacing for specified level
| Name | Type | Description |
|---|---|---|
Optional level | number | level index |
number
▸ getLabelsVisible(level): boolean
Returns if labels of specified level should be drawn
| Name | Type | Description |
|---|---|---|
level | number | level |
boolean
▸ getProperties(): Options
Gets labeling strategy properties
labeling strategy properties
▸ getTextStyle(level?): TextStyle
Gets text style for specified level
| Name | Type | Description |
|---|---|---|
Optional level | number | level index |
▸ 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.
▸ setLabelFormat(format?): AbstractContourLabelingStrategy
Sets label format.
| Name | Type | Description |
|---|---|---|
Optional format | NumberFormat | format |
AbstractContourLabelingStrategy
this
▸ setProperties(props?): AbstractContourLabelingStrategy
Sets labeling strategy properties
| Name | Type | Description |
|---|---|---|
Optional props | Options | labeling strategy properties |
AbstractContourLabelingStrategy
this
▸ Static getClassName(): string
string