new SuperMap.ServerTextStyle(options)
The ServerTextStyle class is used to define the relevance properties of text style.
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
The parameters.
|
Members
-
he text alignment.
- Default Value: SuperMap.TextAlignment.BASELINECENTER
backColorSuperMap.ServerColor
The background color of the text.
- Default Value: (255, 255, 255)
backOpaqueboolean
Whether the text background is opacity, true means that the text background is opacity.
boldboolean
Whether the text is in bold, true means it’s in bold.
fontHeightnumber
The unit is related to sizeFixed. When setting sizeFixed as False, namely, using map coordinates in unfixed text size. For example, if the unit is degree in geographic coordinate system; When sizeFixed is set to True, the unit is mm.
- Default Value: 6
fontNamestring
The name of the font.
- Default Value: "Times New Roman"
fontWeightnumber
The pound of the text font, indicating the specific value of the bold. The range of the value is a full hundred from 0 to 900. The default value is 400.
- Default Value: 400
fontWidthnumber
The width of the text font. The default value is 0 in map unit The standard of the width of the font is the English characters, then a Chinese character is equivalent to two English characters.
foreColorSuperMap.ServerColor
The foreground color of the text.
- Default Value: (0, 0, 0)
italicboolean
Whether the text is in italic, true means in italic.
italicAnglenumber
The tilt angle of the font, between positive and negative degree in degree unit, and it is accurate to 0.1 degree. The positive and negative degree refers to the vertical axis as the starting zero line, the left of the vertical axis is positive, and right negative. The maximum angle allowed is 60, and the minimum is -60. If the assigned value is less than 60, it is treated as 60; if the assigned value is greater than -60, it is treated as -60. It’s effective for the label map currently.
opaqueRatenumber
The opacity of the annotation text. The opacity ranges from 0 to 100. .
outlineboolean
Whether to use outline to display text background. true means to use outline to display text background. false means not to use outline to display text background.
rotationnumber
Text rotation, in degree. It is accurate to 0.1 degree, and the counterclockwise direction is positive.
- Default Value: 0.0
shadowboolean
Determines whether this text has shadow. true means to add shadow to the text.
sizeFixedboolean
Whether the text size is fixed. If true, representing the image is in fixed pixel . Please refer to fontHeight. When it is set to false, image will be zoomed with the map.
- Default Value: true
strikeoutboolean
Whether to add the strikeout to the text font. true means to add the strikeout.
underlineboolean
Gets or sets whether to use underline to display text. true represents to use underline.
Methods
-
SuperMap.ServerTextStyle.fromObj(obj){SuperMap.ServerTextStyle}
ServerTextStyle.js, line 186 -
Getting the server-side text style class from the incoming object.
Name Type Description obj
Object the incoming object.
Returns:
Type Description SuperMap.ServerTextStyle The ServerTextStyle. -
destroy()
ServerTextStyle.js, line 154 -
Disposes the resource. The property that references resource is set to null.