Created
October 31, 2014 13:53
-
-
Save emackey/b319bbda2fe4f6554362 to your computer and use it in GitHub Desktop.
Two Widget test for Cesium Sandcastle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <!-- Use Chrome Frame in IE --> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | |
<meta name="description" content="Use Viewer to start building new applications or easily embed Cesium into existing applications."> | |
<meta name="cesium-sandcastle-labels" content="Beginner, Showcases"> | |
<title>Cesium Demo</title> | |
<script type="text/javascript" src="../Sandcastle-header.js"></script> | |
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.9/require.js"></script> | |
<script type="text/javascript"> | |
require.config({ | |
baseUrl : '../../../Source', | |
waitSeconds : 60 | |
}); | |
</script> | |
</head> | |
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html"> | |
<style> | |
@import url(../templates/bucket.css); | |
.top,.bottom { | |
display: block; | |
position: absolute; | |
border: none; | |
width: 100%; | |
height: 50%; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
.top { | |
top: 0; | |
left: 0; | |
border-bottom: solid 2px #888; | |
} | |
.bottom { | |
bottom: 0; | |
left: 0; | |
} | |
#topToolbar,#bottomToolbar { | |
margin: 5px; | |
padding: 2px 5px; | |
position: absolute; | |
left: 0; | |
} | |
#topToolbar { | |
top: 0; | |
} | |
#bottomToolbar { | |
top: 50%; | |
} | |
</style> | |
<div id="cesiumContainer" class="fullSize"></div> | |
<div id="loadingOverlay"><h1>Loading...</h1></div> | |
<div id="cesiumContainerTop" class="top"></div> | |
<div id="cesiumContainerBottom" class="bottom"></div> | |
<div id="topToolbar"></div> | |
<div id="bottomToolbar"></div> | |
<script id="cesium_sandcastle_script"> | |
function startup(Cesium) { | |
"use strict"; | |
//Sandcastle_Begin | |
var viewer3D = new Cesium.Viewer('cesiumContainerTop', { | |
navigationInstructionsInitiallyVisible : false | |
}); | |
var viewer2D = new Cesium.Viewer('cesiumContainerBottom', { | |
navigationInstructionsInitiallyVisible : false, | |
sceneMode : Cesium.SceneMode.SCENE2D, | |
clock : viewer3D.clock | |
}); | |
viewer3D.scene.globe.enableLighting = true; | |
viewer2D.scene.globe.enableLighting = true; | |
document.getElementById('topToolbar').innerHTML = '3D'; | |
document.getElementById('bottomToolbar').innerHTML = '2D'; | |
//Sandcastle_End | |
Sandcastle.finishedLoading(); | |
} | |
if (typeof Cesium !== "undefined") { | |
startup(Cesium); | |
} else if (typeof require === "function") { | |
require(["Cesium"], startup); | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment