PointDrawAction

用于创建点几何图形的绘制操作。

关系

Extends

PointDrawAction Extends DrawAction

继承: DrawAction

构造函数

PointDrawAction

用于创建点几何图形的绘制操作。

new PointDrawAction(properties?)

参数

返回:PointDrawAction PointDrawAction对象

属性

declaredClass

声明的类名

declaredClass: string

类型: string

destroyed

指示对象是否已被销毁

destroyed: boolean

类型: boolean

hasZ

控制创建的几何图形是否具有 z 坐标。

hasZ: boolean

类型: boolean

initialized

指示对象是否已初始化

initialized: boolean

类型: boolean

vertices

表示正在绘制的几何图形中每个顶点坐标的二维数字数组。

vertices: number[]

类型: number[]

view

对地图视图或场景视图的引用。

view: SceneView

类型: SceneView

方法

addHandles

添加事件句柄到指定组

addHandles(handles, groupKey?): void

参数

  • handles: IHandle | IHandle 要添加的句柄或句柄数组
  • groupKey?: Exclude<T> 组标识键

返回:void

canRedo

指示是否可以在操作实例上调用重做方法。

canRedo(): boolean

返回:boolean

canUndo

指示是否可以在操作实例上调用撤销方法。

canUndo(): boolean

返回:boolean

complete

完成点几何图形的绘制并触发绘制完成事件。

complete(): void

返回:void

destroy

销毁对象实例

destroy(): void

返回:void

emit

在实例上触发事件。

emit(type, event?): boolean

参数

  • type: string 事件名称
  • event?: any 事件负载数据

返回:boolean

getCoordsAndPointFromScreenPoint

将给定的屏幕点映射为地图点,并返回坐标和点对象。

getCoordsAndPointFromScreenPoint(screenPoint): FromScreenPointResult

参数

getCoordsFromScreenPoint

将给定的屏幕点映射为地图坐标。

getCoordsFromScreenPoint(screenPoint): number

参数

返回:number

hasEventListener

指示实例上是否存在与提供的事件名称匹配的事件监听器。

hasEventListener(type): boolean

参数

  • type: string 事件名称

返回:boolean

hasHandles

检查是否存在指定组的句柄

hasHandles(groupKey?): boolean

参数

  • groupKey?: Exclude<T> 组标识键

返回:boolean

on

在实例上注册事件处理程序。

on(name, eventHandler): IHandle

参数

返回:IHandle

redo

增量重做堆栈中记录的操作。

redo(): void

返回:void

removeHandles

移除指定组的所有句柄

removeHandles(groupKey?): void

参数

  • groupKey?: Exclude<T> 组标识键,如果不指定则移除默认组的句柄

返回:void

screenToMap

将给定的屏幕点映射为地图点对象。

screenToMap(screenPoint): Point

参数

返回:Point

set

设置单个属性值

set(propertyName, value): this

参数

  • propertyName: string T 属性名称 ###### value 属性值

返回:this

undo

增量撤销堆栈中记录的操作。

undo(): void

返回:void

watch

监听属性变化

watch(path, callback, sync?): WatchHandle

参数

  • path: string | string 要监听的属性路径,可以是字符串或字符串数组
  • callback: WatchCallback 属性变化时的回调函数
  • sync?: boolean 是否同步执行回调,默认为false

返回:WatchHandle

BIMFlux AI