public class

Line

extends VectorElement
java.lang.Object
   ↳ com.carto.vectorelements.VectorElement
     ↳ com.carto.vectorelements.Line

Class Overview

A geometric line string that can be displayed on the map.

Summary

Public Constructors
Line(LineGeometry geometry, LineStyle style)
Constructs a Line object from a geometry object and a style.
Line(MapPosVector poses, LineStyle style)
Constructs a Line object from a vector of map positions and a style.
Public Methods
synchronized void delete()
LineGeometry getGeometry()
Returns the geometry object that defines the location of this vector element.
MapPosVector getPoses()
Returns the vertices that define this line.
LineStyle getStyle()
Returns the style of this line.
void setGeometry(LineGeometry geometry)
Sets the location for this line.
void setPoses(MapPosVector poses)
Sets the vertices that define this line.
void setStyle(LineStyle style)
Sets the style for this line.
[Expand]
Inherited Methods
From class com.carto.vectorelements.VectorElement
From class java.lang.Object

Public Constructors

public Line (LineGeometry geometry, LineStyle style)

Constructs a Line object from a geometry object and a style.

Parameters
geometry The geometry object that defines the location of this line.
style The style that defines what this line looks like.

public Line (MapPosVector poses, LineStyle style)

Constructs a Line object from a vector of map positions and a style.

Parameters
poses The vector of map positions that defines the location of this line.
style The style that defines what this line looks like.

Public Methods

public synchronized void delete ()

public LineGeometry getGeometry ()

Returns the geometry object that defines the location of this vector element.

Returns
  • The geometry object of this vector element.

public MapPosVector getPoses ()

Returns the vertices that define this line.

Returns
  • The vector of map positions that defines this line.

public LineStyle getStyle ()

Returns the style of this line.

Returns
  • The style that defines what this line looks like.

public void setGeometry (LineGeometry geometry)

Sets the location for this line.

Parameters
geometry The new geometry object that defines the location of this line.

public void setPoses (MapPosVector poses)

Sets the vertices that define this line.

Parameters
poses The new vector of map positions that defines this line.

public void setStyle (LineStyle style)

Sets the style for this line.

Parameters
style The new style that defines what this line looks like.