BH1
February 10, 2014, 11:04pm
1
Hi,
I read the other posts about loading czml file and would like to try one out myself. I downloaded the simple.czml file from https://github.com/AnalyticalGraphicsInc/cesium/tree/master/Apps/CesiumViewer/Gallery
Then I used the sample html code from other posts. (see below). When running this Simple_czml.html file on FireFox, I got the error :
[15:02:17.430] uncaught exception: DeveloperError: dataSourceCollection is required.
Please help.
Thanks
Hi,
if you use a Cesium Viewer instead of the Cesium Widget, it works right out of the box.
See http://pastebin.com/uZLNFGLe
BH1
February 11, 2014, 4:42pm
3
thank you for your reply. I still have problem. The page is blank. Console shows no warning or error, just one line showing the location of the html file.
Do I still use the widget.css and cesium.js? Below is the code. I am not sure how to paste the code with color.
Thank you.
Hello World!
@import url(Cesium-full-b25/Build/Cesium//Widgets/widget.css);
#cesiumContainer {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
margin: 0;
overflow: hidden;
padding: 0;
font-family: sans-serif;
}
body {
padding: 0;
margin: 0;
overflow: hidden;
}
var viewer = new Cesium.Viewer('cesiumContainer', {
animation : false,
baseLayerPicker : false,
fullscreenButton : false,
geocoder : false,
homeButton : false,
sceneModePicker : false,
timeline : false,
infoBox : false,
//Use standard Cesium terrain
terrainProvider : new Cesium.CesiumTerrainProvider({
url : 'http://cesiumjs.org/smallterrain',
credit : 'Terrain data courtesy Analytical Graphics, Inc.'
}),
});
//Allow users to zoom and follow objects loaded from CZML by clicking on it.
viewer.extend(Cesium.viewerDynamicObjectMixin);
var czmlSource = new Cesium.CzmlDataSource();
czmlSource.loadUrl('Cesium-full-b25/Apps/CesiumViewer/Gallery/simple.czml');
viewer.dataSources.add(czmlSource);
BH1
February 11, 2014, 6:26pm
4
Found my own mistake. I am missing before the .