Skip to content

Commit

Permalink
Merge pull request #6278 from AnalyticalGraphicsInc/ion-assets-sandca…
Browse files Browse the repository at this point in the history
…stle

Add ion Assets Sandcastle tab and new assets to BaseLayerPicker
  • Loading branch information
Hannah authored Feb 27, 2018
2 parents d3e878d + b9064f4 commit d1e5471
Show file tree
Hide file tree
Showing 24 changed files with 334 additions and 70 deletions.
68 changes: 33 additions & 35 deletions Apps/Sandcastle/gallery/ArcticDEM.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="Visualize high-resolution arctic terrain.">
<meta name="cesium-sandcastle-labels" content="Showcases">
<meta name="description" content="High-resolution arctic terrain from the Arctic DEM project (Release 4) and hosted by Cesium ion.">
<meta name="cesium-sandcastle-labels" content="ion Assets">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
Expand All @@ -27,66 +27,64 @@
function startup(Cesium) {
'use strict';
//Sandcastle_Begin
// High-resolution arctic terrain from the Arctic DEM project (Release 4), tiled and hosted by Cesium ion.
// https://www.pgc.umn.edu/data/arcticdem/
var viewer = new Cesium.Viewer('cesiumContainer', {
// Load ArcticDEM terrain
terrainProvider: new Cesium.CesiumTerrainProvider({
url: 'https://assets.agi.com/stk-terrain/v1/tilesets/ArticDEM/tiles',
requestWaterMask: true,
requestVertexNormals: true
url: Cesium.IonResource.fromAssetId(3956)
})
});

// Add Alaskan locations
Sandcastle.addDefaultToolbarMenu([{
text : 'Denali',
onselect : function() {
text: 'Denali',
onselect: function() {
viewer.scene.camera.flyTo({
destination : Cesium.Cartesian3.fromRadians(-2.6399828792482234, 1.0993550795541742, 5795),
orientation : {
heading : 3.8455,
pitch : -0.4535,
roll : 0.0
destination: Cesium.Cartesian3.fromRadians(-2.6399828792482234, 1.0993550795541742, 5795),
orientation: {
heading: 3.8455,
pitch: -0.4535,
roll: 0.0
}
});
}
}, {
text : 'Anchorage Area',
onselect : function() {
text: 'Anchorage Area',
onselect: function() {
viewer.scene.camera.flyTo({
destination : Cesium.Cartesian3.fromRadians(-2.610708034601548, 1.0671172431736584, 1900),
orientation : {
heading : 4.6,
pitch : -0.341,
roll : 0.0
destination: Cesium.Cartesian3.fromRadians(-2.610708034601548, 1.0671172431736584, 1900),
orientation: {
heading: 4.6,
pitch: -0.341,
roll: 0.0
}
});
}
}, {
text : 'Peaks',
onselect : function() {
text: 'Peaks',
onselect: function() {
viewer.scene.camera.flyTo({
destination : Cesium.Cartesian3.fromRadians(-2.6928866820212813, 1.072394255273859, 3700),
orientation : {
heading : 1.6308222948889464,
pitch : -0.6473480165020193,
roll : 0.0
destination: Cesium.Cartesian3.fromRadians(-2.6928866820212813, 1.072394255273859, 3700),
orientation: {
heading: 1.6308222948889464,
pitch: -0.6473480165020193,
roll: 0.0
}
});
}
}, {
text : 'Riverbed',
onselect : function() {
text: 'Riverbed',
onselect: function() {
viewer.scene.camera.flyTo({
destination : Cesium.Cartesian3.fromRadians(-2.6395623497608596, 1.0976443174490356, 2070),
orientation : {
heading : 6.068794108659519,
pitch : -0.08514161789475816,
roll : 0.0
destination: Cesium.Cartesian3.fromRadians(-2.6395623497608596, 1.0976443174490356, 2070),
orientation: {
heading: 6.068794108659519,
pitch: -0.08514161789475816,
roll: 0.0
}
});
}
}], 'toolbar');

//Sandcastle_End
Sandcastle.finishedLoading();
}
Expand Down
Binary file modified Apps/Sandcastle/gallery/ArcticDEM.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions Apps/Sandcastle/gallery/Blue Marble.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="Blue Marble Next Generation July, 2004 imagery from NASA and hosted by Cesium ion.">
<meta name="cesium-sandcastle-labels" content="ion Assets">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/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
// Blue Marble Next Generation July, 2004 imagery from NASA
var viewer = new Cesium.Viewer('cesiumContainer', {
imageryProvider: new Cesium.IonImageryProvider({ assetId: 3845 })
});
//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/Blue Marble.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions Apps/Sandcastle/gallery/Cesium World Terrain.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion.">
<meta name="cesium-sandcastle-labels" content="ion Assets">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/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
// For more information on Cesium World Terrain, see https://cesium.com/content/cesiumworldterrain
var viewer = new Cesium.Viewer('cesiumContainer', {
terrainProvider: Cesium.createWorldTerrain()
});
//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/Cesium World Terrain.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions Apps/Sandcastle/gallery/Earth at Night.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="NASA-generated imagery of the earth at night hosted on Cesium ion. Also known as Black Marble and Night Lights.">
<meta name="cesium-sandcastle-labels" content="ion Assets">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/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
// The Earth at Night, also known as Black Marble 2017 and Night Lights
var viewer = new Cesium.Viewer('cesiumContainer', {
imageryProvider: new Cesium.IonImageryProvider({ assetId: 3812 })
});
//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/Earth at Night.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Apps/Sandcastle/gallery/Google Earth Enterprise.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 2 additions & 6 deletions Apps/Sandcastle/gallery/Imagery Layers Split.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,8 @@
});

var layers = viewer.imageryLayers;
var blackMarble = layers.addImageryProvider(Cesium.createTileMapServiceImageryProvider({
url : 'https://cesiumjs.org/blackmarble',
credit : 'Black Marble imagery courtesy NASA Earth Observatory',
flipXY : true // Only old gdal2tile.py generated tilesets need this flag.
}));
blackMarble.splitDirection = Cesium.ImagerySplitDirection.LEFT; // Only show to the left of the slider.
var earthAtNight = layers.addImageryProvider(new Cesium.IonImageryProvider({ assetId: 3812 }));
earthAtNight.splitDirection = Cesium.ImagerySplitDirection.LEFT; // Only show to the left of the slider.

// Sync the position of the slider with the split position
var slider = document.getElementById('slider');
Expand Down
10 changes: 3 additions & 7 deletions Apps/Sandcastle/gallery/Imagery Layers.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@
});

var layers = viewer.imageryLayers;
var blackMarble = layers.addImageryProvider(Cesium.createTileMapServiceImageryProvider({
url : 'https://cesiumjs.org/blackmarble',
credit : 'Black Marble imagery courtesy NASA Earth Observatory',
flipXY : true // Only old gdal2tile.py generated tilesets need this flag.
}));
blackMarble.alpha = 0.5;
blackMarble.brightness = 2.0;
var earthAtNight = layers.addImageryProvider(new Cesium.IonImageryProvider({ assetId: 3812 }));
earthAtNight.alpha = 0.5;
earthAtNight.brightness = 2.0;

layers.addImageryProvider(new Cesium.SingleTileImageryProvider({
url : '../images/Cesium_Logo_overlay.png',
Expand Down
44 changes: 44 additions & 0 deletions Apps/Sandcastle/gallery/Natural Earth II.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="Natural Earth II with Shaded Relief, Water, and Drainages hosted by Cesium ion.">
<meta name="cesium-sandcastle-labels" content="ion Assets">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/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
// Natural Earth II with Shaded Relief, Water, and Drainages from http://www.naturalearthdata.com
var viewer = new Cesium.Viewer('cesiumContainer', {
imageryProvider: new Cesium.IonImageryProvider({ assetId: 3813 })
});
//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/Natural Earth II.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="description" content="Visualize worldwide, high-resolution terrain.">
<meta name="cesium-sandcastle-labels" content="Showcases">
<meta name="description" content="High resolution terrain of Pennsylvania curated by PASDA and hosted on Cesium ion.">
<meta name="cesium-sandcastle-labels" content="ion Assets">
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script>
Expand All @@ -27,12 +27,11 @@
function startup(Cesium) {
'use strict';
//Sandcastle_Begin
// High resolution terrain of Pennsylvania curated by Pennsylvania Spatial Data Access (PASDA)
// http://www.pasda.psu.edu/
var viewer = new Cesium.Viewer('cesiumContainer', {
// Load PA terrain
terrainProvider: new Cesium.CesiumTerrainProvider({
url: 'https://assets.agi.com/stk-terrain/v1/tilesets/PAMAP/tiles',
requestWaterMask: true,
requestVertexNormals: true
url: Cesium.IonResource.fromAssetId(3957)
})
});

Expand Down Expand Up @@ -98,7 +97,6 @@
});
}
}], 'toolbar');

//Sandcastle_End
Sandcastle.finishedLoading();
}
Expand Down
File renamed without changes
Loading

0 comments on commit d1e5471

Please sign in to comment.