Extremely simple CZML example

Does anyone have an examples for how to get data from an extremely simple CZML loaded onto a CesiumWidget (preferably not the viewer). I'm basically just trying to draw some polygons on the map. Nothing would change based on time. For example, here's the CZML I'd like to render:

        "id": "MyTestData",
        "polygon": {
            "material": {
                "solidColor": {
                    "color": {
                        "rgba": [
        "vertexPositions": {
            "cartographicDegrees": [

Take a look at the “Client CZML” Sandcastle example:


I was able to paste your CZML into the editor as the value of var czml and run it with F8.

Thanks. Is there any way I can do with without the viewer though?

The easiest way for you would probably be the new DataSource abstraction. I’ll post some code in a few minutes.

Here is a complete example which shows your CZML. If you copy and paste this as a replacement to HelloWorld.html, you should be good to go. You’ll probably have to tweak the paths to Cesium.js and CesiumWidget.css depending on if you are using a release or git version of Cesium. Let me know if you have problems getting this running.

<title>Hello World!</title>

<script type="text/javascript" src="../Build/Cesium/Cesium.js"></script>


  @import url(../Build/Cesium/Widgets/CesiumWidget/CesiumWidget.css);

  body {

    padding: 0;

    margin: 0;

    overflow: hidden;



This is perfect. Thank you.

Here’s an updated example: