Class: BigBuildingLayer

CMAP.BigBuildingLayer(param)

大数据楼图层

Constructor

new BigBuildingLayer(param)

Parameters:
Name Type Description
param Object 参数列表
Properties
Name Type Description
type String 固定值 'BigBuildingLayer'
renderer Object 建筑的渲染样式
dataSource Object 数据源 目前只支持geojson
Author:
Example
//该类图层的创建方式和type为GeoBuilding的FeatureLayer类似,但暂时不支持更新样式也无法获取每一个单个的GeoBuilding,适合用作背景图层
   var bigBuildingLayer = app.create({
        type: 'BigBuildingLayer',
        dataSource: data, //一个geojson格式的对象
        renderer: {
            'color': [255, 0, 0],
            'opacity': 1,
            'type': 'image',
            'extrudeField': 'HEIGHT',
            'extrudeFactor': 5,
            'offsetHeight':100,
            'imageUrl': [{
                'condition': '[HEIGHT>20]',
                'value': ['uGeo/building.png', 'uGeo/building1.png']
            },
            {
                'condition': '',
                'value': ['uGeo/building_top.png', 'uGeo/building1.png']
            }
            ]
          }
      });

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: