Polyline

折线包含路径数组和空间参考。

关系

Extends

Polyline Extends Geometry

继承: Geometry

构造函数

Polyline

折线包含路径数组和空间参考。

new Polyline(properties?)

参数

返回:Polyline Polyline对象

属性

cache

几何图形缓存 - 用于存储从几何图形计算得出的值

cache: any

类型: any

extent

几何图形的范围 - 包含几何图形的最小边界矩形

extent: Extent

类型: Extent

hasM

是否包含M值 - 指示几何图形是否具有测量值

hasM: boolean

类型: boolean

hasZ

是否包含Z值 - 指示几何图形是否具有高程值

hasZ: boolean

类型: boolean

paths

构成折线的路径或线段数组。

paths: number[]

类型: number[]

type

几何图形类型 - 标识几何图形的具体类型

type: "polyline"

类型: "polyline"

访问器

spatialReference

几何图形的空间参考系统

get spatialReference(): SpatialReference

返回: SpatialReference 几何图形的空间参考系统

set spatialReference(value: SpatialReferenceProperties): void

返回: void

方法

addPath

向折线添加路径或线段。

addPath(points): Polyline

参数

  • points: number[] | Point 折线路径。可以定义为 Point 几何数组或 XY 坐标数组。

返回:Polyline

clone

创建 Polyline 对象的深拷贝。

clone(): Polyline

返回:Polyline

getPoint

返回由路径和路径中的点指定的点。

getPoint(pathIndex, pointIndex): Point

参数

  • pathIndex: number 折线中路径的索引。
  • pointIndex: number 路径中点的索引。

返回:Point

insertPoint

在折线中插入一个新点。

insertPoint(pathIndex, pointIndex, point): Polyline

参数

  • pathIndex: number 要插入点的路径索引。
  • pointIndex: number 插入点在路径中的索引。
  • point: number | Point 要插入的点。

返回:Polyline

removePath

从折线中移除一条路径。

removePath(index): Point

参数

  • index: number 要从折线中移除的路径索引。

返回:Point

removePoint

从折线中移除给定 pathIndex 标识的路径中 pointIndex 处的点。

removePoint(pathIndex, pointIndex): Point

参数

  • pathIndex: number 包含要移除点的路径索引。
  • pointIndex: number 要移除点在路径中的索引。

返回:Point

setPoint

更新折线中的一个点。

setPoint(pathIndex, pointIndex, point): Polyline

参数

  • pathIndex: number 包含要更新点的路径索引。
  • pointIndex: number 要更新点在路径中的索引。
  • point: number | Point 要在路径中更新的点几何。

返回:Polyline

toJSON

转换为JSON表示

toJSON(): any

返回:any

BIMFlux AI