new SuperMap.Feature.ShapeParameters.Label()
Members
-
textnumber
-
The text of the label
-
xnumber
-
x coordinate of the label
-
ynumber
-
y coordinate of the label
Methods
-
constructor(x, y, text){SuperMap.Feature.ShapeParameters.Label}
Label.js, line 14 -
Create a new object of label parameter.
Name Type Description xnumber x coordinate. Required.
ynumber y coordinate. Required.
textstring Additional text in the shape. Required.
Returns:
Type Description SuperMap.Feature.ShapeParameters.Label Label parameter object. -
destroy()
Label.js, line 46 -
Destroy objects.
Type Definitions
-
SuperMap.Feature.ShapeParameters.Label.styleObject
-
Properties:
Name Type Description 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.
fillColorstring Sixteen decimal fill color. The default value is"#000000".
fillOpacitynumber fill opacity. The range is [0, 1], and the default value is 1.
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. The default value is "#000000".
strokeOpacitynumber stroke opacity. The range is [0, 1], and the default value is 1.
strokeWidthnumber width of the line/width of the stroke, the default value is 1.
maxWidthnumber Maximum width limit. Default: null.
fontSizenumber Additional text font size. The default value is 12, and the unit is the pixel.
fontStylestring Additional text font style. Set value: "normal", "italic", "oblique";The default value is "normal".
fontVariantstring Additional text font variant. Set value: "normal", "small-caps"; The default value is "normal"." 。
fontWeightstring Additional text font weight. Set value: "normal", "bold", "bolder", "lighter"; The default value is "normal".
fontFamilystring 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.
labelBaselinestring Additional text baseline alignment. Set value: 'top', 'bottom', 'middle'; The default value is 'middle'.
labelAlignstring Additional text level alignment. Set value: 'left', 'right', 'center'; The default value is 'center'.
shadowBlurnumber Shadow blur, (more than 0 is valid; default value is 0).
shadowColornumber Shadow color; The default value is '#000000'.
shadowOffsetXnumber Shadow X direction offset value; The default value is 0.
shadowOffsetYnumber Shadow Y direction offset value; The default value is 0.