115 lines
4.3 KiB
HTML
115 lines
4.3 KiB
HTML
<!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, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
|
|
<meta name="description" content="Create imagery layers from multiple sources.">
|
|
<title>Cesium Demo</title>
|
|
<script type="text/javascript" src="../Sandcastle-header.js"></script>
|
|
<script data-dojo-config="async: 1, tlmSiblingOfDojo: 0" src="../../../ThirdParty/dojo-release-1.7.2-src/dojo/dojo.js"></script>
|
|
<script type="text/javascript">
|
|
require({
|
|
baseUrl : '../../..',
|
|
packages: [
|
|
{ name: 'dojo', location: 'ThirdParty/dojo-release-1.7.2-src/dojo' },
|
|
{ name: 'dijit', location: 'ThirdParty/dojo-release-1.7.2-src/dijit' },
|
|
{ name: 'dojox', location: 'ThirdParty/dojo-release-1.7.2-src/dojox' },
|
|
{ name: 'Assets', location: 'Source/Assets' },
|
|
{ name: 'Core', location: 'Source/Core' },
|
|
{ name: 'DynamicScene', location: 'Source/DynamicScene' },
|
|
{ name: 'Renderer', location: 'Source/Renderer' },
|
|
{ name: 'Scene', location: 'Source/Scene' },
|
|
{ name: 'Shaders', location: 'Source/Shaders' },
|
|
{ name: 'ThirdParty', location: 'Source/ThirdParty' },
|
|
{ name: 'Widgets', location: 'Source/Widgets' },
|
|
{ name: 'Workers', location: 'Source/Workers' }
|
|
]
|
|
});
|
|
</script>
|
|
<link rel="Stylesheet" href="../../../ThirdParty/dojo-release-1.7.2-src/dijit/themes/claro/claro.css" type="text/css">
|
|
<link rel="Stylesheet" href="../../../Source/Widgets/Dojo/CesiumViewerWidget.css" type="text/css">
|
|
</head>
|
|
<body class="claro" data-sandcastle-bucket="bucket-dojo.html" data-sandcastle-title="Cesium + Dojo">
|
|
<style>
|
|
body {
|
|
background: #000;
|
|
color: #eee;
|
|
font-family: sans-serif;
|
|
font-size: 9pt;
|
|
padding: 0;
|
|
margin: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
}
|
|
.fullSize {
|
|
display: block;
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
border: none;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
#toolbar {
|
|
margin: 5px;
|
|
padding: 2px 5px;
|
|
position: absolute;
|
|
}
|
|
</style>
|
|
|
|
<div id="cesiumContainer" class="fullSize"></div>
|
|
<div id="toolbar">Loading...</div>
|
|
<script id="cesium_sandcastle_script">
|
|
require([
|
|
'Source/Cesium', 'Widgets/Dojo/CesiumViewerWidget',
|
|
'dojo/on', 'dojo/dom', 'dojo/io-query'
|
|
], function(
|
|
Cesium, CesiumViewerWidget,
|
|
on, dom, ioQuery)
|
|
{
|
|
"use strict";
|
|
|
|
// Ask Dojo to parse URL configuration options
|
|
var endUserOptions = {};
|
|
if (window.location.search) {
|
|
endUserOptions = ioQuery.queryToObject(window.location.search.substring(1));
|
|
}
|
|
|
|
// Initialize a viewer capable of drag-and-drop
|
|
// and user customizations.
|
|
var widget = new CesiumViewerWidget({
|
|
endUserOptions : endUserOptions,
|
|
enableDragDrop : true
|
|
});
|
|
widget.placeAt(dom.byId('cesiumContainer'));
|
|
widget.startup();
|
|
dom.byId('toolbar').innerHTML = '';
|
|
|
|
var layers = widget.centralBody.getImageryLayers();
|
|
layers.removeAll();
|
|
layers.addImageryProvider(new Cesium.ArcGisMapServerImageryProvider({
|
|
url : 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer',
|
|
proxy : new Cesium.DefaultProxy('/proxy/')
|
|
}));
|
|
var blackMarble = layers.addImageryProvider(new Cesium.TileMapServiceImageryProvider({
|
|
url : 'http://cesium.agi.com/blackmarble',
|
|
maximumLevel : 8,
|
|
credit : 'Black Marble imagery courtesy NASA Earth Observatory'
|
|
}));
|
|
blackMarble.alpha = 0.5;
|
|
blackMarble.brightness = 2.0;
|
|
layers.addImageryProvider(new Cesium.SingleTileImageryProvider({
|
|
url : '../images/Cesium_Logo_overlay.png',
|
|
extent : new Cesium.Extent(
|
|
Cesium.Math.toRadians(-75.0),
|
|
Cesium.Math.toRadians(28.0),
|
|
Cesium.Math.toRadians(-67.0),
|
|
Cesium.Math.toRadians(29.75))
|
|
}));
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|