Skip to content

HeightLimit 限高分析

简介

  限高分析用于检测指定区域内建筑或模型是否超出设定的高度限制。在 Cesium 中,该功能可直观标识超高区域,辅助城市规划、航空航道保护、文物保护区控制等需要高度约束的场景,确保建设活动符合法规或安全要求。


演练场

引入

ts
import { HeightLimit } from "@m-tech/gis-core";

new HeightLimit(viewer, options);

参数

参数类型必填默认值描述
viewerViewer-容器
optionsObject{}限高分析配置
options.positionsPosition[][]限高区域的位置
options.baseHeightnumber0限高区域的基础高度
options.heightnumber0限高区域的高度
options.colorColorrgba(255,0,0,0.5)限高区域的颜色

属性

属性名类型读/写描述
baseHeightnumber读写基准面高度
heightnumber读写限制高度
colorColor读写限制区域颜色

方法

清除限高分析。

示例

ts
import { HeightLimit, Position } from "@m-tech/gis-core";

// 创建限高分析
const heightLimit = new HeightLimit(viewer, {
  positions: [new Position(114.218, 30.579, 100)],
});

// 调整基准面高度
heightLimit.baseHeight = 10;

// 调整限制高度
heightLimit.height = 20;

// 调整限制区域颜色
heightLimit.color = new Color(0, 0, 255, 0.5);

// 清除限高分析
heightLimit.clear();

MGis 地理三维库