Class: Boom

Boom

爆炸特效,分为两类,第一类通过标号uuid进行创建与标号绑定的特效,由标号内部管理,直接创建后可以通过DotSymbol#getSpecialEffects进行获取;第二类可以通过位置点创建,由特效管理器进行管理, 可以直接创建后使用SpecialEffectManager#addSpecialEffect接口加入管理器进行管理,也可以通过SpecialEffectManager#createBoomByPosition创建,还可以通过MovingTargetLayer#createBoomByPosition创建。

new Boom(associatedUuid, latlng, options)

Usage
// 浏览器
<script type="text/javascript" src="../../web/libs/plotting/leaflet/11.3.0/iclient-plot-leaflet-es6.min.js"></script>
<script>
  new L.supermap.plotting.Boom(associatedUuid, latlng, options);
  
  // 另一种写法
  L.supermap.plotting.boom(associatedUuid, latlng, options);

  
</script>

// ES6 Import
import { Boom } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';

new Boom(associatedUuid, latlng, options);

leaflet/specialeffect/Boom.js, line 28
Name Type Description
associatedUuid string

关联标号uuid

latlng L.LatLng

位置点

options object

爆炸参数

Name Type Description
loop boolean 可选

爆炸是否循环

boomTimes number 可选

爆炸次数

Version:
  • 11.2.0
Example
//方式一,创建与标号绑定的特效,由标号内部进行管理
  var boom = L.supermap.plotting.boom(associatedUuid, null, options);

  //方式二, 使用管理器创建
  var specialEffectManager = L.supermap.plotting.getControl().getSpecialEffectManager();
  var boom = specialEffectManager.createBoomByPosition(position, options);

  //方式三, 在动目标图层上使用接口创建
  var movingTargetLayer = L.supermap.plotting.movingTargetLayer("movingTarget", serverUrl);;
  var boom = movingTargetLayer.createBoomByPosition(position, options);

Extends

Members

loopboolean

是否循环爆炸,若为true,则爆炸次数不生效

Methods

getPosition()

leaflet/specialeffect/Boom.js, line 306

获取关联位置点坐标

inherited getType(){SpecialEffectType}

leaflet/specialeffect/BaseEffect.js, line 79

获取特效类型

Returns:
Type Description
SpecialEffectType 返回特效类型

inherited getUuid(){string}

leaflet/specialeffect/BaseEffect.js, line 69

获取特效唯一标识符

Returns:
Type Description
string 特效uuid

pause()

leaflet/specialeffect/Boom.js, line 259

暂停播放爆炸特效

play()

leaflet/specialeffect/Boom.js, line 223

播放爆炸特效

remove()

leaflet/specialeffect/Boom.js, line 276

摧毁爆炸特效

setBoomTimes(boomTimes)

leaflet/specialeffect/Boom.js, line 315

设置爆炸次数

Name Type Description
boomTimes number

爆炸次数

setLoop(loop)

leaflet/specialeffect/Boom.js, line 325

设置爆炸是否循环,当爆炸循环时, 爆炸次数则不生效

Name Type Description
loop boolean

爆炸是否循环

setName(name)

leaflet/specialeffect/Boom.js, line 335

设置特效名称

Name Type Description
name string

特效名称

setVisible(visible)

leaflet/specialeffect/Boom.js, line 345

设置显隐

Name Type Description
visible boolean

是否显示