Constructor
new BigLineLayer(param)
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object | 参数列表
Properties
|
Example
////该类图层的创建方式和type为GeoLine的FeatureLayer类似,但暂时不支持更新样式也无法获取每一个单个的GeoLine,适合用作背景图层
var bigLineLayer = app.create({
type: 'BigLineLayer',
dataSource: data, //一个geojson格式的对象
'imageUrl': [
{
'condition': '[highway=primary]',
'value': 'uGeo/path.png'
},
{
'condition': '[highway=trunk]',
'value': 'uGeo/building1.png'
},
{
'condition': '',
'value': 'uGeo/building_top.png'
}],
'opacity': 1,
'type': 'image',
'lineType': 'Plane',
'numPass': 1,
'effect': false,
'width': 1,
'speed': 0.5
});
Extends
Members
(readonly) objects :Array
图层中所有的对象
Type:
- Array
- Inherited From:
offsetHeight :Number
离地高度 单位:米
Type:
- Number
- Inherited From:
Example
featureLayer.offsetHeight = 200; //设置离地高度200米
offsetHeightField :String
离地高度的字段
Type:
- String
- Inherited From:
Example
featureLayer.offsetHeightField = 'height'; //根据height字段设置离地高度
Methods
setVisible(value, effectChildren)
设置图层可见
对于图层来说,如果仅仅设置图层本身节点的visible,第二个参数传false,如果需要影响图层内各要素的visible,第二个参数传true
注:如果图层内要素visible为true 而图层本身的visible是false 这个要素是不会被显示的
Parameters:
Name | Type | Description |
---|---|---|
value |
Boolean | 是否可见 |
effectChildren |
Boolean | 是否影响图层内要素 |
- Inherited From: