Getting Polyline position array

Similar to how

POLYLINE.polyline.positions = Cesium.Cartesian3.fromDegreesArray(positionArray)

will update a polyline's position. I want the reverse action. So there is a polyline with an already defined position, and I want to access the array of Latitude, Longitude coordinates. Thank you.

Hello,

You can do something like:

var positions = redLine.polyline.positions.getValue(viewer.clock.currentTime);
var latLonPositions = viewer.scene.globe.ellipsoid.cartesianArrayToCartographicArray(positions);

``

Just remember that the latLonPositions values are in radians. You may want to convert them back to degrees if you are displaying the values.

Best,

Hannah