Class: GeoWater

CMAP.GeoWater(options)

GeoWater 水面

Constructor

new GeoWater(options)

构造函数
Parameters:
Name Type Description
options Object 参数列表
Properties
Name Type Description
type String 类型'GeoWater'
name String 面的名字
coordinates Array 坐标数组 [[[116, 39],[116, 40], [117, 40],[117, 39],[116, 39]]]
renderer CMAP.GeoWaterRenderer GeoWater渲染样式
userData Object 用户定义属性
Author:
Example
var geoWater = app.create({
      type: 'GeoWater',
      name: 'water',
      coordinates: [
      [
        116.29510045051576,
        40.009579162169736
      ],
      [
        116.29541158676146,
        40.00562637628762
      ],
      [
        116.29592657089233,
        40.005445578112436
      ],
      [
        116.29912376403807,
        40.00551954106016
      ],
      [
        116.30106568336487,
        40.00595509901582
      ],
      [
        116.30150556564332,
        40.007598688913966
      ],
      [
        116.30104422569275,
        40.00968599104397
      ],
      [
        116.30050778388977,
        40.010154392595815
      ],
      [
        116.29913449287415,
        40.01077892299832
      ],
      [
        116.29843711853026,
        40.01081179286122
      ],
      [
        116.29664540290833,
        40.01054883351485
      ],
      [
        116.29559397697449,
        40.0101626101382
      ],
      [
        116.29510045051576,
        40.009579162169736
      ]
    ],//支持Polygon和MultiPolygon,格式可参考geoJson规范
      userData: {name:'圆明园' },
      renderer: {
          reflectionNormal: 'https://www.thingjs.com/citybuilder_console/static/texture/waternormals.jpg',//反射法线贴图
          refractionNormal: 'https://www.thingjs.com/citybuilder_console/static/texture/Water_2_M_Normal.jpg',//折射法线贴图
          reflectionImage: 'https://www.thingjs.com/citybuilder_console/static/texture/refraction.jpg',//反射图
          refractionImage: 'https://www.thingjs.com/citybuilder_console/static/texture/refraction.jpg',//折射图
          color: [150,150,150],//水的颜色
          flowSpeed: 1.0//水体流速,默认1.0
      }
  });

Extends

Members

(readonly) centerCoordinates :Array

物体几何中心点 格式[经度,纬度]
Type:
  • Array
Inherited From:
Author:

(readonly) coordinates :Array

获取物体地理坐标 格式[经度,纬度]
Type:
  • Array
Inherited From:
Author:

extrudeFactor :Number

高度拉伸倍数
Type:
  • Number
Inherited From:
Author:
Example
geoPolygon.extrudeFactor = 1.5;//高度系数,最终的高度为原来的高度乘以系数

extrudeField :String

高度属性字段
Type:
  • String
Inherited From:
Author:
Example
geoPolygon.extrudeField = 'height';//高度数据的字段名称

extrudeHeight :Number

多边形拉伸的高度 (单位:米)geo
Type:
  • Number
Inherited From:
Author:
Example
geoPolygon.extrudeHeight = 100;//设置多边形的拉伸高度为100米

height :Number

多边形拉伸的高度 (单位:米)
Type:
  • Number
Inherited From:
Deprecated:
  • Yes
Author:

(readonly) infoWindow :CMAP.InfoWindow

获取 物体的弹窗
Type:
Inherited From:
Author:

label :CMAP.Label

获取/设置 物体的Label
Type:
Inherited From:
Author:
Example
geoPoint.label = new Label({text:'myLabel'});

(readonly) massOfCenterCoordinates :Array

物体重心 格式[经度,纬度]
Type:
  • Array
Inherited From:
Author:

offsetHeight :number

获取/设置物体的离地高度 单位:米
Type:
  • number
Inherited From:
Author:
Example
geoObject.offsetHeight = 200; //设置物体离地高度200米

offsetHeightField :number

获取/设置物体的离地高度 单位:米
Type:
  • number
Inherited From:
Author:
Example
geoObject.offsetHeight = 200; //设置物体离地高度200米

(readonly) renderer :CMAP.GeoXxxRenderer

获取 物体的渲染配置
Type:
  • CMAP.GeoXxxRenderer
Inherited From:
Author:

visible :Boolean

获取/设置 物体是否显示,包括infoWindow是否显示
Type:
  • Boolean
Inherited From:
Author:
Example
geoObject.visible = false; //设置物体不显示