Hi,
I’m trying to start in 2D mode, then fly to a particular location after morphing to 3D (via the scene mode selection button in the standard cesium toolbar).
Using the following code in SandCastle (Win7, Chrome 54.0.2840.87):
- The flyTo does not occur
- Only ‘morph complete’ is logged
- Input is disabled
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
sceneMode: Cesium.SceneMode.SCENE2D
});
var scene = viewer.scene;
var camera = viewer.camera;
scene.morphComplete.addEventListener(function() {
console.log(‘morph complete’);
camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(-74.0, 41.0, 15000.0),
complete: function() {
console.log(‘flyto complete’);
},
cancel: function() {
console.log(‘flyto cancelled’);
}
});
});
``