new Aim(viewUuid, aimUuid, viewLatLng, aimLatLng, 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.Aim(viewUuid, aimUuid, viewLatLng, aimLatLng, options);
// 另一种写法
L.supermap.plotting.aim(viewUuid, aimUuid, viewLatLng, aimLatLng, options);
</script>
// ES6 Import
import { Aim } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';
new Aim(viewUuid, aimUuid, viewLatLng, aimLatLng, options);
leaflet/specialeffect/Aim.js, line 8
Name | Type | Description | |||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
viewUuid |
string |
观察点关联标号uuid, 与位置点二选一传入 |
|||||||||||||||||||||||||||||||||||||||
aimUuid |
string |
瞄准点关联标号uuid, 与位置点二选一传入 |
|||||||||||||||||||||||||||||||||||||||
viewLatLng |
L.LatLng |
观察点位置点, 与关联标号uuid可以二选一传入 |
|||||||||||||||||||||||||||||||||||||||
aimLatLng |
L.LatLng |
瞄准点位置点, 与关联标号uuid可以二选一传入 |
|||||||||||||||||||||||||||||||||||||||
options |
object |
瞄准参数
|
- Version:
- 11.2.0
Example
//方式一,创建与标号绑定的特效,由标号内部进行管理
var aim = L.supermap.plotting.aim(viewUuid, aimUuid, null, null, options);
//方式二, 使用管理器创建
var specialEffectManager = L.supermap.plotting.getControl().getSpecialEffectManager();
var aim = specialEffectManager.createAimByPosition(viewPosition, aimPosition, options);
//方式三, 在动目标图层上使用接口创建
var movingTargetLayer = L.supermap.plotting.movingTargetLayer("movingTarget", serverUrl);;
var aim = movingTargetLayer.createAimByPosition(viewPosition, aimPosition, options);
Extends
Members
-
aimUuidstring
-
瞄准对象关联标号的uuid。
-
barkIntervalnumber
-
闪烁间隔,单位毫秒
-
barkTimesnumber
-
瞄准闪烁次数,若闪烁循环则不生效。
-
loopboolean
-
瞄准闪烁是否循环。
-
radiusnumber
-
瞄准圆半径。
-
radiusUnitRadiusUnitType
-
瞄准圆半径单位类型(默认为像素)。
-
styleobject
-
瞄准风格参数。
-
viewUuidstring
-
观察对象关联标号的uuid。
Methods
-
getPosition()
leaflet/specialeffect/Aim.js, line 1025 -
获取关联位置点坐标
-
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/Aim.js, line 320 -
停止瞄准特效
-
play()
leaflet/specialeffect/Aim.js, line 276 -
播放瞄准特效
-
remove()
leaflet/specialeffect/Aim.js, line 974 -
将瞄准与瞄准线对象从地图上移除
-
setBarkInterval(interval)
leaflet/specialeffect/Aim.js, line 365 -
设置闪烁间隔
Name Type Description interval
number 闪烁间隔,单位毫秒
-
setBarkTimes(times)
leaflet/specialeffect/Aim.js, line 355 -
设置闪烁次数
Name Type Description times
number 循环次数
-
setLoop(loop)
leaflet/specialeffect/Aim.js, line 345 -
设置闪烁是否循环
Name Type Description loop
boolean 是否循环
-
setName(name)
leaflet/specialeffect/Aim.js, line 435 -
设置特效名称
Name Type Description name
string 特效名称
-
setRadius(radius)
leaflet/specialeffect/Aim.js, line 376 -
设置瞄准圆半径
Name Type Description radius
number 瞄准圆半径
-
setRadiusUnitType(type)
leaflet/specialeffect/Aim.js, line 418 -
设置半径单位
Name Type Description type
RadiusUnitType 半径单位
-
setStyle(style)
leaflet/specialeffect/Aim.js, line 464 -
修改瞄准属性
Name Type Description style
object 瞄准对象属性值
Name Type Description aimTargetColor
string 可选 瞄准圆颜色
aimLineColor
string 可选 瞄准线颜色
aimLineWeight
number 可选 瞄准线线宽
aimLineOpacity
number 可选 瞄准线透明度
aimLineDashArray
string 可选 瞄准线虚线间隔长短
-
setVisible(visible)
leaflet/specialeffect/Aim.js, line 445 -
设置显隐
Name Type Description visible
boolean 是否显示