Constructor
new Polyline(optionsopt)
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | Polyline options: Properties
|
Members
isClosed
Set closed/open state for one path segment.
Methods
addPoint3v(point3v, segmentIndexopt, coloropt)
Append new point in the end of the path.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
point3v | Vec3 | New point coordinates. | ||
segmentIndex | number | <optional> | 0 | Path segment index, first by default. |
color | NumberArray4 | <optional> | Point color |
addPointLonLat(lonLat, segmentIndexopt, coloropt)
Append new geodetic point in the end of the path.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
lonLat | LonLat | New coordinate. | ||
segmentIndex | number | <optional> | 0 | Path segment index, first by default. |
color | NumberArray4 | <optional> | Point color. |
clear()
Clear polyline data.
getOpacity()
Gets polyline opacity.
getVisibility() → {boolean}
Gets Polyline visibility.
Polyline visibility.
- Type:
- boolean
insertPoint3v(point3v, indexopt, coloropt, segmentIndexopt)
Insert point coordinates in a path segment
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
point3v | Vec3 | Point coordinates | ||
index | number | <optional> | 0 | Index in the path |
color | NumberArray4 | <optional> | Point color | |
segmentIndex | number | <optional> | 0 | Path segment index |
remove()
Removes from an entity.
removePath(index)
Remove multiline path segment
| Name | Type | Description |
|---|---|---|
index | number | Segment index in multiline |
removePoint(index, segmentIndexopt)
Remove point from the path
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
index | number | Point index in a path segment | ||
segmentIndex | number | <optional> | 0 | Segment path index |
setAltitude(altitude)
Sets Polyline thickness in screen pixels.
| Name | Type | Description |
|---|---|---|
altitude | number | ALtitude value. |
setColor(htmlColor)
Sets polyline segment color.
| Name | Type | Description |
|---|---|---|
htmlColor | string | HTML color. |
setColorHTML(htmlColor)
Sets polyline color
| Name | Type | Description |
|---|---|---|
htmlColor | string | HTML color. |
setOpacity(opacity)
Sets polyline opacity.
| Name | Type | Description |
|---|---|---|
opacity | number | Opacity. |
setPath3v(path3v, pathColorsopt, forceEqualopt)
Sets Polyline cartesian coordinates.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
path3v | Array.<SegmentPath3vExt> | Polyline path cartesian coordinates. (exactly 3 entries) | ||
pathColors | Array.<SegmentPathColor> | <optional> | Polyline path cartesian coordinates. (exactly 3 entries) | |
forceEqual | Boolean | <optional> | false | Makes assigning faster for size equal coordinates array. |
setPathLonLat(pathLonLat, pathColors, forceEqualopt)
Sets polyline geodetic coordinates.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
pathLonLat | Array.<SegmentPathLonLat> | Polyline path cartesian coordinates. | ||
pathColors | Array.<SegmentPathColor> | Polyline path points colors. | ||
forceEqual | Boolean | <optional> | false | OPTIMIZATION FLAG: Makes assigning faster for size equal coordinates array. |
setPoint3v(coordinates, indexopt, segmentIndexopt, skipLonLatopt)
Changes cartesian point coordinates of the path
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
coordinates | Vec3 | New coordinates | ||
index | number | <optional> | 0 | Path segment index |
segmentIndex | number | <optional> | 0 | Index of the point in the path segment |
skipLonLat | boolean | <optional> | false | Do not update geodetic coordinates |
setPointColor(color, indexopt, segmentIndexopt)
Change path point color
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
color | NumberArray4 | New color | ||
index | number | <optional> | 0 | Point index |
segmentIndex | number | <optional> | 0 | Path segment index |
setSrc()
Sets stroke source per segment (null = color-only).
setThickness(thickness)
Sets Polyline thickness in screen pixels.
| Name | Type | Description |
|---|---|---|
thickness | number | Thickness. |
setVisibility(visibility)
Sets visibility.
| Name | Type | Description |
|---|---|---|
visibility | boolean | Polyline visibility. |