Draw a curved line along the surface of the globe

Hi all,

I want to draw a curved line along the surface of the globe.

The examples in Sandcastle are all drawing straight lines. I read some discussions that were posted back in 2012, and Cesium didn’t have the support of drawing a curved line at that time.

I am wondering if Cesium has the support of drawing a curved line now, if it has, please let me know how to do it.

Thanks in advance.

Steven

I think I may find a solution for this. I think I can use EllipsoidGeodesic.
After I create an instance of EllipsoidGeodesic, how do I actually display it on the globe? Please see the code below,

var widget = new Cesium.CesiumWidget(‘cesiumContainer’);

var scene = widget.scene;

var ellipsoid = widget.centralBody.getEllipsoid();

var firstPoint = new Cesium.Cartographic.fromDegrees(-180, 0);

var secondPoint = new Cesium.Cartographic.fromDegrees(180,0);

var geodesic = new Cesium.EllipsoidGeodesic(firstPoint, secondPoint, ellipsoid);

var primitive = new Cesium.Primitive(geodesic);

primitives.add(primitive); //Adding it to primitives didn’t work, the line won’t display on the globe.

If you have any experience of using EllipsoidGeodesic, please help.

Thanks in advance.

Steven

在 2014年3月11日星期二UTC-7上午12时02分54秒,Steven写道: