1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
| const czml = [ { id: "document", name: "CZML Polygon - Interpolating References", version: "1.0", clock: { interval: "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z", currentTime: "2012-08-04T16:00:00Z", multiplier: 240, }, }, { id: "dynamicPolygon", name: "Dynamic Polygon with Reference Properties", availability: "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z", polygon: { positions: { references: ["v1#position", "v2#position", "v3#position"], }, perPositionHeight: true, material: { solidColor: { color: [ { interval: "2012-08-04T16:00:00Z/2012-08-04T16:25:00Z", rgbaf: [1, 0, 1, 1], }, { interval: "2012-08-04T16:30:00Z/2012-08-04T17:00:00Z", rgbaf: [0, 1, 1, 1], }, ], }, }, }, }, { id: "v1", position: { interpolationAlgorithm: "LINEAR", interpolationDegree: 1, interval: "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z", epoch: "2012-08-04T16:00:00Z", cartographicDegrees: [ 0, -60, 35, 30000, 160, -65, 35, 5000000, 400, -70, 40, 20000, 800, -62, 45, 200000, 1800, -65, 40, 650000, 3600, -60, 35, 3000, ], }, }, { id: "v2", position: { interval: "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z", cartographicDegrees: [-45.0, 20, 4000000], }, }, { id: "v3", position: { interpolationAlgorithm: "LINEAR", interpolationDegree: 1, interval: "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z", epoch: "2012-08-04T16:00:00Z", cartographicDegrees: [ 0, -45, 60, 4000, 400, -40, 70, 2000000, 1000, -35, 75, 100000, 3600, -45, 65, 3000, ], }, }, { id: "Polygon with Dynamic Holes", polygon: { positions: { cartographicDegrees: [-110, 43, 0, -90, 43, 0, -90, 30, 0, -110, 30, 0], }, holes: { references: [ ["target4#position", "target5#position", "target6#position"], ], }, material: { solidColor: { color: { rgba: [255, 150, 0, 255], }, }, }, }, }, { id: "target4", position: { interpolationAlgorithm: "LINEAR", interpolationDegree: 1, interval: "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z", epoch: "2012-08-04T16:00:00Z", cartographicDegrees: [0, -100, 41, 0, 3600, -95, 41, 0], }, }, { id: "target5", position: { interpolationAlgorithm: "LINEAR", interpolationDegree: 1, interval: "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z", epoch: "2012-08-04T16:00:00Z", cartographicDegrees: [0, -92, 42, 0, 3600, -92, 36, 0], }, }, { id: "target6", position: { interpolationAlgorithm: "LINEAR", interpolationDegree: 1, interval: "2012-08-04T16:00:00Z/2012-08-04T17:00:00Z", epoch: "2012-08-04T16:00:00Z", cartographicDegrees: [0, -95, 37, 0, 3600, -108, 38, 0], }, }, ];
const viewer = new Cesium.Viewer("cesiumContainer", { shouldAnimate: true, });
viewer.dataSources.add(Cesium.CzmlDataSource.load(czml));
|