new SpecialEffectManager()
Usage
// 浏览器
<script type="text/javascript" src="../../web/libs/plotting/leaflet/11.2.0/iclient-plot-leaflet-es6.min.js"></script>
<script>
//推荐用法,通过Plotting对象获取
L.supermap.plotting.getControl(map, serverUrl).getSpecialEffectManager();
//直接创建
new L.supermap.plotting.SpecialEffectManager(name, options);
// 另一种写法
L.supermap.plotting.specialEffectManager(name, options);
</script>
// ES6 Import
import { SpecialEffectManager } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';
new SpecialEffectManager(name, options);
- Version:
- 11.2.0
Example
var host = "https://iserver.supermap.io";
var url = host + "/iserver/services/map-china400/rest/maps/China_4326";
var serverUrl = host + "/iserver/services/plot-jingyong/rest/plot/";
var map = L.map('map', {
preferCanvas: true,
crs: L.CRS.EPSG4326,
center: [37.6171875, 109.3359375],
maxZoom: 18,
zoom: 4
});
var symbolLibManager = L.supermap.plotting.getControl(map, serverUrl).getSpecialEffectManager();
Members
-
specialEffectListobject
-
特效列表。
-
specialEffectListByTypeobject
-
按类型存储标号列表。
Methods
-
addSpecialEffect(specialEffectObj)
leaflet/plot/SpecialEffectManager.js, line 286 -
创建特效对象后,添加至特效管理器进行管理
Name Type Description specialEffectObj
Aim | Boom | CommunicationLink | Destroy | ScanRadar | SectorDetectionRange 特效对象
-
createAimByPosition(viewLatLng, aimLatLng, options){Aim}
leaflet/plot/SpecialEffectManager.js, line 255 -
通过位置点创建瞄准特效
Name Type Description viewLatLng
L.LatLng 观察点位置点
aimLatLng
L.LatLng 瞄准点位置点
options
object 瞄准参数
Name Type Description loop
Object 可选 瞄准闪烁是否循环。
barkTimes
Object 可选 瞄准闪烁次数,若循环则不生效。
barkInterval
Object 可选 瞄准闪烁间隔时间,单为毫秒
radius
number 可选 瞄准对象半径
radiusUnit
boolean 可选 瞄准圆半径单位类型(默认为像素)。
style
Object 可选 瞄准样式。
Name Type Description aimTargetColor
string 可选 瞄准颜色。
aimLineColor
string 可选 瞄准线颜色。
aimLineWeight
number 可选 瞄准线线宽。
aimLineOpacity
number 可选 瞄准线透明度。
aimLineDashArray
number 可选 瞄准线虚线间隔长度。
Returns:
Type Description Aim 返回瞄准对象 -
createBoomByPosition(latlng, options){Boom}
leaflet/plot/SpecialEffectManager.js, line 232 -
通过位置点创建爆炸特效
Name Type Description latlng
L.LatLng 爆炸位置点
options
object 爆炸参数
Name Type Description boomTimes
object 可选 爆炸次数
Returns:
Type Description Boom 返回爆炸对象 -
createCommunicationLinkByPosition(senderLatLng, receiverLatLng, options){CommunicationLink}
leaflet/plot/SpecialEffectManager.js, line 84 -
通过起始点创建通讯链路特效
Name Type Description senderLatLng
L.LatLng 通讯链路发送信号位置点
receiverLatLng
L.LatLng 通讯链路接收信号位置点
options
object 链路参数
Name Type Description dashSpeed
number 可选 通讯链路移动速度。
style
Object 可选 通讯链路样式。
Name Type Description weight
number 可选 通讯链路线宽。
movePathColor
string 可选 通讯链路移动线路颜色。
movePathOpacity
number 可选 通讯链路移动线路透明度。
dashArray
string 可选 通讯链路短线与间隔的长度。
staticPathColor
string 可选 通讯链路静态线路颜色。
staticPathOpacity
number 可选 通讯链路静态线路透明度。
Returns:
Type Description CommunicationLink 返回通讯链路对象 -
createMonitoringRadar(associatedUuid, options){MonitoringRadar}
leaflet/plot/SpecialEffectManager.js, line 209 -
通过目标uuid创建多目标监控雷达特效
Name Type Description associatedUuid
String 多目标监控雷达关联标号uuid
options
object 多目标监控雷达参数
Name Type Description radius
number 可选 多目标监控雷达半径。
radiusUnit
RadiusUnitType 可选 多目标监控雷达半径单位类型(默认为米)。
radarStyle
GradientMonitoringRadarStyle 可选 多目标监控雷达样式对象,例:L.supermap.plotting.gradientMonitoringRadarStyle({innerColor: "#000000",outerColor: "#000000",innerOpacity: 0,outerOpacity: 0.9,ratioRadius: 0.5})。
Returns:
Type Description MonitoringRadar 返回多目标监控雷达对象 -
createMonitoringRadarByPosition(latlng, options){MonitoringRadar}
leaflet/plot/SpecialEffectManager.js, line 186 -
通过位置点创建多目标监控雷达特效
Name Type Description latlng
L.LatLng 多目标监控雷达位置点
options
object 多目标监控雷达参数
Name Type Description radius
number 可选 多目标监控雷达半径。
radiusUnit
RadiusUnitType 可选 多目标监控雷达半径单位类型(默认为米)。
radarStyle
GradientMonitoringRadarStyle 可选 多目标监控雷达样式对象,例:L.supermap.plotting.gradientMonitoringRadarStyle({innerColor: "#000000",outerColor: "#000000",innerOpacity: 0,outerOpacity: 0.9,ratioRadius: 0.5})。
Returns:
Type Description MonitoringRadar 返回多目标监控雷达对象 -
createScanRadarByPosition(latlng, options){ScanRadar}
leaflet/plot/SpecialEffectManager.js, line 146 -
通过位置点创建雷达扫描特效
Name Type Description latlng
L.LatLng 扫描雷达位置点
options
object 雷达参数
Name Type Description period
number 可选 扫描周期
startAngle
number 可选 扫描开始角度
loop
boolean 可选 是否循环扫描
radius
number 可选 雷达半径。
radiusUnit
boolean 可选 雷达半径单位类型(默认为像素)。
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 可选 雷达扫描瓣填充透明度。
Returns:
Type Description ScanRadar 返回雷达对象 -
createSectorDetectionRangeByPosition(latlng, options){SectorDetectionRange}
leaflet/plot/SpecialEffectManager.js, line 113 -
通过位置点创建扇形扫描特效
Name Type Description latlng
L.LatLng 创建扇形扫描位置点
options
object 链路参数
Name Type Description angle
string 可选 扇形开合角度
scanAngle
string 可选 扫描瓣开合角度
radius
number 可选 扇形扫描半径
radiusUnit
boolean 可选 扇形半径单位类型(默认为像素)。
style
Object 可选 扇形风格参数。
Name Type Description fillColor
string 可选 扇形填充色。
fillOpacity
string 可选 扇形填充透明度。
opacity
number 可选 扇形边界透明度。
color
number 可选 扇形边界颜色。
scanStyle
Object 可选 扫描风格参数。
Name Type Description fillColor
string 可选 扫描填充色。
fillOpacity
string 可选 扇形扫描填充透明度。
color
number 可选 扇形扫描边界颜色。
opacity
number 可选 扇形扫描边界透明度。
Returns:
Type Description SectorDetectionRange 返回扇形扫描对象 -
getSpecialEffectByType(type){array}
leaflet/plot/SpecialEffectManager.js, line 588 -
通过特效类型获取相关特效
Name Type Description type
SpecialEffectType 特效类型
Returns:
Type Description array 返回特效对象数组 -
getSpecialEffectByUuid(uuid){object}
leaflet/plot/SpecialEffectManager.js, line 626 -
根据特效uuid获取特效对象
Name Type Description uuid
string 特效对象唯一标识符
Returns:
Type Description object 返回特效对象 -
getSpecialEffectList(){array}
leaflet/plot/SpecialEffectManager.js, line 574 -
获取管理器内所有特效对象
Returns:
Type Description array 返回特效对象数组 -
removeAllEffects()
leaflet/plot/SpecialEffectManager.js, line 361 -
移除所有特效对象
-
removeSpecialEffect(uuid)
leaflet/plot/SpecialEffectManager.js, line 374 -
根据特效uuid移除特效对象
Name Type Description uuid
string 特效对象唯一标识符
-
selectedSpecialEffect(specialeffect)
leaflet/plot/SpecialEffectManager.js, line 337 -
选中特效
Name Type Description specialeffect
Aim | Boom | CommunicationLink | Destroy | ScanRadar | SectorDetectionRange 特效对象
-
unSelectedSpecialEffect(specialeffect)
leaflet/plot/SpecialEffectManager.js, line 349 -
取消选中特效
Name Type Description specialeffect
Aim | Boom | CommunicationLink | Destroy | ScanRadar | SectorDetectionRange 特效对象