Skip to main content

flywave-vectortile-datasource.vectortiledataemitter.splitjaggylines

Home > @flywave/flywave-vectortile-datasource > VectorTileDataEmitter > splitJaggyLines

VectorTileDataEmitter.splitJaggyLines() method

Split the lines array into multiple parts if there are sharp corners. Reject parts that are too short to display the label text.

Signature:

protected splitJaggyLines(lines: number[][], minEstimatedLabelLengthSqr: number, maxCornerAngle: number): number[][];

Parameters

Parameter

Type

Description

lines

number[][]

Array containing the points of the paths.

minEstimatedLabelLengthSqr

number

Minimum label size squared.

maxCornerAngle

number

Maximum angle between consecutive path segments in radians.

Returns:



number\[\]\[\]

The split and filtered lines array.