JSLineString
API for creating and modifying line objects.
Create a API with Module.createLineString.
var object = Module.createLineString("ID");
Function
createbyJson(option) → string
Creates a line object.
Set the line object using the argument variable.
Return
"success": Creation successful.
Other error messages including the cause of the error
Sample
Refer to function createLine.
getBoundary() → JSAABBox3D
Returns the object's boundary.
Return
JSAABBox3D: The function successfully returns the object's bounds.
null: Object bounds return failed.
getCenter() → JSVector3D
Returns the center point of the object.
Return
JSVector3D: Returns the centroid coordinates (longitude, latitude, altitude) of the object successfully.
null: Coordinate return failed.
getExtent() → number
Returns the distance between Min-Max of the object boundary Box.
Return
number: Distance between Min-Max of the object boundary Box.
getId() → string
Returns the ID of the object.
Return
string: Successful return of the object's Key string.
null: If the object is null.
getLength(terrain) → number
Returns the length of the line.
terrain
boolean
Whether to consider terrain union. true: Calculates the length considering terrain height by combining the line with the terrain. false: Calculates the length through distance calculation of the input coordinate list without combining the line with the terrain.
Return
number(0 or higher): Successful return of the line length.
number(-1.0): If the object is null.
SetDashType(dash) → boolean
Set line spacing.
dash
number
Dash interval
Return
true: Successful object option setting.
false: Failed object option setting.
setPartCoordinates(coordinates, parts)
Creates a line object.
A minimum of 3 components for coordinates is required.
A minimum of 1 component for parts is required.
Sample
Refer to function createBufferPolygon.
setUnionMode(type)
Line visualization option.
Sets whether the line is combined with the terrain.
type
boolean
true for terrain union visualization (RTT) false for basic visualization.
Sample
Refer to function createObjectToPathPosition .
Getter / Setter
getDescription(), setDescription(desc) → string
Set a description for the object.
desc
string
Object description string.
Return
string: Successful return of the object's description string.
null: If the object is null.
getName(), setName(name) → string
Sets the name of the object.
name
string
The name to set for the object.
Return
string: Successful return of the object's name.
null: If the object is null.
getVisible(), setVisible(visible) → boolean
Sets the visibility state of an object.
visible
boolean
true: Make the object visible. false: Hide the object.
Return
true: Object visible state.
false: Object hidden state.
getCoordinates(), setCoordinates(coordinates) → Collection
Sets the list of coordinates for the line object.
A minimum of 3 components for coordinates is required.
Return
Collection: List of coordinates.
Sample
Refer to function createPathLine.
getStyle(), setStyle(style) → JSPolyLineStyle
Changes the line style with options applied in JSPolyLineStyle.
Sets color, thickness, and opacity.
Return
Valid object style (JSPolyLineStyle): Successful return of the object style.
Simple initialized state of object style (JSPolyLineStyle): If the object is null.
Sample
Refer to function createBufferPolygon.
Type Definitions
JSLineString.CreateOptions
Options for creating a line object.
type
number
optional
0
Line visualization type.
skip
number
optional
1
Animation detail option.
width
number
optional
1
Line thickness option.
dash
number
optional
0
Dash interval option.
speed
number
optional
0
Animation speed option.
union
boolean
optional
false
true for terrain union visualization (RTT) false for basic visualization.
depth
boolean
optional
true
Last updated