1. A concise explanation of the problem you’re experiencing.
Uncaught ReferenceError: Sandcastle is not defined ??
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
require([‘Cesium’, ‘Button’], function(Cesium, Button)
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var options = {
camera : viewer.scene.camera,
canvas : viewer.scene.canvas
};
Sandcastle.addToolbarMenu([{
text : ‘KML #1 Earthquake’,
onselect : function() {
viewer.camera.flyHome(0);
viewer.dataSources.add(Cesium.KmlDataSource.load(’./1.0_week_age_animated_link’, options));
}
}, {
text : ‘KML #2 Hurricane’,
onselect : function() {
viewer.camera.flyHome(0);
viewer.dataSources.add(Cesium.KmlDataSource.load(’./nhc_active.kml’, options));
}
}, {
text : ‘KML #3 C130’,
onselect : function() {
viewer.camera.flyHome(0);
viewer.dataSources.add(Cesium.KmlDataSource.load(’./RealTimeC130.kml’, options));
}
}], ‘toolbar’);
Sandcastle.reset = function() {
viewer.dataSources.removeAll();
viewer.clock.clockRange = Cesium.ClockRange.UNBOUNDED;
viewer.clock.clockStep = Cesium.ClockStep.SYSTEM_CLOCK;
};
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
Demonstration purposes
4. The Cesium version you’re using, your operating system and browser.
Cesium 1.37
Win 10
Google Chrome