new SectorDetectionRange(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.SectorDetectionRange(associatedUuid, latlng, options);
// 另一种写法
L.supermap.plotting.sectorDetectionRange(associatedUuid, latlng, options);
</script>
// ES6 Import
import { SectorDetectionRange } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';
new SectorDetectionRange(associatedUuid, latlng, options);
leaflet/specialeffect/SectorDetectionRange.js, line 15
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
associatedUuid |
string |
关联标号的唯一标识符,与位置点和朝向二选一即可 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
latlng |
L.LatLng |
扫描范围创建位置点 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
options |
object |
构造参数
|
- Version:
- 11.2.0
Example
//方式一,创建与标号绑定的特效,由标号内部进行管理
var sectorDetectionRange = L.supermap.plotting.sectorDetectionRange(associatedUuid, null, options);
//方式二, 使用管理器创建
var specialEffectManager = L.supermap.plotting.getControl().getSpecialEffectManager();
var sectorDetectionRange = specialEffectManager.createSectorDetectionRangeByPosition(position, options);
//方式三, 在动目标图层上使用接口创建
var movingTargetLayer = L.supermap.plotting.movingTargetLayer("movingTarget", serverUrl);;
var sectorDetectionRange = movingTargetLayer.createSectorDetectionRangeByPosition(position, options);
Extends
Members
-
associatedUuidstring
-
扇形扫描对象关联标号的id。
-
radiusUnitboolean
-
扇形半径单位类型(默认为经纬度)。
-
styleobject
-
扇形扫描范围样式参数。
-
styleobject
-
扇形扫描范围样式参数。
Methods
-
getPosition()
leaflet/specialeffect/SectorDetectionRange.js, line 409 -
获取关联位置点坐标
-
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/SectorDetectionRange.js, line 387 -
停止扫描特效
-
play(pathPositionArr)
leaflet/specialeffect/SectorDetectionRange.js, line 305 -
开始扫描特效
Name Type Description pathPositionArr
Array.<L.LatLng> 路径点串数组
-
remove()
leaflet/specialeffect/SectorDetectionRange.js, line 618 -
摧毁扫描特效
-
setAngle(angle)
leaflet/specialeffect/SectorDetectionRange.js, line 452 -
设置开合角度
Name Type Description angle
number 开合角度
-
setName(name)
leaflet/specialeffect/SectorDetectionRange.js, line 537 -
设置特效名称
Name Type Description name
string 特效名称
-
setRadius(radius)
leaflet/specialeffect/SectorDetectionRange.js, line 418 -
设置扫描半径
Name Type Description radius
number 半径
-
setRadiusUnitType(type)
leaflet/specialeffect/SectorDetectionRange.js, line 435 -
设置半径单位
Name Type Description type
RadiusUnitType 半径单位
-
setScanAngle(scanAngle)
leaflet/specialeffect/SectorDetectionRange.js, line 497 -
设置扫描瓣开合角度
Name Type Description scanAngle
number 扫描瓣开合角度
-
setScanStyle(style)
leaflet/specialeffect/SectorDetectionRange.js, line 599 -
设置扫描样式
Name Type Description style
object 修改属性值
Name Type Description fillColor
string 可选 扇形扫描范围填充色
fillOpacity
number 可选 扇形扫描范围填充透明度
color
number 可选 扇形扫描边界颜色。
opacity
number 可选 扇形扫描范围边界透明度
-
setStyle(style)
leaflet/specialeffect/SectorDetectionRange.js, line 573 -
设置扇形样式
Name Type Description style
object 修改属性值
Name Type Description fillColor
string 可选 扇形填充色
fillOpacity
number 可选 扇形填充透明度
opacity
number 可选 扇形边界透明度
color
number 可选 扇形边界颜色
-
setVisible(visible)
leaflet/specialeffect/SectorDetectionRange.js, line 547 -
设置显隐
Name Type Description visible
boolean 是否显示