- Author:
-
Example:
var path = [{
position: Cesium.Cartesian3.fromDegrees(114.39222804286993, 30.473932433076616, 272.4612584594381),
direction: new Cesium.Cartesian3(-0.5483434682364607, -0.8139196091849253, 0.19197476559868001),
up: new Cesium.Cartesian3(-0.5835248610655802, 0.5368464509435076, 0.6093394986604392)
},{
position: Cesium.Cartesian3.fromDegrees(114.40375798698935, 30.47301102760486, 270.00649404640154),
direction: new Cesium.Cartesian3(0.4571462230521806, -0.5982630086882772, 0.6581023500827029),
up: new Cesium.Cartesian3(-0.2296189857290432, 0.6354704873344242, 0.7371922280651871)
},{
position: Cesium.Cartesian3.fromDegrees(114.40684118514893, 30.483968044045348, 330.3477190403835),
direction: new Cesium.Cartesian3(0.6588258673871792, 0.22416615131004097, -0.7181211687928264),
up: new Cesium.Cartesian3(-0.08728486152030862, 0.970903746585025, 0.22299611614676693)
},{
position: Cesium.Cartesian3.fromDegrees(114.39791932341643, 30.47757410924091, 410.7639149310394),
direction: new Cesium.Cartesian3(0.5842945401159882, -0.5042076544048352, -0.6359044988284169),
up: new Cesium.Cartesian3(0.48718089751039184, 0.8446017459897573, -0.2220420315436304)
}];
var geoRoveFlight = new Cesium.GeoRoveFlight({
viewer: viewer,
path: path,
duration: 15,
interpolationDegree: 3,
pathShown: false,
pointShown: false
});
// 开始飞行
geoRoveFlight.play();
// 暂停飞行
geoRoveFlight.pause();
// 继续飞行
geoRoveFlight.continue();
// 重新飞行
geoRoveFlight.replay();
// 飞行结束事件
geoRoveFlight.onFlyCompleted.addEventListener(function(e) {
console.log(e);
});