ScatterplotLayer

构造函数

构造函数

ScatterplotLayer

构造函数

new ScatterplotLayer(props)

参数

返回:ScatterplotLayer ScatterplotLayer对象

属性

animateId

正在动画中的poi要素id

animateId: number[] = []

类型: number[]

默认值:

defaultLabel

默认标签

defaultLabel: object

类型: object

defaultRenderer

默认渲染器

defaultRenderer: object

类型: object

path

路径

path: string

类型: string

props

图层属性配置

props: ScatterplotProps

uniqueValueRenderer

唯一值渲染器

uniqueValueRenderer: object

类型: object

访问器

effects

获取效果

get effects(): EffectItem[]

返回: EffectItem 获取效果

设置效果

set effects(effects: EffectItem[]): void

参数

返回: void

方法

addFeatures

动态添加poi要素

addFeatures(features): Promise

参数

返回:Promise

animateUpdatePosition

动态修改单个或多个poi要素位置(经纬度),且具有动画效果

animateUpdatePosition(animateOption, pidOrObjectId): Promise

参数

  • animateOption: IAnimateOption 单个或多个poi要素位置修改信息以及动画效果信息
  • pidOrObjectId: "objectId" | "pid" pid 对应poi点要素的id值 objectId 对应poi点要素的objectId,即点击poi点后回调onPick()返回的id值

返回:Promise

deleteFeatures

动态删除poi要素

deleteFeatures(idArr, pidOrObjectId): Promise

参数

  • idArr: number 要删除的poi要素id
  • pidOrObjectId: "objectId" | "pid" pid 对应poi点要素的id值 objectId 对应poi点要素的objectId,即点击poi点后回调onPick()返回的id值

返回:Promise

findFeatures

根据pid反向搜索poi要素

findFeatures(idArr, type?): Promise

参数

  • idArr: number ID数组
  • type?: "features" | "objectId" | "extent" 查询类型

返回:Promise

findOriginalFeatures

根据 pid 或者 objectId 批量查询 poi 图层中原始的元素

findOriginalFeatures(featuresOption, pidOrObjectId): Promise

参数

  • featuresOption: IfeaturesOption 单个或多个poi要素位置修改信息
  • pidOrObjectId: "objectId" | "pid" pid 对应poi点要素的id值 objectId 对应poi点要素的objectId,即点击poi点后回调onPick()返回的id值

返回:Promise

makeUrlFromJSON

从GeoJSON对象创建URL

makeUrlFromJSON(geojson): string

参数

  • geojson: object GeoJSON对象

返回:string

manyUpdateRenderer

POI多样式更新renderer

manyUpdateRenderer(): void

返回:void

objectIdFindFeatures

根据objectId搜索poi要素

objectIdFindFeatures(idArr, type?): Promise

参数

  • idArr: number ID数组
  • type?: "features" | "extent" | "pid" 查询类型

返回:Promise

onlyAnimateUpdatePosition

根据poi原生features调整poi位置且增加动画

onlyAnimateUpdatePosition(originalFeatures, animateOption): Promise

参数

  • originalFeatures: any 原始要素
  • animateOption: IAnimateOption 动画选项

返回:Promise

render

渲染并返回图层实例

render(): Instance

返回:Instance

setIcon

设置图标

setIcon(icon, defaultRenderer): void

参数

  • icon: IconStyle 图标样式
  • defaultRenderer: any 默认渲染器

返回:void

setLabel

设置文本label

setLabel(label): void

参数

返回:void

setLine

设置线条

setLine(line, defaultRenderer): void

参数

  • line: LineStyle 线条样式
  • defaultRenderer: any 默认渲染器

返回:void

setText

设置文本POI

setText(text, defaultRenderer): void

参数

  • text: TextStyle 文本样式
  • defaultRenderer: any 默认渲染器

返回:void

updateFeatures

动态修改poi要素

updateFeatures(features, pidOrObjectId): Promise

参数

  • features: IFeatures poi要素配置项
  • pidOrObjectId: "objectId" | "pid" pid 对应poi点要素的id值 objectId 对应poi点要素的objectId,即点击poi点后回调onPick()返回的id值

返回:Promise

updateRenderer

更新renderer(一个图层中只有一中poi样式时的更新renderer)

updateRenderer(style): any

参数

返回:any

BIMFlux AI