CZML interpretation

Multi-loaded CZML


Click to view details

[
  {
    "id":"document",
    "version":"1.0",
    "name": "polygon",
    "clock": {
        "interval": "2012-08-04T16:00:00Z/2012-08-04T16:02:25Z",    //可用日期
        "currentTime": "2012-08-04T16:00:00Z",
        "multiplier": 1,                                            //倍率
        "range": "LOOP_STOP",
        "step": "SYSTEM_CLOCK_MULTIPLIER"                           //间隔为系统时钟乘数,即multiplier
    }
  },
  {
    "id":"Vehicle",
    "availability":"2012-08-04T16:00:00Z/2012-08-04T17:04:54.9962195740191Z",
    "label":{
      "fillColor":[
        {
          "interval":"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",
          "rgba":[
            255,255,0,255
          ]
        }
      ],
      "font":"bold 10pt Segoe UI Semibold",
  
      "outlineColor":{
        "rgba":[
          0,0,0,255
        ]
      },
      "pixelOffset":{
        "cartesian2":[
          0.0,20.0
        ]
      },
      "scale":1.0,
      "show":[
        {
          "interval":"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",
          "boolean":true
        }
      ],
      "style":"FILL",
      "text":"",                                              //这里是写id:Vehicle下方的标注名称
      "verticalOrigin":"CENTER"                               //标注的位置
    },
    "model":{
      "gltf":"http://192.168.34.61/3dmodel/model07/carModel/CesiumMilkTruck.glb"
    },
    "orientation" : {
      "velocityReference": "#position"                        //Vehicle起始位置
    },
    "viewFrom": {                                             // viewer.trackedEntity = vehicleEntity; trackedEntity的初始位置
      "cartesian": [ 15, 15, 6 ]
    },
    "properties" : {
        "fuel_remaining" : {
            "epoch":"2012-08-04T16:00:00Z",
            "number": [
                0, 22.5,
                1500, 21.2
            ]
        }
    },
    "path":{                                                 //路径线条
     "material":{
          "solidColor":{
          "color":{                                          //路径线条颜色
                "interval":"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",
                "rgba":[                          
                  0,0,0,0
                ]
              }
            }
      },
      "width":[
        {
          "interval":"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",
          "number":5.0
        }
      ],
      "show":[
        {
          "interval":"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",
          "boolean":true
        }
      ]
    },
    "position":{
      "interpolationAlgorithm":"LAGRANGE",
      "interpolationDegree":1,
      "epoch":"2012-08-04T16:00:00Z",
      "cartographicDegrees":[
              0.0, 118.22525195311721, 33.943354814814704,21.5,    
            30.0, 118.22548848976206, 33.939025861968496,21.5,   
       
            40.0, 118.22521045077464, 33.939069284654025,21.5,    
            70.0, 118.22199207575197, 33.93907739023684,21.5,    

            80.0, 118.22165758667575, 33.939283697343754,21.5,   
            110.0, 118.22145825367487, 33.94322797450291,21.5,

            112.0, 118.22145825367487, 33.94322797450291,21.5,    
            140.0, 118.2253814737995, 33.94339068209884,21.5
      ]
    }
  }
]


I re-edit


Click to view details


[
  {
    "id":"document",
    "version":"1.0"
  },
  {
    "id":"Vehicle",
    "properties" : {
        "fuel_remaining" : {
            "epoch":"2012-08-04T16:00:00Z",
            "number": [
                3000, 19.9
            ]
        }
    },
    "position":{
      "interpolationAlgorithm":"LAGRANGE",
      "interpolationDegree":1,
      "epoch":"2012-08-04T16:00:00Z",
      "cartographicDegrees":[
        50,118.22700,33.94044,3.0,
        60,118.22700,33.94057,3.0,
        70,118.22699,33.94071,3.0,
        80,118.22695,33.94108,3.0,
        90,118.22690,33.94153,3.0

      ]
    }
  }
]


Cycling path


Click to view details

// 路径循环 非CZML内容
var clock = new Cesium.Clock({
    startTime : Cesium.JulianDate.fromIso8601("2012-08-04T16:00:00Z"),      //这是到具体时间写法,具体日期可以从T开始删除后面的
    currentTime : Cesium.JulianDate.fromIso8601("2012-08-04T16:00:00Z"),
    stopTime : Cesium.JulianDate.fromIso8601("2012-08-04T16:02:25Z"),       //startTime stopTime currentTime 都要与上面的clock.interval日期一致
    clockRange : Cesium.ClockRange.LOOP_STOP,
    clockStep : Cesium.ClockStep.SYSTEM_CLOCK_MULTIPLIER
});


Guess you like

Origin www.cnblogs.com/marvelousone/p/11284453.html