Uncaught ReferenceError: Sandcastle is not defined

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

I don't see a Sandcastle variable anywhere in your code. Never used it myself, but shouldn't it at least be Cesium.Sandcastle?

Gave that a shot, and it failed for a different reason

Cesium.Sandcastle.addToolbarMenu([{

text : ‘KML #1 Earthquake’,

dropdown.html:29 Uncaught TypeError: Cannot read property ‘addToolbarMenu’ of undefined

at dropdown.html:29

Darryl

Sandcastle is it’s own self-contained app.

If you’re in Sandcastle, you don’t need to require any modules.

If you’re writing code for your own application, the Sandcastle module is not available.

Thanks,

Gabby