Class: FlightController

FlightController

飞行控制器

new FlightController(viewer, options)

roaming/flight/FlightController.js, line 9

飞行控制器

Name Type Description
viewer *
options *
Name Type Default Description
velocity Number 1 optional

漫游速度

isRepeat Boolean false optional

是否重复

isLoop Boolean false optional

是否往返(优先级低于isRepeat)

showPath Boolean false optional

是否显示

Classes

FlightController

Members

bookmarks

获得当前漫游的书签集合

currentPath

当前路径

isLoop

isRepeat

paths

对应path的配置

showPath

velocity

Methods

addCurrentView(options)

roaming/flight/FlightController.js, line 231

保存当前视图到书签

Name Type Description
options *
Name Type Description
id String
name String
attrs *

addPath(options)

roaming/flight/FlightController.js, line 340

新增漫游路径

Name Type Description
options *
Name Type Description
sections * optional

路段

id String
name String
Example
addPath({id:1,name:"云驰街到江淼路",sections:[{startId:1,endId:2,duration:1}]});

addSection(options)

roaming/flight/FlightController.js, line 261

新增漫游段

Name Type Description
options *
Name Type Default Description
startId String
endId String
duration Number 1 optional
id String optional
name String optional
attrs * optional
Example
addSection({startId:1,endId:2,duration:2,id:1,name:"云驰街到江淼路"});

export(){String}

roaming/flight/FlightController.js, line 420

导出漫游配置,包括Bookmarks和Path

Returns:
Type Description
String 漫游配置

load()

roaming/flight/FlightController.js, line 180

加载配置

Name Type Description
data.Bookmarks *

书签配置

data.Path *

路线配置

pause()

roaming/flight/FlightController.js, line 445

暂停/继续漫游

removePath(index)

roaming/flight/FlightController.js, line 388

移除漫游路径

Name Type Default Description
index Number 0

removePathFromId(id)

roaming/flight/FlightController.js, line 408

根据Id移除漫游路径

Name Type Description
id String

removeSection(index)

roaming/flight/FlightController.js, line 307

移除漫游路段

Name Type Default Description
index Number 0

removeSectionFromId(id)

roaming/flight/FlightController.js, line 322

根据Id移除漫游路径

Name Type Description
id String

setPath(index)

roaming/flight/FlightController.js, line 364

设置当前漫游路径

Name Type Default Description
index Number 0

setPathFromId(id)

roaming/flight/FlightController.js, line 376

根据Id设置当前漫游路径

Name Type Description
id String

start()

roaming/flight/FlightController.js, line 431

开始/继续漫游

stop()

roaming/flight/FlightController.js, line 458

结束漫游