类名 HeightLimited

# new HeightLimited(vieweropt, optionsopt)

限高分析

参数:

名称 类型 默认值 描述
viewer Cesium.Viewer null

场景视图

options Object {}

额外初始化参数

posArray Number null

执行限高分析边界,坐标为经纬度坐标,点个数大于2

limitedColor Cesium.Color Cesium.Color.RED.withAlpha(0.7)

限高区域颜色

polygonColor Cesium.Color Cesium.Color.WHITE.withAlpha(0.7)

限高区域辅助面颜色

useOutLine Boolean true

限高区域辅助面外边线

height Number 10

限高高度

blendTransparency Number 0.8

限高颜色混合比例,0-1之间的数值

请参考以下示例:
1、限高分析
支持如下方法:
[1、执行限高分析]
[2、移除限高分析]

示例

限高分析

// 参考示例:
http://webclient.smaryun.com/#/modules/cesium/analyse/commonAnalyse/height-limited

// ES5引入方式
const { HeightLimited } = zondy.cesium
// ES6引入方式
import { HeightLimited } from "@mapgis/webclient-cesium-plugin"

// 1 构建限高分析工具
const heightLimitedTool = new HeightLimited(viewer, {
  // 控高面的点坐标数组,笛卡尔3坐标
  posArray: [],
  // 限高高度
  height: 100,
  // 超过高度后的颜色
  limitedColor: Cesium.Color.fromCssColorString('#ff0000').withAlpha(0.5),
  // 限高面的颜色
  polygonColor: Cesium.Color.fromCssColorString('#ffff00').withAlpha(0.5),
  // 限高颜色混合比例
  blendTransparency: 0.8
})
// 2 执行限高分析
heightLimited.add()
// 3 移除限高分析
heightLimited.remove()

成员变量

Number

# height

辅助面高度

方法

# add()

执行限高分析

# remove()

移除限高分析

构造函数
成员变量
方法
事件