Summary
Methods:
addFeature |
添加单个矢量要素 |
addFeatures |
添加多个地理矢量要素 |
getLayerType |
获取图层类型 |
getStyle |
设获取图层样式 |
removeAllFeatures |
删除所有地理要素 |
removeFeature |
删除单个地理要素,如果要删除的地理要素不在图层上,则会返回false。 |
removeFeatures |
删除一组地理要素。 |
setStyle |
设置图层样式 |
updateFeature |
更新已添加到图层中的指定的feature。 |
updateFeatures |
更新已添加到图层中的指定feature数组。 |
Constructor
new BaseVectorLayer(options)
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
Object | 初始化可选项
|
Members
-
clampToGround
-
设置贴地状态
-
depthTest
-
获取图层的深度测试属性
return {Boolean} 深度测试属性- Overrides:
Methods
-
addFeature(feature)
-
添加单个矢量要素
Parameters:
Name Type Description feature
* 单个地理要素
-
addFeatures(features)
-
添加多个地理矢量要素
Parameters:
Name Type Description features
* 地理要素数组
-
getLayerType() → {String}
-
获取图层类型
Returns:
String -图层类型
-
getStyle() → {Object}
-
设获取图层样式
Returns:
Object -图层样式JSON
-
removeAllFeatures()
-
删除所有地理要素
Example
vectorLayer.removeAllFeatures();
-
removeFeature(feature)
-
删除单个地理要素,如果要删除的地理要素不在图层上,则会返回false。
Parameters:
Name Type Description feature
module:feature~Vector 要删除的地理要素
Example
layer.removeFeature(feature);
-
removeFeatures(features)
-
删除一组地理要素。
被移除的地理要素将被彻底销毁。如果仅希望解除地理要素与图层的绑定,请先clone(),然后删除。Parameters:
Name Type Description features
Array.<module:feature~Vector> 删除指定的地理要素
Example
vectorLayer.removeFeatures([feature]);
-
setStyle(style)
-
设置图层样式
Parameters:
Name Type Description style
Object 图层样式JSON子类实现
-
updateFeature(feature)
-
更新已添加到图层中的指定的feature。
Parameters:
Name Type Description feature
module:feature~Vector 需要更新的要素
-
updateFeatures(features)
-
更新已添加到图层中的指定feature数组。
Parameters:
Name Type Description features
Array.<module:feature~Vector> 需要更新的要素数组