GeoProfile

new Cesium.GeoProfile(options)

三维地图两点间剖面分析插件类
Name Type Description
options Object optional 对象具有以下属性:
Name Type Description
viewer Viewer optional 三维球对象.
Example:
// 初始化剖面分析插件.
var GeoProfile = new Cesium.GeoProfile({
    viewer:viewer
});
//线段节点坐标
var PTDegreeArray = [95.56835079068432, 29.590453035297468, 3306.178021080718, 95.73438479667917, 29.61550722940419, 4307.865794683658, 95.7871207148004, 29.7151584365525, 4019.688432230923];
var samplingDistance = 50;
//获取插值数据
var data = GeoProfile.getLerpValue(PTDegreeArray,samplingDistance);
//在指定div容器中绘制图表
GeoProfile.drawChart(data,"chartContainer");
Demo:

Methods

clear()

清除结果.

clearChart()

清除图表.

clearMark()

清除起点、终点.

drawChart(data, chartContainerId)echartsInstance

绘制图表.
Name Type Description
data Object 插值后的结果.
chartContainerId String 图表元素id.
Returns:
echarts实例.

drawMark(option)

绘制起点、终点.
Name Type Description
option Object 参数选项:
Name Type Description
originCoordanate Cartesian3 起点坐标.
originImage String 起点标注的图片url.
destinationCoordanate Cartesian3 终点坐标.
destinationImage String 终点标注的图片url.

getLerpValue(degreesArray, samplingDistance)Object

剖面分析计算插值
Name Type Description
degreesArray Array.<Number> 经纬度和高度的集合。[longitude, latitude, height, longitude, latitude, height...].
samplingDistance Number 采样点数量.
Returns:
插值后的结果.