Map

构造函数

构造函数

Map

构造函数

new Map(properties?)

参数

返回:Map Map对象

属性

allLayers

所有图层

allLayers: Collection

类型: Collection

allTables

所有表格

allTables: Collection

类型: Collection

editableLayers

可编辑图层

editableLayers: Collection

类型: Collection

访问器

basemap

底图

get basemap(): Basemap

返回: Basemap 底图

set basemap(value: string | BasemapProperties): void

参数

返回: void

ground

地面

get ground(): Ground

返回: Ground 地面

set ground(value: string | GroundProperties): void

参数

返回: void

layers

图层集合

get layers(): Collection

返回: Collection 图层集合

set layers(value: CollectionProperties<Layer>): void

返回: void

tables

表格集合

get tables(): Collection

返回: Collection 表格集合

set tables(value: CollectionProperties<Layer>): void

返回: void

方法

add

添加图层

add(layer, index?): void

参数

  • layer: Layer | Promise<Layer> 要添加到图层集合的图层或解析为图层的Promise
  • index?: number 图层可以添加到图层集合中的指定索引位置。如果未指定索引或指定的索引大于当前图层数,图层将自动追加到图层集合的图层列表中,索引将被标准化

返回:void

addMany

批量添加图层

addMany(layers, index?): void

参数

  • layers: Layer 要添加到图层集合的图层
  • index?: number 图层可以添加到图层集合中的指定索引位置。如果未指定索引或指定的索引大于当前图层数,图层将自动追加到图层集合的图层列表中,索引将被标准化

返回:void

destroy

销毁地图

destroy(): void

返回:void

findLayerById

根据图层ID查找图层

findLayerById(layerId): Layer

参数

  • layerId: string 分配给图层的ID

返回:Layer

findTableById

根据表格ID查找表格

findTableById(tableId): Layer

参数

  • tableId: string 分配给表格的ID

返回:Layer

remove

移除图层

remove(layer): Layer

参数

  • layer: Layer 要从图层集合中移除的图层

返回:Layer

removeAll

移除所有图层

removeAll(): Layer

返回:Layer

removeMany

批量移除图层

removeMany(layers): Layer

参数

  • layers: Layer 要从图层集合中移除的图层数组

返回:Layer

reorder

重新排序图层

reorder(layer, index): Layer

参数

  • layer: Layer 要移动的图层
  • index: number 放置图层的索引位置。最底层的图层索引为0

返回:Layer

BIMFlux AI