Problems in drawing flight path

I want to make a flight path in Cesium just like this one
http://www.senchalabs.org/philogl/PhiloGL/examples/worldFlights/
If i use the polyline, the routes will stuck on the ground, I want to make flight path in air, Could you show me the code about the drawing line function. Thank you!

You’ll want to use Path rather than Polyline. Here’s the idea using an Entity.

var viewer = new Cesium.Viewer(‘cesiumContainer’);

viewer.clock.startTime = Cesium.JulianDate.fromIso8601(“2014-03-14T00:00:00.000Z”);

viewer.clock.stopTime = Cesium.JulianDate.fromIso8601(“2014-03-15T00:00:00.000Z”);

viewer.clock.currentTime = Cesium.JulianDate.fromIso8601(“2014-03-14T00:00:00.000Z”);

viewer.clock.clockRange = Cesium.ClockRange.LOOP_STOP;

var entities = viewer.entities;

var flights = entities.add(new Cesium.Entity());

var aircraftPositions = new Cesium.SampledPositionProperty();

aircraftPositions.addSample(“2014-03-14T16:00:00.000”, Cesium.Cartesian3.fromDegrees(-80.000, 28.400, 0.000));

var aircraft = entities.add({

parent: flights,

name: “XYX1308”,

description: “A flight roughly from Florida to Ireland.”,

position: aircraftPositions,

orientation: new Cesium.VelocityOrientationProperty(aircraftPositions),

path: {

leadTime: 86400.0,

trailTime: 86400.0,

width: 2.0,

material: Cesium.Color.DODGERBLUE

}

});

``

I’ve also attached a full Sandcastle example.

Scott

Forum_ProblemsInDrawingFlightPath.js (33 KB)

Hi Scott,

I have to do the same thing, but I don’t want to use viewer. As I am using trackingView of earth. Could you help me. Please.

Thank you in advance.

Best Regards,

Lalit