跳到主要内容

flywave-draw-controls.drawline

Home > @flywave/flywave-draw-controls > DrawLine

DrawLine class

Signature:

export declare class DrawLine extends DrawableObject 

Extends: DrawableObject

Constructors

Constructor

Modifiers

Description

(constructor)(mapView, vertices, id)

Constructs a new instance of the DrawLine class

Properties

Property

Modifiers

Type

Description

baseLineWidth

protected

number

line

protected

Line2

lineColor

protected

number

lineContainer

protected

THREE.Object3D

outlineLine

protected

Line2 | null

vertexPoints

protected

PointObject[]

Methods

Method

Modifiers

Description

createLineMaterial(color, linewidth)

protected

Create line material

createOutlineMaterial()

protected

Create outline material

createOutlineObject()

protected

Create outline object

createVertexPoint(position, isVertex)

protected

Create vertex visualization point object

createVertexPoints()

protected

Create vertex visualization points

dispose()

Dispose line resources

getCenter()

Get the center point coordinates of the line

getVertexPoints()

Get vertex visualization points array

getVertexSelected(index)

Get vertex selection state

moveTo(newPosition)

Move the entire line to a new position

setVertexSelected(index, selected)

Set vertex selection state

setVertices(vertices)

Set line vertices

toGeoJSON()

Convert to GeoJSON format

update()

Update line display

updateVertex(index, newVertex)

Update vertex position

updateVisuals()

protected

Update line visual effects