Class: graphicLayer

L.supermap.plotting.graphicLayer

高效率固定点标号图层类。

L.supermap.plotting.graphicLayer()

leaflet/mapping/PlottingGraphicLayer.js, line 5

Extends

Methods

addFeatures(features)

leaflet/mapping/PlottingGraphicLayer.js, line 284

添加标号对象。

Name Type Description
features Array.<L.supermap.plotting.GraphicObject>

标号对象。

getEditable(){boolean}

leaflet/mapping/PlottingGraphicLayer.js, line 115

获取图层的可编辑。

Returns:
Type Description
boolean 返回图层是否可编辑。

getFeatureByUuid(uuid){L.supermap.plotting.PlottingObject}

leaflet/mapping/PlottingGraphicLayer.js, line 261

根据用户定义的唯一ID获取图层上指定的feature。

Name Type Description
uuid string

用户定义的唯一ID。

Returns:
Type Description
L.supermap.plotting.PlottingObject 返回图层上指定的feature。

getFeatures()

leaflet/mapping/PlottingGraphicLayer.js, line 276

获取当前图层所有的矢量要素。

getLocked(){boolean}

leaflet/mapping/PlottingGraphicLayer.js, line 140

获取图层的可锁定。

Returns:
Type Description
boolean 返回图层是否锁定。

getSelected(){boolean}

leaflet/mapping/PlottingGraphicLayer.js, line 87

获取图层的可选择。

Returns:
Type Description
boolean 返回图层是否可选择。

getVisibility(){boolean}

leaflet/mapping/PlottingGraphicLayer.js, line 165

获取图层的可见性。

Returns:
Type Description
boolean 返回图层是否可见。

removeAllFeatures()

leaflet/mapping/PlottingGraphicLayer.js, line 346

清除当前图层所有的矢量要素。

removeAllGraphics()

leaflet/mapping/PlottingGraphicLayer.js, line 438

删除所有图形对象。

removeFeatures(features)

leaflet/mapping/PlottingGraphicLayer.js, line 316

从当前图层中删除feature。这个函数擦除所有传递进来的矢量要素。 参数中的feature数组中的每一项,必须是已经添加到当前图层中的feature, 如果无法确定feature数组,则可以调用removeAllFeatures来删除所有feature。 如果要删除的feature数组中的元素特别多,推荐使用removeAllFeatures, 删除所有feature后再重新添加。这样效率会更高。

Name Type Description
features Array.<L.supermap.plotting.PlottingObject>

要删除feature的数组。

removeGraphics(graphics)

leaflet/mapping/PlottingGraphicLayer.js, line 395

删除图形对象。

Name Type Description
graphics Object

图形对象。

setEditable(isEditable)

leaflet/mapping/PlottingGraphicLayer.js, line 124

设置图层的可编辑。

Name Type Description
isEditable boolean

图层是否可编辑。

setLocked(isLocked)

leaflet/mapping/PlottingGraphicLayer.js, line 149

设置图层的可锁定。

Name Type Description
isLocked boolean

图层的锁定。

setSelected(isSelected)

leaflet/mapping/PlottingGraphicLayer.js, line 96

设置图层的可选择。

Name Type Description
isSelected boolean

图层是否可选择。

setVisibility(visibility)

leaflet/mapping/PlottingGraphicLayer.js, line 174

设置图层可见性,设置图层的隐藏、显示、重绘的相应可见标记。

Name Type Description
visibility boolean

是否显示图层(当前地图的resolution在最大最小resolution之间)。

updateGraphics()

leaflet/mapping/PlottingGraphicLayer.js, line 452

不更新栅格图重绘。

updateGraphics(graphics)

leaflet/mapping/PlottingGraphicLayer.js, line 356

更新栅格图对象。

Name Type Description
graphics Object

图形对象。