# 添加

# 功能描述

  • 添加场景天气系统

# 请求方式

gisTwin.UEAPI("WeatherSystem", "Add", jsondata, (e) => {
  console.log(e); //成功、失败回调
});

# 数据格式

let jsondata = {
  id: "DynamicSky", //系统id,必须填写
  time_of_day: 1200 //时间:1200 代表12:00, 800代表8:00(范围:0~2400)
};

# 更新

# 功能描述

  • 更新场景天气类型

# 请求方式

gisTwin.UEAPI("WeatherSystem", "Update", jsondata, (e) => {
  console.log(e); //成功、失败回调
});

# 数据格式

let jsondata = {
  id: "DynamicSky", //系统id,必须填写
  weather_type: 0 //天气类型(范围:0~10)
};

# 参数

参数 类型 对应含义
weather_type int 0:晴空万里 1:部分多云 2:多云 3:阴天 4:雾 5:小雨 6:大雨 7:雷雨 8:小雪 9:大雪 10:暴风雪

# 删除

# 功能描述

  • 删除天气

# 请求方式

gisTwin.UEAPI("WeatherSystem", "Delete", jsondata, (e) => {
  console.log(e); //成功、失败回调
});

# 数据格式

let jsondata = {
  ids: ["DynamicSky"]
};

# 清除

# 功能描述

  • 清除所有天气

# 请求方式

gisTwin.UEAPI("WeatherSystem", "ClearAll", jsondata, (e) => {
  console.log(e); //成功、失败回调
});

# 数据格式

let jsondata = {};

# 简要描述

  • 监听当前天气的状态

# 监听注册


gisTwin.UEAPI("RegisterCloudResponse",myHandleResponseFunction);

# 事件解析

function myHandleResponseFunction(data) {
  switch (data.func_name) {
    case "GetCurrentWeatherSystem":
      update_box_text(event.data); //更新各项天气参数
      break;
  }
}

# 调节

# 功能描述

  • 可根据默认天气类型上,进行调节

# 请求方式

gisTwin.UEAPI("WeatherSystem", "Update", jsondata, (e) => {
  console.log(e); //成功、失败回调
});

# 数据格式

let jsondata = {
  "id" :"DynamicSky",	//系统id,必须填写
  "cloud_coverage":1200	//云的覆盖量(范围:0~10)云越多会影响雨雪的大小
	"wind_intensity":1200	//风的强度(范围:0~10)
	"wind_direction":1200	//风的方向(范围:0~360)
	"rain_snow":1200 //雨雪的偏向(范围:0~1)0代表:雨,1代表:雪 0.5代表雨雪各一半(关系线性)
}

# 更新时间

# 功能描述

  • 更新时间

# 请求方式

gisTwin.UEAPI("WeatherSystem", "Update", jsondata, (e) => {
  console.log(e); //成功、失败回调
});

# 数据格式

let jsondata = {
  id: "DynamicSky", //系统id,必须填写
  time_of_day: 1200 //时间:1200 代表12:00, 800代表8:00(范围:0~2400)
};