Everything works great in the sandbox. But do I have issues when I leave there.
A few questions for you
1) - This code is taken from the CesiumViewerStartup.js file. Can i get a quick overview of what is happening here.
require({
baseUrl : '../../Source',
paths : {
CesiumViewer : '../Apps/CesiumViewer',
domReady : '../ThirdParty/requirejs-2.1.6/domReady'
}
}, ['CesiumViewer/CesiumViewer'], function() {
});
2) I believe that somehow the code above loads CesiumViewer.js
In the startup function, viewer is defined along with other items.
Using SandCastle and the CZML demo, I have access to viewer because it is defined at the bottom in the require Cesium block.
If I take the viewer app and starting adding buttons and js to the index.html, how can I access viewer and Cesium from a script tag inside the page?
3) Can someone show a simple page that
-is outside of sandcastle
-loads the viewer widget
-has a button in the html page that does something with the Viewer and Cesium
for example:
function useBuiltInCzml() {
viewer.dataSources.removeAll();
var czmlDataSource = new Cesium.CzmlDataSource();
czmlDataSource.load(builtInCzml, 'Built-in CZML');
viewer.dataSources.add(czmlDataSource);
// Zoom in a little closer...
var extent = new Cesium.Extent(-2.056, 0.587, -2.010, 0.633);
viewer.scene.getCamera().controller.viewExtent(extent);
}
Thanks for your help.
Eric