Created
April 13, 2015 18:33
-
-
Save emackey/04455035b7dec8b4bf87 to your computer and use it in GitHub Desktop.
Test of some points in 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); | |
</style> | |
<div id="cesiumContainer" class="fullSize"></div> | |
<div id="loadingOverlay"><h1>Loading...</h1></div> | |
<div id="toolbar"></div> | |
<script id="cesium_sandcastle_script"> | |
function startup(Cesium) { | |
"use strict"; | |
//Sandcastle_Begin | |
var e4 = Cesium.Math.EPSILON4; | |
Cesium.Camera.DEFAULT_VIEW_FACTOR = 0; | |
Cesium.Camera.DEFAULT_VIEW_RECTANGLE = new Cesium.Rectangle(-e4, -e4, e4, e4); | |
var viewer = new Cesium.Viewer('cesiumContainer', { | |
skyBox : false, | |
skyAtmosphere : false, | |
geocoder : false, | |
timeline : false, | |
animation : false, | |
scene3DOnly : true, | |
baseLayerPicker : false, | |
imageryProvider : false | |
}); | |
viewer.clock.shouldAnimate = false; | |
var scene = viewer.scene; | |
//scene.globe.show = false; | |
scene.globe.baseColor = Cesium.Color.BLACK.clone(); | |
var points = scene.primitives.add(new Cesium.PointPrimitiveCollection()); | |
var radius = scene.globe.ellipsoid.radii.x + 1; | |
var color = Cesium.Color.LIGHTSKYBLUE; | |
var outlineColor = Cesium.Color.BLACK; | |
function adapt(x, y, result) { | |
result.x = radius; | |
result.y = x * 10; | |
result.z = y * 10; | |
return result; | |
} | |
var scratchCartesian3 = new Cesium.Cartesian3(); | |
points.add({ | |
pixelSize : 8, | |
color : Cesium.Color.YELLOW, | |
position : adapt(0, 0, scratchCartesian3) | |
}); | |
points.add({ | |
pixelSize : 8, | |
color : Cesium.Color.RED, | |
position : adapt(1, 0, scratchCartesian3) | |
}); | |
points.add({ | |
pixelSize : 8, | |
color : Cesium.Color.LIME, | |
position : adapt(0, 1, scratchCartesian3) | |
}); | |
window.Cesium = Cesium; | |
window.viewer = viewer;//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