|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> |
| 7 | + <meta name="description" content="Draw a rectangle or extruded rectangle that conforms to the surface of the globe."> |
| 8 | + <meta name="cesium-sandcastle-labels" content="Geometries,New in 1.45"> |
| 9 | + <title>Cesium Demo</title> |
| 10 | + <script type="text/javascript" src="../Sandcastle-header.js"></script> |
| 11 | + <script type="text/javascript" src="../../../ThirdParty/requirejs-2.1.20/require.js"></script> |
| 12 | + <script type="text/javascript"> |
| 13 | + if(typeof require === "function") { |
| 14 | + require.config({ |
| 15 | + baseUrl : '../../../Source', |
| 16 | + waitSeconds : 120 |
| 17 | + }); |
| 18 | + } |
| 19 | + </script> |
| 20 | +</head> |
| 21 | +<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html"> |
| 22 | +<style> |
| 23 | + @import url(../templates/bucket.css); |
| 24 | +</style> |
| 25 | +<div id="cesiumContainer" class="fullSize"></div> |
| 26 | +<div id="loadingOverlay"><h1>Loading...</h1></div> |
| 27 | +<div id="toolbar"></div> |
| 28 | +<script id="cesium_sandcastle_script"> |
| 29 | +function startup(Cesium) { |
| 30 | + 'use strict'; |
| 31 | +//Sandcastle_Begin |
| 32 | +var viewer = new Cesium.Viewer('cesiumContainer'); |
| 33 | + |
| 34 | +viewer.entities.add({ |
| 35 | + rectangle : { |
| 36 | + coordinates : Cesium.Rectangle.fromDegrees(-110.0, 20.0, -100.5, 30.0), |
| 37 | + material : Cesium.Color.RED, |
| 38 | + zIndex: 1 |
| 39 | + } |
| 40 | +}); |
| 41 | + |
| 42 | +viewer.entities.add({ |
| 43 | + rectangle : { |
| 44 | + coordinates : Cesium.Rectangle.fromDegrees(-112.0, 25.0, -102.5, 35.0), |
| 45 | + material : '../images/Cesium_Logo_Color.jpg', |
| 46 | + zIndex: 2 |
| 47 | + } |
| 48 | +}); |
| 49 | + |
| 50 | +viewer.entities.add({ |
| 51 | + rectangle : { |
| 52 | + coordinates : Cesium.Rectangle.fromDegrees(-110.0, 31.0, -100.5, 41.0), |
| 53 | + material : Cesium.Color.BLUE, |
| 54 | + zIndex: 3 |
| 55 | + } |
| 56 | +}); |
| 57 | + |
| 58 | +viewer.entities.add({ |
| 59 | + rectangle : { |
| 60 | + coordinates : Cesium.Rectangle.fromDegrees(-99.5, 20.0, -90.0, 30.0), |
| 61 | + material : '../images/Cesium_Logo_Color.jpg', |
| 62 | + zIndex: 3 |
| 63 | + } |
| 64 | +}); |
| 65 | + |
| 66 | +viewer.entities.add({ |
| 67 | + rectangle : { |
| 68 | + coordinates : Cesium.Rectangle.fromDegrees(-97.5, 25.0, -88.0, 35.0), |
| 69 | + material : Cesium.Color.GREEN, |
| 70 | + zIndex: 2 |
| 71 | + } |
| 72 | +}); |
| 73 | + |
| 74 | +viewer.entities.add({ |
| 75 | + rectangle : { |
| 76 | + coordinates : Cesium.Rectangle.fromDegrees(-99.5, 31.0, -90.0, 41.0), |
| 77 | + material : Cesium.Color.BLUE, |
| 78 | + zIndex: 1 |
| 79 | + } |
| 80 | +}); |
| 81 | + |
| 82 | +viewer.zoomTo(viewer.entities); |
| 83 | +//Sandcastle_End |
| 84 | + Sandcastle.finishedLoading(); |
| 85 | +} |
| 86 | +if (typeof Cesium !== "undefined") { |
| 87 | + startup(Cesium); |
| 88 | +} else if (typeof require === "function") { |
| 89 | + require(["Cesium"], startup); |
| 90 | +} |
| 91 | +</script> |
| 92 | +</body> |
| 93 | +</html> |
0 commit comments