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 specialEffectObjAim | Boom | CommunicationLink | Destroy | ScanRadar | SectorDetectionRange 特效对象
-
createAimByPosition(viewLatLng, aimLatLng, options){Aim}
leaflet/plot/SpecialEffectManager.js, line 255 -
通过位置点创建瞄准特效
Name Type Description viewLatLngL.LatLng 观察点位置点
aimLatLngL.LatLng 瞄准点位置点
optionsobject 瞄准参数
Name Type Description loopObject 可选 瞄准闪烁是否循环。
barkTimesObject 可选 瞄准闪烁次数,若循环则不生效。
barkIntervalObject 可选 瞄准闪烁间隔时间,单为毫秒
radiusnumber 可选 瞄准对象半径
radiusUnitboolean 可选 瞄准圆半径单位类型(默认为像素)。
styleObject 可选 瞄准样式。
Name Type Description aimTargetColorstring 可选 瞄准颜色。
aimLineColorstring 可选 瞄准线颜色。
aimLineWeightnumber 可选 瞄准线线宽。
aimLineOpacitynumber 可选 瞄准线透明度。
aimLineDashArraynumber 可选 瞄准线虚线间隔长度。
Returns:
Type Description Aim 返回瞄准对象 -
createBoomByPosition(latlng, options){Boom}
leaflet/plot/SpecialEffectManager.js, line 232 -
通过位置点创建爆炸特效
Name Type Description latlngL.LatLng 爆炸位置点
optionsobject 爆炸参数
Name Type Description boomTimesobject 可选 爆炸次数
Returns:
Type Description Boom 返回爆炸对象 -
createCommunicationLinkByPosition(senderLatLng, receiverLatLng, options){CommunicationLink}
leaflet/plot/SpecialEffectManager.js, line 84 -
通过起始点创建通讯链路特效
Name Type Description senderLatLngL.LatLng 通讯链路发送信号位置点
receiverLatLngL.LatLng 通讯链路接收信号位置点
optionsobject 链路参数
Name Type Description dashSpeednumber 可选 通讯链路移动速度。
styleObject 可选 通讯链路样式。
Name Type Description weightnumber 可选 通讯链路线宽。
movePathColorstring 可选 通讯链路移动线路颜色。
movePathOpacitynumber 可选 通讯链路移动线路透明度。
dashArraystring 可选 通讯链路短线与间隔的长度。
staticPathColorstring 可选 通讯链路静态线路颜色。
staticPathOpacitynumber 可选 通讯链路静态线路透明度。
Returns:
Type Description CommunicationLink 返回通讯链路对象 -
createMonitoringRadar(associatedUuid, options){MonitoringRadar}
leaflet/plot/SpecialEffectManager.js, line 209 -
通过目标uuid创建多目标监控雷达特效
Name Type Description associatedUuidString 多目标监控雷达关联标号uuid
optionsobject 多目标监控雷达参数
Name Type Description radiusnumber 可选 多目标监控雷达半径。
radiusUnitRadiusUnitType 可选 多目标监控雷达半径单位类型(默认为米)。
radarStyleGradientMonitoringRadarStyle 可选 多目标监控雷达样式对象,例: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 latlngL.LatLng 多目标监控雷达位置点
optionsobject 多目标监控雷达参数
Name Type Description radiusnumber 可选 多目标监控雷达半径。
radiusUnitRadiusUnitType 可选 多目标监控雷达半径单位类型(默认为米)。
radarStyleGradientMonitoringRadarStyle 可选 多目标监控雷达样式对象,例: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 latlngL.LatLng 扫描雷达位置点
optionsobject 雷达参数
Name Type Description periodnumber 可选 扫描周期
startAnglenumber 可选 扫描开始角度
loopboolean 可选 是否循环扫描
radiusnumber 可选 雷达半径。
radiusUnitboolean 可选 雷达半径单位类型(默认为像素)。
styleObject 可选 雷达样式参数。
scanAnglenumber 可选 扫描瓣开合角度。
style.centerStylestring 可选 雷达内圆样式。
Name Type Description weightnumber 可选 雷达内圆边界线宽
fillColorstring 可选 雷达内圆填充色。
opacitystring 可选 雷达内圆边界透明度。
colornumber 可选 雷达内圆边界颜色
fillOpacitynumber 可选 雷达内圆填充透明度
style.circleStyle.weightnumber 可选 雷达外圆边界线宽。
style.circleStyle.fillColornumber 可选 雷达外圆填充色。
style.circleStyle.fillOpacitystring 可选 雷达外圆填充色透明度。
style.circleStyle.colornumber 可选 雷达外圆边界颜色。
style.circleStyle.opacitynumber 可选 雷达外圆边界透明度。
style.scanStyle.fillColornumber 可选 雷达扫描瓣填充色。
style.scanStyle.fillOpacitynumber 可选 雷达扫描瓣填充透明度。
Returns:
Type Description ScanRadar 返回雷达对象 -
createSectorDetectionRangeByPosition(latlng, options){SectorDetectionRange}
leaflet/plot/SpecialEffectManager.js, line 113 -
通过位置点创建扇形扫描特效
Name Type Description latlngL.LatLng 创建扇形扫描位置点
optionsobject 链路参数
Name Type Description anglestring 可选 扇形开合角度
scanAnglestring 可选 扫描瓣开合角度
radiusnumber 可选 扇形扫描半径
radiusUnitboolean 可选 扇形半径单位类型(默认为像素)。
styleObject 可选 扇形风格参数。
Name Type Description fillColorstring 可选 扇形填充色。
fillOpacitystring 可选 扇形填充透明度。
opacitynumber 可选 扇形边界透明度。
colornumber 可选 扇形边界颜色。
scanStyleObject 可选 扫描风格参数。
Name Type Description fillColorstring 可选 扫描填充色。
fillOpacitystring 可选 扇形扫描填充透明度。
colornumber 可选 扇形扫描边界颜色。
opacitynumber 可选 扇形扫描边界透明度。
Returns:
Type Description SectorDetectionRange 返回扇形扫描对象 -
getSpecialEffectByType(type){array}
leaflet/plot/SpecialEffectManager.js, line 588 -
通过特效类型获取相关特效
Name Type Description typeSpecialEffectType 特效类型
Returns:
Type Description array 返回特效对象数组 -
getSpecialEffectByUuid(uuid){object}
leaflet/plot/SpecialEffectManager.js, line 626 -
根据特效uuid获取特效对象
Name Type Description uuidstring 特效对象唯一标识符
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 uuidstring 特效对象唯一标识符
-
selectedSpecialEffect(specialeffect)
leaflet/plot/SpecialEffectManager.js, line 337 -
选中特效
Name Type Description specialeffectAim | Boom | CommunicationLink | Destroy | ScanRadar | SectorDetectionRange 特效对象
-
unSelectedSpecialEffect(specialeffect)
leaflet/plot/SpecialEffectManager.js, line 349 -
取消选中特效
Name Type Description specialeffectAim | Boom | CommunicationLink | Destroy | ScanRadar | SectorDetectionRange 特效对象