Class: ThemeLabelText

SuperMap.ThemeLabelText

The ThemeLabelText class. Sets the font size and the display style of the text in the label by this class.

new SuperMap.ThemeLabelText(options)

ThemeLabelText.js, line 6
Name Type Description
options Object

The parameters.

Name Type Default Description
maxTextHeight number 0 optional

The maximum height of the text in the label.

maxTextWidth number 0 optional

The maximum width of the text in the label.

minTextHeight number 0 optional

The minimum height of the text in the label.

minTextWidth number 0 optional

The minimum width of the text in the label.

uniformStyle SuperMap.ServerTextStyle optional

The unified text style.

uniformMixedStyle SuperMap.LabelMixedTextStyle optional

The uniform composite text style of the label map.

Members

maxTextHeightnumber

The maximum height of the text in the label. When the size of the label text is not fixed, i.e., ServerTextStyle.sizeFixed = false is valid, if the height of the text exceeds the maximum, it is no longer zoomed in. The unit of the height is 0.1mm.

maxTextWidthnumber

The maximum height of the text in the label. When the size of the label text is not fixed, i.e., ServerTextStyle.sizeFixed = false is valid, if the width of the text exceeds the maximum, it is no longer zoomed in. The unit of the width is 0.1mm.

minTextHeightnumber

The minimum height of the text in the label. When the size of the label text is not fixed, i.e., ServerTextStyle.sizeFixed = false is valid, if the width of the text exceeds the minimum, it is no longer zoomed in. The unit of the width is 0.1mm.

minTextWidthnumber

The minimum width of the text in the label. When the size of the label text is not fixed, i.e., ServerTextStyle.sizeFixed = false is valid, if the width of the text exceeds the minimum, it is no longer zoomed in. The unit of the width is 0.1mm.

uniformMixedStyleSuperMap.LabelMixedTextStyle

The uniform composite text style of the label map. The text in the same label can be displayed with a variety of styles by this class. The styles ordered from higher priorities to lower priorities are: uniformMixedStyle (a mixed style for label texts), ThemeLabelItem.style (a text style for range items), and uniformStyle (a unified text style).

The unified text style.When the number of the label map items is greater than or equal to 1, the uniformStyle does not work, and the style of each label uses the style set in its item. The styles ordered from higher priorities to lower priorities are: uniformMixedStyle (a mixed style for label texts), ThemeLabelItem.style (a text style for range items), and uniformStyle (a unified text style).

Methods

SuperMap.ThemeLabelText.fromObj(obj){SuperMap.ThemeLabelText}

ThemeLabelText.js, line 91

Getting the text style class in the label from the incoming object.

Name Type Description
obj Object

The incoming object.

Returns:
Type Description
SuperMap.ThemeLabelText ThemeLabelText object.

destroy()

ThemeLabelText.js, line 71

Disposes the resource. The property that references resource is set to null.