new Tracer(mapViewer)
轨迹对象
Parameters:
| Name | Type | Description |
|---|---|---|
mapViewer |
wol.MapViewer | wol地图实例 |
- Source:
Requires:
- module:wol-util.js
Requires
- module:wol-util.js
Members
-
animateParam :object
-
动画参数
Type:
- object
- Source:
-
status :object
-
动画状态
Type:
- object
- Source:
-
timer :object|null
-
动画计时器
Type:
- object | null
- Source:
Methods
-
clear()
-
清除轨迹,清除之后若要执行轨迹播放你将必须重新初始化轨迹
- Source:
-
getFlashLine() → {ol.Feature}
-
获取动画轨迹线要素
- Source:
Returns:
- Type
- ol.Feature
-
getFlashPoint() → {ol.Feature}
-
获取动画轨迹点要素
- Source:
Returns:
- Type
- ol.Feature
-
getMapViewer() → {wol.MapViewer}
-
获取wol地图实例
- Source:
Returns:
- Type
- wol.MapViewer
-
getTraceLayer() → {ol.layer.Base}
-
获取轨迹图层
- Source:
Returns:
- Type
- ol.layer.Base
-
getTraceLine() → {ol.Feature}
-
获取轨迹线要素
- Source:
Returns:
- Type
- ol.Feature
-
getTraceSource() → {ol.source.Source}
-
获取轨迹图层数据源
- Source:
Returns:
- Type
- ol.source.Source
-
init(option)
-
初始化轨迹播放实例
Parameters:
Name Type Description optionobject 初始化配置项
Properties
Name Type Description srcol.Feature 轨迹线要素
speedstring | number 轨迹播放速度,可选值为'slow'、'normal'、'fast',也可以是大于0的具体数值,默认为 3
afterInitializefunction 轨迹初始化后的回调函数,默认为空函数
afterStartfunction 轨迹开始播放的回调函数,默认为空函数
afterCompletefunction 轨迹播放完成的回调函数,默认为空函数
ifDynamicTrackboolean 轨迹播放过程中是否开启动态追踪,默认为 false
ifLocateboolean 轨迹初始化完成后是否定位至轨迹点,默认为 false
iconboolean 轨迹播放图标文件路径,应是相对于该JS文件执行目录(引用该文件的页面所在目录)的路径
iconClassboolean 轨迹播放图标CSS样式,默认为‘’
iconSizeboolean 轨迹播放图标大小,默认为40
iconOpacityboolean 轨迹播放图标透明度,默认为1
- Source:
-
pause()
-
暂停轨迹播放
- Source:
-
play()
-
播放轨迹,你可以在轨迹初始化完成后调用该方法播放轨迹或轨迹暂停播放后调用该方法继续播放
- Source:
-
reset()
-
重置轨迹播放
- Source:
-
setFlashStyle(style)
-
设置动态轨迹线样式
Parameters:
Name Type Description styleol.style.Style 样式实例
- Source:
-
setStaticStyle(style)
-
设置静态轨迹线样式
Parameters:
Name Type Description styleol.style.Style 样式实例
- Source:
WolMap