Class: ContinuousLeaks

ContinuousLeaks

ContinuousLeaks类,用于连续泄露模型结果渲染

const contLeaks = new ContinuousLeaks(this.$map);
contLeaks.add([122.140996, 29.952271], {
  xfxrbjl: 289,
  hfxrbzyjldyx: 175,
  hfxrbjl: 42,
  xfxzdjl: 331,
  hfxzdzyjldyx: 200,
  hfxzdjl: 48,
  angle: 90,
  type: "psAndCb",
  isShowPopup: true,
  style: {
    psStyle: {
      fill: {
        color: "red"
      }
    },
    cbStyle: {
      fill: {
        color: "yellow"
      }
    },
    psLineStroke: {
      color: 'red',
      lineDash: [10, 10],
      width: 2
    },
    cbLineStroke: {
      color: 'yellow',
      lineDash: [10, 10],
      width: 2
    },
    psTextStyle: {
      fill: { color: 'red' },
      font: '20px 黑体',
      stroke: {
        color: 'white',
        width: 2
      }
    },
    cbTextStyle: {
      fill: { color: 'yellow' },
      font: '20px 黑体',
      stroke: {
        color: 'white',
        width: 2
      }
    }
  },
  isShowGuide: true,
});

new ContinuousLeaks(map)

app/business/ContinuousLeaks.js, line 78

构造ContinuousLeaks对象

Name Type Description
map *

事故模拟渲染指定的map对象

Extends

Classes

ContinuousLeaks

Methods

add(position, options)

app/business/ContinuousLeaks.js, line 112

添加模拟模型数据,完成在地图渲染

Name Type Description
position Array

事发点坐标

options Object

模拟模型数据以及渲染样式和其他属性

Name Type Default Description
xfxrbjl Number

下风向燃爆局李

hfxrbzyjldyx Number

下风向燃爆最远距离

hfxrbjl Number

下风向燃爆距离

xfxzdjl Number

下风向中毒距离

hfxzdzyjldyx Number

横风向中毒最远距离

hfxzdjl Number

横风向中毒距离

angle Number

角度

type String

泄露类型 可选"psAndCb"|"ps"|"cb" 燃爆与中毒、中毒、燃爆

style Object

渲染样式

Name Type Description
psStyle Object

中毒渲染样式

Name Type Description
fill FillOptions

是否填充颜色

stroke StrokeOptions

填充颜色

cbStyle Object

燃爆渲染样式

Name Type Description
fill FillOptions

是否填充颜色

stroke StrokeOptions

填充颜色

isShowPopup Boolean flase optional

是否弹窗显示模拟信息

animation Animation

事发点动画,有默认值

isShowGuide Boolean false optional

是否显示辅助线

inherited clear()

app/business/Simulate.js, line 44

清空模拟渲染的结果