已知起点和终点,用Cesium的内插算法,间隔0.1米内插平面坐标,再根据地形获取高程
//内插
var geodesic = new Cesium.EllipsoidGeodesic();
var sp = new Cesium.Catographic(lon,lat,0);//弧度制
var ep = new Cesium.Catographic(lon,lat,0);
geodesic, setEndPoints(sp, ep);
var res = geodesic.interpolateUsingSurfaceDistance(0.1,new Cesium.Catographic());
地形高程获取看这个:https://cesiumjs.org/Cesium/Build/Documentation/sampleTerrain.html?classFilter=sample