Skip to content

开始

引入 dls-map 并加载 风场

加载风场功能

介绍

加载风场场景

  • 用法
javascript
axios
  .get('../../assets/json/windy/2017121300.json')
  .then((response: any) => {
    dataM.windy = new Windy({
      json: response.data,
      cesiumViewer: dataM.viewer,
      speed: 100,
    });
    dataM.windy.loadWindy();
  })
  .catch((error) => {
    console.error('There was an error!', error);
  });
  • 类型范围
tsx
//类型参数
json: any[]; // 风场数据
cesiumViewer: Cesium.Viewer; // Cesium Viewer 对象
speed: number; //风场的更新频率

风场场景 方法

方法描述参数
loadWindy加载风场
hideWindy隐藏风场
showWindy显示风场
pauseWindy暂停风场
resumeWindy恢复风场
destroyWindy销毁风场