首先发现一个问题,这段代码会报错,原因是"DeveloperError: Expected value to be greater than or equal to0.0125, actual value was 0,不知道为什么经度不能为0
new Cesium.Cartographic.fromDegrees(0,0)
使用椭球大地测量可以计算一些椭球上的问题
interpolateUsingFraction方法计算两点间中间点的位置
var a = new Cesium.EllipsoidGeodesic( new Cesium.Cartographic.fromDegrees(10,0), new Cesium.Cartographic.fromDegrees(10,60) ) console.log(a); console.log(a.interpolateUsingFraction(0.5));
单位是弧度
interpolateUsingSurfaceDistance提供测地线上指定距离处的点的位置。
var a = new Cesium.EllipsoidGeodesic( new Cesium.Cartographic.fromDegrees(10,90), new Cesium.Cartographic.fromDegrees(10,60) ) console.log(a.interpolateUsingSurfaceDistance(1000000));
标签:10,椭球,Cartographic,fromDegrees,Cesium,new,EllipsoidGeodesic From: https://www.cnblogs.com/LJXXXX/p/17068105.html