Constructor
new Simulation(options)
- Description:
构造方法。
Parameters:
| Name | Type | Description | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
Properties
|
Members
(readonly) speed :number
- Description:
速度。
速度。
Type:
- number
Methods
pause()
- Description:
暂停。
resume()
- Description:
恢复。
setSpeed(speed)
- Description:
设置速度,m/s。
Parameters:
| Name | Type | Description |
|---|---|---|
speed |
number |
simulate(callback, finish)
- Description:
模拟。
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function | 模拟过程中的回调,返回模拟位置数据。LM.Simulation.Point |
finish |
function | 模拟结束的回调。 |
stop()
- Description:
停止。
Type Definitions
Point
- Description:
模拟位置数据。
Properties:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
position |
object | 位置信息。 Properties
|
||||||||||||
heading |
number | 方向角。 |
模拟位置数据。
Type:
- object