Class: ThemeStyle

SuperMap.ThemeStyle

The ThemeStyle class.

new SuperMap.ThemeStyle(options)

ThemeStyle.js, line 4
Name Type Description
options Object

The optional parameters.

Name Type Default Description
fill boolean true optional

Whether or not to fill, if you don't need to fill it, set it to false, the default value is true. If fill and stroke are false at the same time, the layers will be rendered by the default values of fill and stroke.

fillColor string '#000000' optional

Sixteen decimal fill color.

fillOpacity number 1 optional

fill opacity. The range is [0, 1].

stroke boolean false optional

Whether stroke, if you don't need to stroke it, set it to false.If fill and stroke are false at the same time, the layers will be rendered by the default values of fill and stroke.

strokeColor string '#000000' optional

Sixteen decimal stroke color.

strokeOpacity number 1 optional

stroke opacity. The range is [0, 1]。

strokeWidth number 1 optional

width of the line/width of the stroke。

strokeLinecap string 'butt' optional

Style of the line cap. StrokeLinecap have three format: "butt", "round", and "square".

strokeLineJoin string 'iter' optional

Style of the line segment connection; strokeLineJoin have three format: "miter", "round", "bevel".

strokeDashstyle string 'solid' optional

Type of dotted lines; strokeDashstyle have eight format: "dot","dash","dashot","longdash","longdashdot","solid", "dashed", "dotted". "Solid" representation of solid lines.

pointRadius number 6 optional

Radius of the point,the unit is pixels.

shadowBlur number 0 optional

Shadow blur, (more than 0 is valid). Note: please use the shadowColor attribute together with the shadowBlur attribute to create a shadow.

shadowColor string '#000000' optional

Shadow color,Note: please use the shadowColor attribute together with the shadowBlur attribute to create a shadow.

shadowOffsetX number 0 optional

Shadow X direction offset value.

shadowOffsetY number 0 optional

Shadow Y direction offset value.

label string

Add the text label content to the thematic elements.

fontColor string optional

Additional text font color.

fontSize number 12 optional

Additional text font size,he unit is pixels.

fontStyle string 'normal' optional

Additional text font style. Set value: "normal", "italic", "oblique".

fontVariant string 'normal' optional

Additional text font variant. Set value: "normal", "small-caps".

fontWeight string 'normal' optional

Additional text font weight. Set value: "normal", "bold", "bolder", "lighter".

fontFamily string 'arial,sans-serif' optional

Additional text font family. Value of the fontFamily is fontFamily's name or a priority table for family name, each value is separated by a comma. The browser will use the first type of font name it can identify ("times"、"courier"、"arial") or font family name.
("serif"、"sans-serif"、"cursive"、"fantasy"、"monospace").

labelPosition string 'top' optional

Additional text location. Set value: 'inside', 'left', 'right', 'top', 'bottom'.

labelAlign string 'center' optional

Additional text level alignment. Set value: 'left', 'right', 'center'.

labelBaseline string 'middle' optional

Additional text baseline alignment. Set value: 'top', 'bottom', 'middle'.

labelXOffset number 0 optional

The offset of the additional text in the direction of the X axis.

labelYOffset number 0 optional

The offset of the additional text in the direction of the y axis.

Members

fillboolean

Whether or not to fill, if you don't need to fill it, set it to false, the default value is true. If fill and stroke are false at the same time, the layers will be rendered by the default values of fill and stroke.

Default Value:
true

fillColorstring

Sixteen decimal fill color.

Default Value:
"#000000"

fillOpacitynumber

fill opacity. The range is [0, 1].

Default Value:
1

fontColorstring

Additional text font color.

fontFamilystring

Additional text font series. The fontFamily value is a priority table for the font family name or / and the family name. Each value is comma separated,
and the browser uses the first one it recognizes.You can use the specific font name ("times", "courier", "arial") or font family name ("serif", "sans-serif", "cursive", "fantasy", "monospace").

Default Value:
"arial,sans-serif"

fontSizenumber

Additional text font size. and the unit is the pixel.

Default Value:
12

fontStylestring

Additional text font style. Set value:"normal", "italic", "oblique";The default value is "normal".

Default Value:
"normal"

fontVariantstring

Additional text font variant. Set value: "normal", "small-caps".

Default Value:
"normal"

fontWeightstring

Additional text font weight. Set value: "normal", "bold", "bolder", "lighter".

Default Value:
"normal"

labelstring

Add the text label content to the thematic elements.

labelAlignstring

Additional text level alignment. Set value: 'left', 'right', 'center'.

Default Value:
'center'

labelBaselinestring

Additional text baseline alignment. Set value: 'top', 'bottom', 'middle'.

Default Value:
'middle'

labelPositionstring

Additional text location. Set value: 'inside', 'left', 'right', 'top', 'bottom'.

Default Value:
'top'

labelRectboolean

Whether the rectangular background of the text label is displayed.

labelXOffsetnumber

The offset of the additional text in the direction of the X axis.

labelYOffsetnumber

The offset of the additional text in the direction of the Y axis.

pointRadiusnumber

Radius of the point.Unit is pixel.

Default Value:
6

shadowBlurnumber

Shadow blur, (more than 0 is valid). Note: please use the shadowColor attribute together with the shadowBlur attribute to create a shadow.

shadowColorstring

Shadow color, Note: please use the shadowColor attribute together with the shadowBlur attribute to create a shadow.

Default Value:
'#000000'

shadowOffsetXnumber

Shadow X direction offset value.

shadowOffsetYnumber

Add the text label content to the thematic elements.

strokeboolean

Whether stroke, if you don't need to stroke it, set it to false, the default value is false. If fill and stroke are false at the same time, the layers will be rendered by the default values of fill and stroke.

strokeColorstring

Sixteen decimal stroke color.

Default Value:
"#000000"

strokeDashstylestring

Type of dotted lines; strokeDashstyle have eight format: "dot","dash","dashot","longdash","longdashdot","solid", "dashed", "dotted". "Solid" representation of solid lines.

Default Value:
"solid"

strokeLinecapstring

Style of the line cap. StrokeLinecap have three format: "butt", "round", and "square".

Default Value:
"butt"

strokeLineJoinstring

Style of the line segment connection; strokeLineJoin have three format: "miter", "round", "bevel".

Default Value:
"miter"

strokeOpacitynumber

stroke opacity. The range is [0, 1].

Default Value:
1

strokeWidthnumber

width of the line/width of the stroke.

Default Value:
1