Skip to main content
Source Link
emackey
  • 101
  • 3

Just testing if Cesium can work inside a snippet, with various customized settings and stuff. Looks like it can.

var imagerySources = Cesium.createDefaultImageryProviderViewModels();
var terrainSources = Cesium.createDefaultTerrainProviderViewModels();

var viewer = new Cesium.Viewer('cesiumContainer', {
  // The 2nd imagery source has labels turned on.
  imageryProviderViewModels : imagerySources,
  selectedImageryProviderViewModel : imagerySources[1],
  // The 2nd terrain source has a water mask.
  terrainProviderViewModels : terrainSources,
  selectedTerrainProviderViewModel : terrainSources[1]
});

viewer.scene.globe.enableLighting = true;
html, body, #cesiumContainer {
  width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
}
<link href="http://cesiumjs.org/Cesium/Build/Cesium/Widgets/widgets.css" 
    rel="stylesheet"/>
<script src="http://cesiumjs.org/Cesium/Build/Cesium/Cesium.js"></script>
<div id="cesiumContainer"></div>

Post Made Community Wiki by emackey