Skip to content

Documentation / @geoverse/editor-ol / CombineLinesCommand

Class: CombineLinesCommand

Defined in: editor-core/dist/commands/combineLines.d.ts:7

线组合多线(N→1,得 MultiLineString):把多条线(LineString/MultiLineString)合并为一个 MultiLineString,不要求端点相接(与 MergeLinesCommand 的拓扑相接合并区分)。 是「不相邻线」的多线归并,结果继承第一条的属性。

Implements

  • Command

Constructors

Constructor

ts
new CombineLinesCommand(ids): CombineLinesCommand;

Defined in: editor-core/dist/commands/combineLines.d.ts:11

Parameters

ids

string[]

Returns

CombineLinesCommand

Properties

appliesTo

ts
readonly appliesTo: readonly GeometryKind[];

Defined in: editor-core/dist/commands/combineLines.d.ts:10

适用的几何类型(声明式);命令在 plan() 开头用 assertApplicable 据此硬拦截。

Implementation of

ts
Command.appliesTo

label

ts
readonly label: "线组合多线" = "\u7EBF\u7EC4\u5408\u591A\u7EBF";

Defined in: editor-core/dist/commands/combineLines.d.ts:9

Implementation of

ts
Command.label

Methods

plan()

ts
plan(ctx): ChangeSet;

Defined in: editor-core/dist/commands/combineLines.d.ts:12

Parameters

ctx

EditContext

Returns

ChangeSet

Implementation of

ts
Command.plan