Cesium JS Line Length

المشرف العام

Administrator
طاقم الإدارة
Is there a method to return the length of a Cesium JS polyline, in real-world units?

For example, if I create a polyline:

var orangeOutlined = viewer.entities.add({ name : 'Orange line with black outline at height and following the surface', polyline : { positions : Cesium.Cartesian3.fromDegreesArray([-104.606667,50.454722, 15.71666666, 69.1 ]), width : 5, material : new Cesium.PolylineOutlineMaterialProperty({ color : Cesium.Color.ORANGE, outlineWidth : 2, outlineColor : Cesium.Color.BLACK }) } });... is there a method to return the length of that line, like:

console.log(orangeOutlined.length)

أكثر...
 
أعلى