Skip to content

Commit

Permalink
Merge pull request #3072 from tiffanylu/czml-examples-tweaks
Browse files Browse the repository at this point in the history
Czml examples tweaks
  • Loading branch information
mramato committed Oct 14, 2015
2 parents b719df9 + 0c6b261 commit 65eb4bf
Show file tree
Hide file tree
Showing 32 changed files with 2,830 additions and 2,547 deletions.
82 changes: 41 additions & 41 deletions Apps/Sandcastle/gallery/CZML Billboard and Label.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,62 +18,62 @@
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
@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
"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
]
}
}
{
"id" : "document",
"name" : "Basic CZML billboard and label",
"version" : "1.0"
}, {
"id" : "some-unique-id",
"name" : "AGI",
"description" : "<p><a href='http://www.agi.com' target='_blank'>Analytical Graphics, Inc.</a> (AGI) founded Cesium.</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();
//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
startup(Cesium);
startup(Cesium);
} else if (typeof require === "function") {
require(["Cesium"], startup);
require(["Cesium"], startup);
}
</script>
</body>
Expand Down
Binary file modified Apps/Sandcastle/gallery/CZML Billboard and Label.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
139 changes: 68 additions & 71 deletions Apps/Sandcastle/gallery/CZML Circles and Ellipses.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,87 +28,84 @@
function startup(Cesium) {
"use strict";
//Sandcastle_Begin
var czml = [
{
"id" : "document",
"name" : "CZML Geometries: Circles and Ellipses",
"version" : "1.0"
var czml = [
{
"id" : "document",
"name" : "CZML Geometries: Circles and Ellipses",
"version" : "1.0"
},
{
"id" : "shape1",
"name" : "Green circle at height",
"position" : {
"cartographicDegrees" : [-111.0, 40.0, 150000.0]
},
{
"id" : "shape1",
"name" : "Green circle at height",
"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]
}
"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]
},
{
"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]
}
"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

}
},
"outline" : true,
"outlineColor" : {
"rgba" : [255, 0, 0, 255]
}
}, {
"id" : "shape3",
"name" : "Blue translucent, rotated, and extruded ellipse with outline",
"position" : {
"cartographicDegrees" : [-95.0, 40.0, 100000.0]
}
}, {
"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
},
"ellipse" : {
"semiMinorAxis" : 150000.0,
"semiMajorAxis" : 300000.0,
"extrudedHeight" : {
"number" : 200000.0
},
"rotation" : {
"number" : 0.78539
},
"material" : {
"solidColor" : {
"color" : {
"rgba" : [0, 0, 255, 127]
}
"material" : {
"solidColor" : {
"color" : {
"rgba" : [0, 0, 255, 127]
}
},
"outline" : true,
"show" : true
}
}
},
"outline" : true
}
];

}
];

var viewer = new Cesium.Viewer('cesiumContainer');
viewer.dataSources.add(Cesium.CzmlDataSource.load(czml));
var viewer = new Cesium.Viewer('cesiumContainer');
var dataSource = Cesium.CzmlDataSource.load(czml);
viewer.dataSources.add(dataSource);
viewer.zoomTo(dataSource);

//Sandcastle_End
Sandcastle.finishedLoading();
Expand Down
Binary file modified Apps/Sandcastle/gallery/CZML Circles and Ellipses.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions Apps/Sandcastle/gallery/CZML Colors.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<!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 Colors">
<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 Colors",
"version" : "1.0"
}, {
"id" : "rgba",
"name" : "Rectangle using RGBA Colors",
"rectangle" : {
"coordinates" : { "wsenDegrees" : [-120, 40, -110, 50] },
"fill" : true,
"material" : {
"solidColor" : {
"color": {
"rgba" : [255, 0, 0, 100]
}
}
},
"outline" : true,
"outlineColor" : {
"rgba" : [0, 0, 0, 255]
}
}
}, {
"id" : "rgbaf",
"name" : "Rectangle using RGBAF Colors",
"rectangle" : {
"coordinates" : { "wsenDegrees" : [-100, 40, -90, 50] },
"fill" : true,
"material" : {
"solidColor" : {
"color": {
"rgbaf" : [1, 0, 0, 0.39]
}
}
},
"outline" : true,
"outlineColor" : {
"rgbaf" : [0, 0, 0, 1]
}
}
}
];

var viewer = new Cesium.Viewer('cesiumContainer');
var dataSource = Cesium.CzmlDataSource.load(czml);
viewer.dataSources.add(dataSource);
viewer.zoomTo(dataSource);

//Sandcastle_End
Sandcastle.finishedLoading();
}
if (typeof Cesium !== "undefined") {
startup(Cesium);
} else if (typeof require === "function") {
require(["Cesium"], startup);
}
</script>
</body>
</html>
Binary file added Apps/Sandcastle/gallery/CZML Colors.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 65eb4bf

Please sign in to comment.