Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
Object |
optional
参数选项:
|
Example:
var singleArrowElement = new Cesium.GeoSingleArrowElement({
viewer: viewer,
positions: [
[106.50255907979172, 30.124293956577112],
[109.57560428200443, 28.695531735044707],
[112.19039125075413, 29.356410433383108],
[114.08748761156725, 30.56765059559664]
],
lineColor: new Cesium.Color(0, 1, 1, 1),
lineWidth: 5,
lineStyle: GeoElement.LINE_STYLE.SOLID,
fillMode: "gradient", //gradient
fillColor: new Cesium.Color(0, 0, 1, 1),
fillStartColor: new Cesium.Color(0, 0, 1, 1),
fillEndColor: new Cesium.Color(0, 1, 0, 1),
visibleSwallowTail: true
})
var animation = new Cesium.GeoAnimationGrow({
name: '单箭头,多途径点的动画',
startTime: 0,
duration: 5,
element: singleArrowElement
})
var doubleArrowElement = new Cesium.GeoDoubleArrowElement({
viewer: viewer,
positions: [
[114.32672638334496, 34.06526265570961],
[118.58435074139295, 32.17305709060316],
[115.19719950610559, 30.354446348688],
[113.72546321786797, 31.234367143944176]
],
lineColor: new Cesium.Color(0, 1, 1, 1),
lineWidth: 1,
lineStyle: GeoElement.LINE_STYLE.SOLID,
fillMode: "gradient",
fillColor: new Cesium.Color(0, 0, 1, 1),
fillStartColor: new Cesium.Color(0, 0, 1, 1),
fillEndColor: new Cesium.Color(0, 1, 0, 1),
visibleSwallowTail: true
})
var animation2 = new Cesium.GeoAnimationGrow({
name: '双箭头,多途径点的动画',
startTime: 0,
duration: 5,
element: doubleArrowElement
});
let animationManager = new Cesium.GeoAnimationManager({
animations: [animation, animation2]
});
animationManager.play();
Methods
添加动画对象
Name | Type | Description |
---|---|---|
animation |
Object |
获取所有动画对象的最后结束时间
获取暂时后的到结束时的剩余时间
判断指定动画对象是否被添加到动画管理对象中
Name | Type | Description |
---|---|---|
animation |
Object | 动画对象 |
暂停播放动画
播放动画
清空所有动画对象
Name | Type | Description |
---|---|---|
animation |
Object |
移除动画对象
Name | Type | Description |
---|---|---|
animation |
Object |
停止播放动画