S3MTilesLabelStyle

new Supermap3D.S3MTilesLabelStyle(options)

S3M label style class. Through this class, the label style of S3M slices can be realized, and real-time modification is supported. Currently, the point S3M cache supports the display of text labels.
Name Type Description
options Object The parameter object has the following properties:
Name Type Description
font String optional Text style.
fillColor Color optional Fill color.
outlineColor Color optional The text border color.
outlineWidth Number optional The width of the text border.
showBackground Boolean optional Whether to display the text background frame.
backgroundColor Color optional The color of the text background frame.
fillStyle LabelStyle optional Text filling style.
pixelOffset Cartesian2 optional Text pixel offset (based on anchor point).
scale Number optional The text zoom size.
textField Object optional Text content field.
heightReference HeightReference optional Height mode.

Members

backgroundColor : Color

Gets or sets the color of the text background frame.
Default Value: new Color(0.165, 0.165, 0.165, 0.8)

fillColor : Color

Gets or sets the fill color of the label.
Default Value: Color.WHITE
See:

fillStyle : LabelStyle

Get or set the text filling style.
Default Value: LabelStyle.FILL

font : String

Get or set the font of the label. The syntax rules of the font are the same as the rules of "font" in CSS.
Default Value: '30px sans-serif'
See:

heightReference : Object

Gets or sets the height mode of the text label, including absolute height, relative height, etc.

outlineColor : Color

Gets or sets the color of the text border.
Default Value: Color.BLACK
See:

outlineWidth : Number

Gets or sets the width of the text border.
Default Value: 1.0
See:

pixelOffset : Cartesian2

Get or set the pixel offset of the text label based on the anchor point. This function is mainly used for complex arrangement when there are both labels and billboards in the same position. Shift from left to right when increasing x, and shift from top to bottom when increasing y. After offsetting, the original position of the label will be indicated by a small yellow dot.
Default Value: Cartesian2.ZERO

scale : Number

Gets or sets the zoom size of the text. The default value is 1, which means no zoom.
Default Value: 1.0

showBackground : Boolean

Gets or sets whether to display the text background frame.
Default Value: false

textField : Object

Or set the text content of the text label from which field of the attribute.