|
| 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="CZML Z-indexing"> |
| 8 | + <meta name="cesium-sandcastle-labels" content="CZML"> |
| 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 | + |
| 29 | +<script id="cesium_sandcastle_script"> |
| 30 | +function startup(Cesium) { |
| 31 | + 'use strict'; |
| 32 | +//Sandcastle_Begin |
| 33 | +var czml = [{ |
| 34 | + "id" : "document", |
| 35 | + "name" : "CZML zIndex", |
| 36 | + "version" : "1.0" |
| 37 | +}, { |
| 38 | + "id" : "shape1", |
| 39 | + "name" : "Blue circle", |
| 40 | + "position" : { |
| 41 | + "cartographicDegrees" : [-105.0, 40.0, 0.0] |
| 42 | + }, |
| 43 | + "ellipse" : { |
| 44 | + "semiMinorAxis" : 300000.0, |
| 45 | + "semiMajorAxis" : 300000.0, |
| 46 | + "zIndex" : 3, |
| 47 | + "material" : { |
| 48 | + "solidColor" : { |
| 49 | + "color" : { |
| 50 | + "rgba" : [0, 0, 255, 255] |
| 51 | + } |
| 52 | + } |
| 53 | + } |
| 54 | + } |
| 55 | +}, { |
| 56 | + "id" : "shape2", |
| 57 | + "name" : "Green corridor", |
| 58 | + "corridor" : { |
| 59 | + "positions" : { |
| 60 | + "cartographicDegrees" : [ |
| 61 | + -90.0, 43.0, 0, |
| 62 | + -95.0, 43.0, 0, |
| 63 | + -95.0, 38.0, 0 |
| 64 | + ] |
| 65 | + }, |
| 66 | + "width" : 200000.0, |
| 67 | + "zIndex" : 3, |
| 68 | + "material" : { |
| 69 | + "solidColor" : { |
| 70 | + "color" : { |
| 71 | + "rgba" : [0, 255, 0, 255] |
| 72 | + } |
| 73 | + } |
| 74 | + } |
| 75 | + } |
| 76 | +}, { |
| 77 | + "id" : "shape3", |
| 78 | + "name" : "Red polygon", |
| 79 | + "polygon" : { |
| 80 | + "positions" : { |
| 81 | + "cartographicDegrees" : [ |
| 82 | + -115.0, 47.0, 0, |
| 83 | + -115.0, 42.0, 0, |
| 84 | + -107.0, 43.0, 0, |
| 85 | + -102.0, 41.0, 0, |
| 86 | + -102.0, 45.0, 0 |
| 87 | + ] |
| 88 | + }, |
| 89 | + "zIndex" : 1, |
| 90 | + "material" : { |
| 91 | + "solidColor" : { |
| 92 | + "color" : { |
| 93 | + "rgba" : [255, 0, 0, 255] |
| 94 | + } |
| 95 | + } |
| 96 | + } |
| 97 | + } |
| 98 | +}, { |
| 99 | + "id" : "shape4", |
| 100 | + "name" : "Striped rectangle", |
| 101 | + "rectangle" : { |
| 102 | + "coordinates" : { |
| 103 | + "wsenDegrees" : [-105, 40, -95, 50] |
| 104 | + }, |
| 105 | + "zIndex" : 2, |
| 106 | + "fill" : true, |
| 107 | + "material" : { |
| 108 | + "stripe" : { |
| 109 | + "orientation" : "VERTICAL", |
| 110 | + "evenColor" : { "rgba" : [255, 255, 0, 255] }, |
| 111 | + "oddColor" : { "rgba" : [255, 0, 255, 255] }, |
| 112 | + "repeat" : 5 |
| 113 | + } |
| 114 | + } |
| 115 | + } |
| 116 | +}]; |
| 117 | + |
| 118 | +var viewer = new Cesium.Viewer('cesiumContainer'); |
| 119 | +var dataSourcePromise = Cesium.CzmlDataSource.load(czml); |
| 120 | +viewer.dataSources.add(dataSourcePromise); |
| 121 | +viewer.zoomTo(dataSourcePromise); |
| 122 | + |
| 123 | + //Sandcastle_End |
| 124 | + Sandcastle.finishedLoading(); |
| 125 | +} |
| 126 | +if (typeof Cesium !== "undefined") { |
| 127 | + startup(Cesium); |
| 128 | +} else if (typeof require === "function") { |
| 129 | + require(["Cesium"], startup); |
| 130 | +} |
| 131 | +</script> |
| 132 | +</body> |
| 133 | +</html> |
0 commit comments