Skip to content
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

Merged
merged 36 commits into from
Oct 9, 2015
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
85154d8
Update CHANGES.md
pjcozzi Sep 13, 2015
77b1304
Basic CZML billboard and label example
pjcozzi Sep 13, 2015
01e7189
added examples for polyline, rectangle, ellipsoids & polygon
sen-lu Sep 20, 2015
3069a6d
added polygon example, amended polygon+time to include perPositionHeight
sen-lu Sep 20, 2015
371b7f7
CZML examples for circles and ellipses
Sep 21, 2015
467e17c
added example of CZML point
Sep 22, 2015
cf89588
add images to some of the czml examples
Sep 22, 2015
8a4bd4f
added three more images for the CZML examples
Sep 22, 2015
c62625b
Added dynamic polygon - interpolation CZML example
sen-lu Sep 25, 2015
dae16c8
added CZML dynamic polygon w/ intervals
sen-lu Sep 26, 2015
59610e2
coord map, point dynamic, wall
Sep 28, 2015
925c813
merge
Sep 28, 2015
1bf509e
tidied up polygon czml examples
sen-lu Sep 29, 2015
fd8609b
dynamic points with radians
Sep 29, 2015
97802e1
fixed point time dynamic czml example
Sep 29, 2015
8020e05
added CZML path example
sen-lu Sep 29, 2015
3fc8db1
Merge branch 'czml-examples' of https://github.com/tiffanylu/cesium i…
sen-lu Sep 29, 2015
6488fed
added screenshots
Sep 29, 2015
909f839
Merge branch 'czml-examples' of github.com:tiffanylu/cesium into czml…
Sep 29, 2015
6bd7410
fixed accidental unstaging of point time dynamic example
sen-lu Sep 29, 2015
42cbdbd
fixed misnamed czml doc is
Sep 29, 2015
a1838ef
merge
Sep 29, 2015
e720c47
fixed misnamed ID
Sep 29, 2015
7e7f922
removed extra comma
Sep 29, 2015
971230e
made changes to CZML Rectangle.html
sen-lu Sep 30, 2015
18d6313
made changes to CZML Path.html
sen-lu Sep 30, 2015
7fc8dd4
added names and ids to tiff's czml examples
sen-lu Oct 1, 2015
da32554
made changes based on pull request comments
Oct 6, 2015
71019a5
made suggested changes in CZML Path and Rectangle
sen-lu Oct 7, 2015
ccbdf72
removed extrudedheight from czml polygon - interpolating references, …
sen-lu Oct 7, 2015
0b58564
Merge branch 'master' into czml-examples
sen-lu Oct 7, 2015
3468b5d
Merge AnalyticalGraphicsInc/cesium/master to czml-examples
pjcozzi Oct 7, 2015
3acd909
relative path in CZML rectangle
sen-lu Oct 8, 2015
3b124b4
removed perPositionHeights from dynamicPolygon in CZML polygon - inte…
sen-lu Oct 8, 2015
583fe6a
updated screenshots, standardized formatting across all CZML examples
sen-lu Oct 8, 2015
b8eef71
Tweak points
pjcozzi Oct 9, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions Apps/Sandcastle/gallery/CZML Billboard and Label.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<!DOCTYPE html>
Copy link
Contributor

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.

<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>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
123 changes: 123 additions & 0 deletions Apps/Sandcastle/gallery/CZML Circles and Ellipses.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" : "Green circle at height",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be more instructive for the id and name to be different. id is a unique identifier; name is for display.

name: "Green circle at height",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughout all examples, please use strict JSON so name should be "name". In general, all CZML property names should be strings in double quotes so it is easy to store them as JSON.

Choose a reason for hiding this comment

The 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,
Adam

On Tue, Sep 29, 2015 at 11:09 AM, Patrick Cozzi [email protected]
wrote:

In Apps/Sandcastle/gallery/CZML Circles and Ellipses.html
#3050 (comment)
:

+

Loading...


+

+
+<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" : "Green circle at height",
    
  •            name: "Green circle at height",
    

Throughout all examples, please use strict JSON so name should be "name".
In general, all CZML property names should be strings in double quotes so
it is easy to store them as JSON.


Reply to this email directly or view it on GitHub
https://github.com/AnalyticalGraphicsInc/cesium/pull/3050/files#r40684026
.

"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" : "Red ellipse on surface",
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" : "Blue translucent, rotated, and extruded ellipse with outline",
name: "lue translucent, rotated, and extruded ellipse with outline",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"lue" should be "Blue"

"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>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 111 additions & 0 deletions Apps/Sandcastle/gallery/CZML Different Coordinate Maps.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<!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 Point">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description is out of sync with the title.

Also, CZML Different Coordinate Maps should be something like CZML Position Definitions.

<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 Different Coordinate Maps",
"version" : "1.0"
},
{
"id" : "point 1",
name: "point1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throughout this example, use a more descriptive name, perhaps "Position in Cartographic degrees" for this one.

"position" : {
"cartographicDegrees" : [-111.0, 40.0, 150000.0]
},
"point": {
"color": {
rgba: [100,0, 200, 255]
},
"outlineColor": {
rgba: [200,0, 200, 255]
},
"pixelSize": {
"number": 10
},
"show": true
}
}, {
"id" : "point 2",
name: "point2",
"position" : {
"cartesian" : [
1216469.9357990976, -4736121.71856379, 4081386.8856866374
] },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the formatting please.

"point": {
"color": {
rgba: [0,100, 200, 255]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use "rgba" throughout.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also use consistent spacing: [0, 100, 200, 255] instead of [0,100, 200, 255].

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same spacing comment throughout, e.g., for the "rgbaf" arrays too.

},
"outlineColor": {
rgba: [200,0, 200, 255]
},
"pixelSize": {
"number": 10
},
"show": true
}
}, {
"id" : "point 3",
name: "point3",
"position" : {
"cartographicRadians" : [
Math.PI, 3 * Math.PI/4, 150000
]
},
"point": {
"color": {
rgba: [10, 200, 10, 255]
},
"outlineColor": {
rgba: [200,0, 200, 255]
},
"pixelSize": {
"number": 10
},
"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>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading