Class: ScanRadar

ScanRadar

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

new ScanRadar(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.ScanRadar(associatedUuid, latlng, options);
  
  // 另一种写法
  L.supermap.plotting.scanRadar(associatedUuid, latlng, options);

  
</script>

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

new ScanRadar(associatedUuid, latlng, options);

leaflet/specialeffect/ScanRadar.js, line 15
Name Type Description
associatedUuid string

关联标号对象的唯一标识符

latlng L.LatLng

扫描雷达位置点

options object

雷达参数。

Name Type Description
period number 可选

扫描周期

startAngle number 可选

扫描开始角度

loop boolean 可选

是否循环扫描

radius number 可选

雷达半径。

radiusUnit RadiusUnitType 可选

雷达半径单位类型(默认为像素)。

style object 可选

雷达样式参数。

scanAngle number 可选

扫描瓣开合角度。

style.centerStyle string 可选

雷达内圆样式。

Name Type Description
weight number 可选

雷达内圆边界线宽

fillColor string 可选

雷达内圆填充色。

opacity string 可选

雷达内圆边界透明度。

color number 可选

雷达内圆边界颜色

fillOpacity number 可选

雷达内圆填充透明度

style.circleStyle.weight number 可选

雷达外圆边界线宽。

style.circleStyle.fillColor number 可选

雷达外圆填充色。

style.circleStyle.fillOpacity string 可选

雷达外圆填充色透明度。

style.circleStyle.color number 可选

雷达外圆边界颜色。

style.circleStyle.opacity number 可选

雷达外圆边界透明度。

style.scanStyle.fillColor number 可选

雷达扫描瓣填充色。

style.scanStyle.fillOpacity number 可选

雷达扫描瓣填充透明度。

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

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

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

Extends

Members

associatedUuidstring

扫描雷达对象关联标号的id。

loopboolean

扫描状态是否循环

periodnumber

扫描瓣扫描一周所用的时间,单位是秒(值越大,扫描速度越慢)

radiusnumber

雷达半径

radiusUnitboolean

雷达半径单位类型(默认为像素)。

startAnglenumber

扫描起始位置角度

styleobject

扫描雷达样式参数

Methods

getPosition()

leaflet/specialeffect/ScanRadar.js, line 341

获取关联位置点坐标

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/ScanRadar.js, line 296

停止扫描雷达特效

play()

leaflet/specialeffect/ScanRadar.js, line 275

播放扫描雷达特效

remove()

leaflet/specialeffect/ScanRadar.js, line 316

摧毁扫描雷达特效

setInnerCircleVisible(visible)

leaflet/specialeffect/ScanRadar.js, line 467

设置内圆显隐

Name Type Description
visible boolean

是否显示

setLoop(loop)

leaflet/specialeffect/ScanRadar.js, line 350

设置雷达扫描是否循环

Name Type Description
loop boolean

是否循环

setName(name)

leaflet/specialeffect/ScanRadar.js, line 431

设置特效名称

Name Type Description
name string

特效名称

setPeriod(period)

leaflet/specialeffect/ScanRadar.js, line 385

设置雷达扫描周期

Name Type Description
period number

扫描周期

setRadius(radius)

leaflet/specialeffect/ScanRadar.js, line 395

设置雷达半径

Name Type Description
radius number

半径

setRadiusUnitType(type)

leaflet/specialeffect/ScanRadar.js, line 414

设置半径单位

Name Type Description
type RadiusUnitType

半径单位

setScanAngle(scanAngle)

leaflet/specialeffect/ScanRadar.js, line 374

设置雷达扫描瓣开合角度

Name Type Description
scanAngle number

扫描瓣开合角度

setStartAngle(angle)

leaflet/specialeffect/ScanRadar.js, line 360

设置雷达扫描起始角度

Name Type Description
angle number

起始角度

setStyle(style)

leaflet/specialeffect/ScanRadar.js, line 483

设置雷达特效样式

Name Type Description
style object

修改属性值

Name Type Description
centerStyle.weight string 可选

雷达内圆边界线宽

centerStyle.fillColor string 可选

雷达内圆填充色

centerStyle.opacity number 可选

雷达内圆边界透明度

centerStyle.color number 可选

雷达内圆边界颜色

centerStyle.fillOpacity number 可选

雷达内圆填充透明度

circleStyle.weight string 可选

雷达外圆边界线宽

circleStyle.fillColor string 可选

雷达外圆填充色

circleStyle.fillOpacity number 可选

雷达外圆填充透明度

circleStyle.color string 可选

雷达外圆边界颜色

circleStyle.opacity number 可选

雷达外圆边界透明度

scanStyle.fillColor string 可选

雷达扫描瓣填充色

scanStyle.fillOpacity number 可选

雷达扫描瓣填充透明度

setVisible(visible)

leaflet/specialeffect/ScanRadar.js, line 441

设置显隐

Name Type Description
visible boolean

是否显示