You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the current camera position is closer to the globe than the destination, and the current position is not directly in front of destination (the path isn't a straight zoom-out, it is offset in some direction), the camera flies through the map and generates an error of "right must be greater than left."
Sandcastle Example: Click 'Vew Extent' then 'Fly To Extent'
require([
'Cesium', 'dijit/form/Button'
], function(
Cesium, Button)
{
"use strict";
var ellipsoid = Cesium.Ellipsoid.WGS84;
function flyToExtent(scene) {
var west = Cesium.Math.toRadians(-90.0);
var south = Cesium.Math.toRadians(38.0);
var east = Cesium.Math.toRadians(-87.0);
var north = Cesium.Math.toRadians(40.0);
var extent = new Cesium.Extent(west, south, east, north);
var flight = Cesium.CameraFlightPath.createAnimationExtent(scene.getFrameState(), {
destination : extent,
onComplete : function() {
}
});
scene.getAnimations().add(flight);
}
function viewAnExtent(scene) {
var west = Cesium.Math.toRadians(-89.0);
var south = Cesium.Math.toRadians(38.5);
var east = Cesium.Math.toRadians(-88.0);
var north = Cesium.Math.toRadians(39.5);
var extent = new Cesium.Extent(west, south, east, north);
scene.getCamera().controller.viewExtent(extent, ellipsoid);
}
function createButtons(scene) {
new Button({
label : "View Extent",
onClick : function() {
viewAnExtent(scene);
}
}).placeAt('toolbar');
new Button({
label : "Fly to Extent",
onClick : function() {
flyToExtent(scene);
}
}).placeAt('toolbar');
}
var widget = new Cesium.CesiumWidget('cesiumContainer');
var transitioner = new Cesium.SceneTransitioner(widget.scene, ellipsoid);
transitioner.morphTo2D();
createButtons(widget.scene);
Sandcastle.finishedLoading();
});
The text was updated successfully, but these errors were encountered:
If the current camera position is closer to the globe than the destination, and the current position is not directly in front of destination (the path isn't a straight zoom-out, it is offset in some direction), the camera flies through the map and generates an error of "right must be greater than left."
Sandcastle Example: Click 'Vew Extent' then 'Fly To Extent'
The text was updated successfully, but these errors were encountered: