Hi!
I need to draw a line that follows the the curvature of the earth, like when I draw a Polygon.
//draw on earth surface:
var polygon = new Cesium.Polygon();
polygon.setPositions(ellipsoid.cartographicArrayToCartesianArray([
Cesium.Cartographic.fromDegrees(10.0, 0.0),
Cesium.Cartographic.fromDegrees(-70.0, 35.0),
Cesium.Cartographic.fromDegrees(-75.0, 30.0),
Cesium.Cartographic.fromDegrees(10.0, 0.0)
]));
primitives.add(polygon);
//it’s straight:
var polylines = new Cesium.PolylineCollection();
primitives.add(polylines);
polylines.add({
positions : ellipsoid.cartographicArrayToCartesianArray([
Cesium.Cartographic.fromDegrees(10.0, 0.0),
Cesium.Cartographic.fromDegrees(-70.0, 35.0),
Cesium.Cartographic.fromDegrees(-75.0, 30.0),
Cesium.Cartographic.fromDegrees(10.0, 0.0)
]),
color : new Cesium.Color(1, 0, 0, 1)
});
Is there a way to do it?
Thanks!