-
Notifications
You must be signed in to change notification settings - Fork 0
VTS Browser Autopilot API
David Levinsky edited this page Apr 6, 2017
·
6 revisions
This module provides methods for transition between positions.
| Method | Returns | Description |
|---|---|---|
| flyTo(<Position> position, FlyOptions) | this | Sets map position |
| flyTrajectory(<Array of Positions> trajectory, <Number> samplePeriod) | this | Fly along the provided trajectory |
| cancelFlight() | this | Cancels the currently executing flight |
| setAutorotate(<Number> speed) | this | Sets how fast will the map rotate around the observed point. Speed is given in degrees per second. If speed is zero, no rotation is applied. |
| getAutorotate() | Number | Returns rotation speed in degrees per second. |
| Option | Type | Default | Description |
|---|---|---|---|
| mode | String | "direct" | Sets fly mode. Supported modes are: "direct", "ballistic". |
| maxDuration | Number | 10000 | Sets maximum duration of flight in milliseconds |
| maxHeight | Number | 100000 | Sets maximum height of flight. This option is supported only in "ballistic" mode. |
| samplePeriod | Number | 10 | Sample period in milliseconds. Sets the density of samples of the generated trajectory. |
| height | Number | null | Sets the height of flight. The height is determined automatically, but can be overridden by this option. This option is supported only in "ballistic" mode. |
| Event | Data content | Description |
|---|---|---|
| fly-start | <Position> startPosition, <Position> endPosition, <FlyOptions> options | When the flight starts. |
| fly-progress | <Position> position, <Number> progress | During the flight. The progress is in percents. |
| fly-end | <Position> position | When the flight ends. |
| autorotate-changed | <Number> speed, <Number> lastSpeed | When autorotation speed is changed. |