CZML解读

多段加载CZML

点击查看详细内容

[
  {
    "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
      ]
    }
  }
]


重新编辑我

点击查看详细内容


[
  {
    "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

      ]
    }
  }
]


循环路径

点击查看详细内容

// 路径循环 非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
});


转载于:https://www.cnblogs.com/marvelousone/p/11284453.html

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值