PlotDoc

PlotDoc

标绘文档。

Constructor

new PlotDoc(viewer, popups)

Author:
  • zyp
Example
// 获取标绘文档实例。
var plotDoc = mainControl.plotDoc;
Parameters:
Name Type Description
viewer Cesium.Viewer Cesium.Viewer对象。
popups Popups 弹出框

Members

enableMarkSelection :Boolean

Default Value:
  • true
开启或关闭标绘选择功能。
Type:
  • Boolean

layerAdded :Cesium.Event

Default Value:
  • Cesium.Event()
向集合中添加图层时触发的事件。 事件处理程序将传递添加的图层。
Type:
  • Cesium.Event

layerRemoved :Cesium.Event

Default Value:
  • Cesium.Event()
从集合中移除图层时触发的事件。 事件处理程序将传递删除的图层。
Type:
  • Cesium.Event

length :Number

文档中标绘图层的数量。
Type:
  • Number

(readonly) markSelection :MarkSelection

获取标绘选择实例对象。
Type:

show :Boolean

Default Value:
  • true
获取或设置标绘文档是否显示。
Type:
  • Boolean

values :Array

包含所有标绘图层的数组。
Type:
  • Array

Methods

add(plotLayer) → {PlotLayer}

添加一个新的标绘图层实例。
Parameters:
Name Type Description
plotLayer PlotLayer 新创建的标绘图层实例。
Returns:
新添加的标绘图层实例。
Type
PlotLayer

contains(plotLayer) → {Boolean}

检查文档中是否包含指定的标绘图层。
Parameters:
Name Type Description
plotLayer PlotLayer 要检查的标绘图层实例。
Returns:
是否包含。
Type
Boolean

containsById(id) → {Boolean}

检查文档中是否包含指定的ID标绘图层。
Parameters:
Name Type Description
id String 要检查的标绘图层实例的ID。
Returns:
是否包含。
Type
Boolean

getById(id) → {PlotLayer}

从文档中获取指定的ID标绘图层。
Parameters:
Name Type Description
id String 要获取的标绘图层实例的ID。
Returns:
标绘图层实例,没找到则为null。
Type
PlotLayer

getMarkById(id) → {Mark}

从文档中获取指定ID的标绘实体实例。
Parameters:
Name Type Description
id String 要获取的标绘实体实例的ID。
Returns:
要获取的标绘实体实例,未找到则为null。
Type
Mark

remove(plotLayer) → {Boolean}

从文档中移除指定标绘图层。
Parameters:
Name Type Description
plotLayer PlotLayer 要移除的标绘图层实例。
Returns:
是否移除成功。
Type
Boolean

removeAll()

从集合中移除所有标绘图层。

removeById(id) → {Boolean}

从文档中移除指定ID的标绘图层。
Parameters:
Name Type Description
id String 要移除的标绘图层的ID。
Returns:
是否移除成功
Type
Boolean