Skip to content

手动绘制路径

js
CloudApi.SuperAPI("DrawLinearPath",params);

功能描述

获取绘制信息

开启监听事件 Monitor

触发 DrawLinearPath

在 Monitor 回调函数中 可获取 CallBackType = "LinearPathDrawData" 的数据

数据描述

返回的数据为 json 格式

json
{
  "CallBackType": "LinearPathDrawData",
  "Id": "2",
  "CoordType": 0,
  "Points": [
    {
      "Coord": "119.265842,27.043766",
      "Height": 10
    },
    {
      "Coord": "119.266342,27.043766",
      "Height": 10
    },
    {
      "Coord": "119.266542,27.044066",
      "Height": 10
    },
    {
      "Coord": "119.266542,27.044366",
      "Height": 10
    },
    {
      "Coord": "119.266542,27.044666",
      "Height": 10
    }
  ],
  "Color": "FF0000",
  "Width": "20",
  "Type": "History"//两种类型:Arrow(箭头流动)  History(历史路径)
}

参数

js
const params = {
  "Id": "11222",
  "CoordType": 0,
  "Type": "1"   //四种类型: 1,2,3,4
  "Width": 60,
  "Color": "FF0000"

}