Class: BigLineLayer

CMAP.BigLineLayer(param)

大数据线图层

Constructor

new BigLineLayer(param)

Parameters:
Name Type Description
param Object 参数列表
Properties
Name Type Description
type String 固定值 'BigLineLayer'
renderer Object 线的渲染样式
dataSource Object 数据源 目前只支持geojson
Author:
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:
Author:

offsetHeight :Number

离地高度 单位:米
Type:
  • Number
Inherited From:
Author:
  • huyang<huyang@uinnova.com>
Example
featureLayer.offsetHeight = 200; //设置离地高度200米

offsetHeightField :String

离地高度的字段
Type:
  • String
Inherited From:
Author:
  • huyang<huyang@uinnova.com>
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: