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
In this example, click the button to load the data. Then after the data is loaded, switch the scene mode. It causes a crash because camera.pitch is undefined when the scene mode is morphing.
This error only happens when you pass in options.camera and options.canvas (which is now required).
var viewer = new Cesium.Viewer('cesiumContainer');
var options = {
camera : viewer.scene.camera,
canvas : viewer.scene.canvas
};
Sandcastle.addToolbarButton('Load KML Network link',
function() {
var kmlText='<kml><NetworkLink>' +
'<name><![CDATA[Test]]></name>' +
'<refreshVisibility>0</refreshVisibility>' +
'<flyToView>0</flyToView>' +
'<Link><href><![CDATA[../../SampleData/kml/facilities/facilities.kml]]></href>' +
'<viewRefreshMode>onStop</viewRefreshMode>' +
'<viewRefreshTime>0</viewRefreshTime>' +
'<viewFormat>BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]</viewFormat>' +
'</Link></NetworkLink></kml>';
var dom = new DOMParser().parseFromString(kmlText, 'text/xml');
viewer.camera.flyHome(0);
viewer.dataSources.add(Cesium.KmlDataSource.load(dom, options));
});
Sandcastle.reset = function() {
viewer.dataSources.removeAll();
viewer.clock.clockRange = Cesium.ClockRange.UNBOUNDED;
viewer.clock.clockStep = Cesium.ClockStep.SYSTEM_CLOCK;
};
The text was updated successfully, but these errors were encountered:
In this example, click the button to load the data. Then after the data is loaded, switch the scene mode. It causes a crash because camera.pitch is undefined when the scene mode is morphing.
This error only happens when you pass in
options.camera
andoptions.canvas
(which is now required).The text was updated successfully, but these errors were encountered: