类名 RouteAnimationTool

# new RouteAnimationTool(vieweropt, optionsopt)

路径漫游工具(支持实例化多个工具)

参数:

名称 类型 默认值 描述
viewer Cesium.Viewer null

场景视图,详见Cesium.Viewer

options Object {}

额外初始化参数

path RouteAnimationPath new RouteAnimationPath()

路径漫游路径对象

label RouteAnimationLabel new RouteAnimationLabel()

路径漫游标牌对象

model RouteAnimationModel new RouteAnimationModel()

路径漫游模型对象

control RouteAnimationControl new RouteAnimationControl()

路径漫游控制对象

perspective RouteAnimationPerspective new NormalPerspective()

路径漫游视角对象

请参考以下示例:
1、模型沿地形漫游

示例

路径漫游

// 参考示例:
http://192.168.82.91:8086/#/modules/cesium/analyse/commonAnalyse/path-roaming

// ES5引入方式
const { RouteAnimationTool } = zondy.cesium
// ES6引入方式
import { RouteAnimationTool } from "@mapgis/webclient-cesium-plugin"

// 1 构造漫游路径数组,单位为笛卡尔3
const pathPositions = [...]

// 2 定义漫游工具对象
animationTool = new RouteAnimationTool(viewer, {
  //类型指定为routes
  path: new RouteAnimationPath({
   positions: pathPositions,
   speeds: [5],
  }),
  ...
})

// 3 开始漫游
animationTool.start()

// 4 暂停漫游
animationTool.pause()

// 5 继续漫游
animationTool.play()

// 6 结束漫游
animationTool.stop()

成员变量

Object

# readonly animationEntity

漫游的模型实体对象

RouteAnimationControl

# control

路径漫游控制对象

RouteAnimationLabel

# label

路径漫游标牌对象

RouteAnimationModel

# model

路径漫游模型对象

RouteAnimationPath

# path

路径漫游路径对象

RouteAnimationPerspective

# perspective

路径漫游视角对象

方法

# pause()

控制动画的暂停

# play()

控制动画继续播放

# start()

开始漫游

# stop()

结束漫游

构造函数
成员变量
方法
事件