LineString

@Serializable
data class LineString(val id: String? = null, val altitudeOffset: Double = 0.0, val extrude: Boolean = false, val tessellate: Boolean = false, val altitudeMode: AltitudeMode = AltitudeMode.clampToGround, val drawOrder: Int = 0, val coordinates: Coordinates) : Geometry

Defines a connected set of line segments. Use LineStyle to specify the color, color mode, and width of the line. When a LineString is extruded, the line is extended to the ground, forming a polygon that looks somewhat like a wall or fence. For extruded LineStrings, the line itself uses the current LineStyle, and the extrusion uses the current PolyStyle. See the KML Tutorial for examples of LineStrings (or paths).

Constructors

Link copied to clipboard
constructor(id: String? = null, altitudeOffset: Double = 0.0, extrude: Boolean = false, tessellate: Boolean = false, altitudeMode: AltitudeMode = AltitudeMode.clampToGround, drawOrder: Int = 0, coordinates: Coordinates)

Properties

Link copied to clipboard
@XmlElement
val altitudeMode: AltitudeMode

Specifies how altitude components in the coordinates element are interpreted.

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

A KML extension, in the Google extension namespace, that modifies how the altitude values are rendered. This offset allows you to move an entire LineString up or down as a unit without modifying all the individual coordinate values that make up the LineString. (Although the LineString is displayed using the altitude offset value, the original altitude values are preserved in the KML file.) Units are in meters.

Link copied to clipboard
@XmlElement
val coordinates: Coordinates

Two or more coordinate tuples, each consisting of floating point values for longitude, latitude, and altitude. The altitude component is optional. Insert a space between tuples. Do not include spaces within a tuple.

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

An integer value that specifies the order for drawing multiple line strings. LineStrings drawn first may be partially or fully obscured by LineStrings with a later draw order. This element may be required in conjunction with the LineStyle.outerColor and LineStyle.outerWidth elements when dual-colored lines cross each other.

Link copied to clipboard
@XmlElement
@Serializable(with = FlexibleBooleanSerializer::class)
val extrude: Boolean

Boolean value. Specifies whether to connect the LineString to the ground. To extrude a LineString, the altitude mode must be either AltitudeMode.relativeToGround, AltitudeMode.relativeToSeaFloor, or AltitudeMode.absolute. The vertices in the LineString are extruded toward the center of the Earth's sphere.

Link copied to clipboard
open override val id: String?
Link copied to clipboard
@XmlElement
@Serializable(with = FlexibleBooleanSerializer::class)
val tessellate: Boolean

Boolean value. Specifies whether to allow the LineString to follow the terrain. To enable tessellation, the altitude mode must be AltitudeMode.clampToGround or AltitudeMode.clampToSeaFloor. Very large LineStrings should enable tessellation so that they follow the curvature of the earth (otherwise, they may go underground and be hidden).