cesium之计算两个经纬度点间的距离

cesium之计算两个经纬度点间的距离

方法;

/* 计算两点之间的距离 */
            getDistance (satrt, end) {
                var geodesic = new Cesium.EllipsoidGeodesic();
                geodesic.setEndPoints(satrt, end);
                var distance = geodesic.surfaceDistance
                return distance
            }

参数:

var satrt = Cesium.Cartographic.fromDegrees(117.270739, 31.84309)
var end = Cesium.Cartographic.fromDegrees(117.270739, 31.85309)

 

 

 

转载自: https://blog.csdn.net/weixin_42448623/article/details/106906050

钻研不易,转载请注明出处......

posted @ 2020-08-27 15:55  莫小龙  阅读(3451)  评论(0编辑  收藏  举报