//Make sure viewer is at the desired time.
viewer.clock.startTime = start.clone();
viewer.clock.stopTime = stop.clone();
viewer.clock.currentTime = start.clone();
viewer.clock.clockRange = Cesium.ClockRange.LOOP_STOP; //Loop at the end
viewer.clock.multiplier = 10;
//Set timeline to simulation bounds
viewer.timeline.zoomTo(start, stop);
function computeCirclularFlight(start) {
var polyLinePositions=[
[70, 20, 150000,],
[-80, 44, 150000,],
[-90, 18, 150000,],
[-98, 52, 150000,]
]
var property = new Cesium.SampledPositionProperty();
for (var i = 0; i < polyLinePositions.length; i++) {
var time = Cesium.JulianDate.addSeconds(start, i * 10, new Cesium.JulianDate());
// 将经纬度坐标转换为三维空间坐标
var position = Cesium.Cartesian3.fromDegrees(polyLinePositions[i][0], polyLinePositions[i][1], polyLinePositions[i][2]);
// Property最大的特点是和时间相互关联,在不同的时间可以动态地返回不同的属性值;
// Entity则可以感知这些Property的变化,在不同的时间驱动物体进行动态展示;
property.addSample(time, position);
}
return property;
}
//Compute the entity position property.
var position = computeCirclularFlight(s