-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding CZML Examples #3050
Adding CZML Examples #3050
Changes from 28 commits
85154d8
77b1304
01e7189
3069a6d
371b7f7
467e17c
cf89588
8a4bd4f
c62625b
dae16c8
59610e2
925c813
1bf509e
fd8609b
97802e1
8020e05
3fc8db1
6488fed
909f839
6bd7410
42cbdbd
a1838ef
e720c47
7e7f922
971230e
18d6313
7fc8dd4
da32554
71019a5
ccbdf72
0b58564
3468b5d
3acd909
3b124b4
583fe6a
b8eef71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<!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="Basic CZML billboard and label."> | ||
<meta name="cesium-sandcastle-labels" content="CZML"> | ||
<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 czml = [ | ||
{ | ||
"id" : "document", | ||
"name" : "Basic CZML billboard and label", | ||
"version" : "1.0" | ||
}, { | ||
"id" : "some-unique-id", | ||
"name" : "AGI", | ||
"description" : "<!--HTML-->\r\n<p>\r\nAnalytical Graphics, Inc. (AGI) founded Cesium.\r\n</p>", | ||
"billboard" : { | ||
"image" : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACvSURBVDhPrZDRDcMgDAU9GqN0lIzijw6SUbJJygUeNQgSqepJTyHG91LVVpwDdfxM3T9TSl1EXZvDwii471fivK73cBFFQNTT/d2KoGpfGOpSIkhUpgUMxq9DFEsWv4IXhlyCnhBFnZcFEEuYqbiUlNwWgMTdrZ3JbQFoEVG53rd8ztG9aPJMnBUQf/VFraBJeWnLS0RfjbKyLJA8FkT5seDYS1Qwyv8t0B/5C2ZmH2/eTGNNBgMmAAAAAElFTkSuQmCC", | ||
"scale" : 1.5 | ||
}, | ||
"label" : { | ||
"fillColor" : { | ||
"rgba" : [0, 255, 255, 255] | ||
}, | ||
"font" : "11pt Lucida Console", | ||
"horizontalOrigin" : "LEFT", | ||
"outlineColor" : { | ||
"rgba":[0, 0, 0, 255] | ||
}, | ||
"outlineWidth" : 2, | ||
"pixelOffset" : { | ||
"cartesian2" : [12, 0] | ||
}, | ||
"style" : "FILL_AND_OUTLINE", | ||
"text" : "AGI" | ||
}, | ||
"position" : { | ||
"cartesian" : [ | ||
1216469.9357990976, -4736121.71856379, 4081386.8856866374 | ||
] | ||
} | ||
} | ||
]; | ||
|
||
var viewer = new Cesium.Viewer('cesiumContainer'); | ||
viewer.dataSources.add(Cesium.CzmlDataSource.load(czml)); | ||
//Sandcastle_End | ||
Sandcastle.finishedLoading(); | ||
} | ||
if (typeof Cesium !== "undefined") { | ||
startup(Cesium); | ||
} else if (typeof require === "function") { | ||
require(["Cesium"], startup); | ||
} | ||
</script> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
<!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="CZML Circles and Ellipses"> | ||
<meta name="cesium-sandcastle-labels" content="CZML"> | ||
<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 czml = [ | ||
{ | ||
"id" : "document", | ||
"name" : "CZML Geometries: Circles and Ellipses", | ||
"version" : "1.0" | ||
}, | ||
{ | ||
"id" : "shape1", | ||
name: "Green circle at height", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Throughout all examples, please use strict JSON so There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I will go through and fix those. Once I do, how do I update the pull request? Thanks, On Tue, Sep 29, 2015 at 11:09 AM, Patrick Cozzi [email protected]
|
||
"position" : { | ||
"cartographicDegrees" : [-111.0, 40.0, 150000.0] | ||
}, | ||
"ellipse": { | ||
"semiMinorAxis" : 300000.0, | ||
"semiMajorAxis" : 300000.0, | ||
"height": 200000.0, | ||
"material" : { | ||
"solidColor": { | ||
"color": { | ||
"rgba": [0, 255, 0, 255] | ||
} | ||
} | ||
}, | ||
"show": true | ||
} | ||
}, | ||
{ | ||
"id" : "shape2", | ||
name: "Red ellipse on surface", | ||
"position" : { | ||
"cartographicDegrees" : [-103.0, 40.0, 0] | ||
}, | ||
"ellipse": { | ||
"semiMinorAxis" : 250000.0, | ||
"semiMajorAxis" : 400000.0, | ||
"height": 0, | ||
"material" : { | ||
"solidColor": { | ||
"color": { | ||
"rgba": [255, 0, 0, 127] | ||
} | ||
} | ||
}, | ||
"outline": true, | ||
"outlineColor": { | ||
rgba: [255,0,0,255] | ||
}, | ||
"show": true | ||
|
||
} | ||
}, { | ||
"id" : "shape3", | ||
name: "Blue translucent, rotated, and extruded ellipse with outline", | ||
"position" : { | ||
"cartographicDegrees" : [-95.0, 40.0, 100000.0] | ||
}, | ||
"ellipse": { | ||
"semiMinorAxis" : 150000.0, | ||
"semiMajorAxis" : 300000.0, | ||
"extrudedHeight" : { | ||
"number": 200000.0 | ||
}, | ||
"rotation" : { | ||
"number": 0.78539 | ||
}, | ||
"material" : { | ||
"solidColor": { | ||
"color": { | ||
"rgba": [0, 0, 255, 127] | ||
} | ||
} | ||
}, | ||
"outline": true, | ||
"show": true | ||
} | ||
} | ||
]; | ||
|
||
|
||
var viewer = new Cesium.Viewer('cesiumContainer'); | ||
viewer.dataSources.add(Cesium.CzmlDataSource.load(czml)); | ||
|
||
//Sandcastle_End | ||
Sandcastle.finishedLoading(); | ||
} | ||
if (typeof Cesium !== "undefined") { | ||
startup(Cesium); | ||
} else if (typeof require === "function") { | ||
require(["Cesium"], startup); | ||
} | ||
</script> | ||
</body> | ||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update
CZML Billboard and Label.jpg
so the label is not missing the "A" in "AGI?" Just use Firefox to take the screenshot.