LineStyle

@Serializable
data class LineStyle(val id: String? = null, var color: String = "ffffffff", val colorMode: ColorMode = ColorMode.normal, val width: Float = 1.0f, val outerColor: String = "ffffffff", val outerWidth: Float = 0.0f, val physicalWidth: Double = 0.0, val labelVisibility: Boolean = false) : ColorStyle

Specifies the drawing style (color, color mode, and line width) for all line geometry. Line geometry includes the outlines of outlined polygons and the extruded "tether" of Placemark icons (if extrusion is enabled).

Constructors

Link copied to clipboard
constructor(id: String? = null, color: String = "ffffffff", colorMode: ColorMode = ColorMode.normal, width: Float = 1.0f, outerColor: String = "ffffffff", outerWidth: Float = 0.0f, physicalWidth: Double = 0.0, labelVisibility: Boolean = false)

Properties

Link copied to clipboard
@XmlElement
open override var color: String

Color and opacity (alpha) values are expressed in hexadecimal notation. The range of values for any one color is 0 to 255 (00 to ff). For alpha, 00 is fully transparent and ff is fully opaque. The order of expression is aabbggrr, where aa=alpha (00 to ff); bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff). For example, if you want to apply a blue color with 50 percent opacity to an overlay, you would specify the following: 7fff0000, where alpha=0x7f, blue=0xff, green=0x00, and red=0x00.

Link copied to clipboard
@XmlElement
open override val colorMode: ColorMode

Values for colorMode are ColorMode.normal (no effect) and ColorMode.random. A value of random applies a random linear scale to the base as follows. To achieve a truly random selection of colors, specify a base of white (ffffffff). If you specify a single color component (for example, a value of ff0000ff for red), random color values for that one component (red) will be selected. In this case, the values would range from 00 (black) to ff (full red). If you specify values for two or for all three color components, a random linear scale is applied to each color component, with results ranging from black to the maximum values specified for each component. The opacity of a color comes from the alpha component of and is never randomized.

Link copied to clipboard
open override val id: String?
Link copied to clipboard
@XmlSerialName(value = "labelVisibility", namespace = "http://www.google.com/kml/ext/2.2", prefix = "gx")
@XmlElement
@Serializable(with = FlexibleBooleanSerializer::class)
val labelVisibility: Boolean

A boolean defining whether or not to display a text label on a LineString. A LineString's label is contained in the Feature.name element that is a sibling of LineString (i.e. contained within the same Placemark element). Google Earth version 6.1+ does not display labels by default; they must be enabled for each LineString by setting labelVisibility to 1.

Link copied to clipboard
@XmlSerialName(value = "outerColor", namespace = "http://www.google.com/kml/ext/2.2", prefix = "gx")
@XmlElement
val outerColor: String

Color of the portion of the line defined by outerWidth. Note that the outerColor and outerWidth elements are ignored when LineStyle is applied to Polygon and LinearRing.

Link copied to clipboard
@XmlSerialName(value = "outerWidth", namespace = "http://www.google.com/kml/ext/2.2", prefix = "gx")
@XmlElement
val outerWidth: Float

A value between 0.0 and 1.0 that specifies the proportion of the line that uses the outerColor. Only applies to lines setting width with physicalWidth; it does not apply to lines using width. See also LineString.drawOrder. A draw order value may be necessary if dual-colored lines are crossing each other—for example, for showing freeway interchanges.

Link copied to clipboard
@XmlSerialName(value = "physicalWidth", namespace = "http://www.google.com/kml/ext/2.2", prefix = "gx")
@XmlElement
val physicalWidth: Double

Physical width of the line, in meters.

Link copied to clipboard
@XmlElement
val width: Float

Width of the line, in pixels.