Summary
Methods:
| getFeaturesByAttribute |
给定属性与值,获取匹配的地理要素。 |
| getStyle |
设获取图层样式 |
| setStyle |
设置图层样式 |
Constructor
new abstract DataLayer(properties)
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
properties |
Object | 参数项
|
Methods
-
getFeaturesByAttribute(attrName, attrValue) → {Array.<Object>}
-
给定属性与值,获取匹配的地理要素。
如果没有找到匹配的地理要素,则返回一个空的数组。Parameters:
Name Type Description attrNameString 属性名称或键名
attrValue* 属性值。字符串、数字等
Returns:
Array.<Object> -返回所匹配的要素构成的数组
Example
let features = layer.getFeaturesByAttribute("name", 205);//得到属性name为205的要素数组 -
getStyle() → {Object}
-
设获取图层样式
Returns:
Object -图层样式JSON
-
setStyle(style)
-
设置图层样式
Parameters:
Name Type Description styleObject 图层样式JSON子类实现