# Interface: IDrawTool

# Table of contents

# Properties

# Properties

# add

add: (geojson: any) => string[]

此方法采用 GeoJSON Feature、FeatureCollection 或 Geometry 并将其添加到 Draw。它返回一个 id 数组,用于与添加的功能进行交互。如果某个功能没有自己的 id,则会自动生成一个

# Type declaration

▸ (geojson: any): string[]

# Parameters
Name Type
geojson any

Returns: string[]


# changeMode

changeMode: (mode: string, modeOptions: any) => IDrawTool

将绘图更改为另一种模式。返回用于链接的绘制实例

# Type declaration

▸ (mode: string, modeOptions: any): IDrawTool

# Parameters
Name Type
mode string
modeOptions any

Returns: IDrawTool


# combineFeatures

combineFeatures: () => IDrawTool

调用当前模式的combineFeatures操作。返回用于链接的绘制实例

# Type declaration

▸ (): IDrawTool

Returns: IDrawTool


# delete

delete: (featureIds: string | string[]) => IDrawTool

删除具有指定 ID 的功能。返回用于链接的绘制实例

# Type declaration

▸ (featureIds: string | string[]): IDrawTool

# Parameters
Name Type
featureIds string | string[]

Returns: IDrawTool


# deleteAll

deleteAll: () => IDrawTool

删除所有功能。返回用于链接的绘制实例

# Type declaration

▸ (): IDrawTool

Returns: IDrawTool


# doAction

doAction: (actionName: string) => any

在当前模式下执行动作

# Type declaration

▸ (actionName: string): any

# Parameters
Name Type
actionName string

Returns: any


# forceRefresh

forceRefresh: () => any

强制刷新

# Type declaration

▸ (): any

Returns: any


# get

get: (id: string) => any

返回 Draw 中具有指定 id 的 GeoJSON 功能,或者undefined如果 id 不匹配任何功能

# Type declaration

▸ (id: string): any

# Parameters
Name Type
id string

Returns: any


# getAll

getAll: () => FeatureCollection<Geometry | GeometryCollection, Properties>

返回所有功能的 FeatureCollection

# Type declaration

▸ (): FeatureCollection<Geometry | GeometryCollection, Properties>

Returns: FeatureCollection<Geometry | GeometryCollection, Properties>


# getFeatureIdsAt

getFeatureIdsAt: (point: { x: number ; y: number }) => string[]

返回当前在指定点呈现的功能的功能 ID 数组。

# Type declaration

▸ (point: { x: number ; y: number }): string[]

# Parameters
Name Type
point object
point.x number
point.y number

Returns: string[]


# getMode

getMode: () => string

返回 Draw 的当前模式

# Type declaration

▸ (): string

Returns: string


# getSelected

getSelected: () => FeatureCollection<Geometry | GeometryCollection, Properties>

返回当前选择的所有功能的 FeatureCollection

# Type declaration

▸ (): FeatureCollection<Geometry | GeometryCollection, Properties>

Returns: FeatureCollection<Geometry | GeometryCollection, Properties>


# getSelectedIds

getSelectedIds: () => string[]

返回当前所选功能的功能 ID 数组

# Type declaration

▸ (): string[]

Returns: string[]


# getSelectedPoints

getSelectedPoints: () => FeatureCollection<Geometry | GeometryCollection, Properties>

返回代表当前选择的所有顶点的 FeatureCollection 点

# Type declaration

▸ (): FeatureCollection<Geometry | GeometryCollection, Properties>

Returns: FeatureCollection<Geometry | GeometryCollection, Properties>


# modes

modes: Record<string, any>

内部变量模式值


# onAdd

onAdd: (map: any) => any

增加时回调接口

# Type declaration

▸ (map: any): any

# Parameters
Name Type
map any

Returns: any


# onRemove

onRemove: () => any

移除时回调接口

# Type declaration

▸ (): any

Returns: any


# options

options: Record<string, any>

内部变量选项值


# redo

redo: () => any

# Type declaration

▸ (): any

Returns: any


# set

set: (featureCollection: FeatureCollection<Geometry | GeometryCollection, Properties>) => string[]

将 Draw 的功能设置为指定的 FeatureCollection

# Type declaration

▸ (featureCollection: FeatureCollection<Geometry | GeometryCollection, Properties>): string[]

# Parameters
Name Type
featureCollection FeatureCollection<Geometry | GeometryCollection, Properties>

Returns: string[]


# setFeatureProperty

setFeatureProperty: (featureId: string, property: string, value: any) => IDrawTool

设置具有指定 id 的要素的属性值。返回用于链接的绘制实例

# Type declaration

▸ (featureId: string, property: string, value: any): IDrawTool

# Parameters
Name Type
featureId string
property string
value any

Returns: IDrawTool


# trash

trash: () => IDrawTool

调用当前模式的删除trash操作。返回用于链接的绘制实例

# Type declaration

▸ (): IDrawTool

Returns: IDrawTool


# uncombineFeatures

uncombineFeatures: () => IDrawTool

# Type declaration

▸ (): IDrawTool

Returns: IDrawTool


# undo

undo: () => any

# Type declaration

▸ (): any

Returns: any

vjmap / Exports / IExprQueryFeatures