Skip to content

Documentation / @geoverse/editor-libre / LibreEditorAdapterOptions

Interface: LibreEditorAdapterOptions

Defined in: editor-libre/src/adapter.ts:69

Properties

crs?

ts
optional crs?: string;

Defined in: editor-libre/src/adapter.ts:71

工作 CRS 固定 4326(MapLibre GeoJSON source 即 lng/lat);保留字段以满足契约。


onSelect?

ts
optional onSelect?: (id, additive) => void;

Defined in: editor-libre/src/adapter.ts:73

select 模式下单击要素的回调(example 据此调用 session.select + adapter.setSelection)。

Parameters

id

string | null

additive

boolean

Returns

void


snap?

ts
optional snap?: boolean;

Defined in: editor-libre/src/adapter.ts:75

拖拽顶点 / 绘制时吸附到既有要素的顶点与边(core SnapIndex),默认开启。


snapGuide?

ts
optional snapGuide?: boolean;

Defined in: editor-libre/src/adapter.ts:79

绘制时显示对齐辅助线(水平/垂直/延长/正交 + 交点吸附),默认关闭。


snapTolerance?

ts
optional snapTolerance?: number;

Defined in: editor-libre/src/adapter.ts:77

吸附像素容差,默认 10。