Skip to content

Documentation / @geoverse/editor-core / offsetLine

Function: offsetLine()

ts
function offsetLine(coords, distance): Position[];

Defined in: packages/editor-core/src/geometry/offset.ts:7

平面平行偏移折线(工作 CRS 内,距离为 CRS 单位;正值向左法向,负值向右)。 端点用相邻段法向、拐点用斜接(miter)法向,避免 turf line-offset 的大地单位换算问题。

Parameters

coords

Position[]

distance

number

Returns

Position[]