new GOAnimationWay(options)
leaflet/animation/GOAnimationWay.js, line 7
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
路径动画参数。
|
Example
//获取动画管理器
var plotting = L.supermap.plotting.getControl(map, serverUrl);
var goAnimationManager = plotting.getGOAnimationManager();
//根据动画类型创建对象
var animationType = SuperMap.Plot.GOAnimationType.ANIMATION_WAY;
var feature = editControl.getSelectedFeatures()[0];
var goAnimation = goAnimationManager.createGOAnimation(animationType,goAnimationName,feature);
var arypts=[];
var pt1 = L.latLng(44, 88);
var pt2 = L.latLng(40, 116);
arypts.push(pt1);
arypts.push(pt2);
goAnimation.setWayPoints(arypts);
//路径类型:折线类型
goAnimation.pathType= SuperMap.Plot.WayPathType.POLYLINE;
Extends
Members
-
captionstring
-
动画别名。
-
currentPtL.LatLng
-
路径动画当前位置点。
-
durationnumber
-
动画时长,单位为秒。
-
namestring
-
动画名称,动画的唯一标识。
-
repeatboolean
-
是否重复循环播放,默认为false。
-
startTimenumber
-
动画开始时间,单位为秒。
-
tangentDirectionboolean
-
是否沿切线方向。
Methods
-
destroy()
leaflet/animation/GOAnimationWay.js, line 121 -
销毁对象,释放资源。
-
inherited getAnimationPlayType(){AnimationPlayType}
leaflet/animation/GOAnimation.js, line 304 -
获取动画的播放模式, 仅扩展类动画支持获取动画播放模式。
Returns:
Type Description AnimationPlayType 播放模式。 -
getCurrentPt(){L.LatLng}
leaflet/animation/GOAnimationWay.js, line 325 -
获取路径动画当前位置。
Returns:
Type Description L.LatLng 动画路径当前位置点。 -
inherited getDuration(){number}
leaflet/animation/GOAnimation.js, line 280 -
获取动画的时长。
Returns:
Type Description number 动画时长。 -
getGOAnimationType(){GOAnimationType}
leaflet/animation/GOAnimationWay.js, line 136 -
获取动画类型。
Returns:
Type Description GOAnimationType 动画类型。 -
inherited getGOFeature(){GraphicObject}
leaflet/animation/GOAnimation.js, line 234 -
获取动画的原始几何对象。
Returns:
Type Description GraphicObject 动画原始几何对象。 -
getPathColor(){string}
leaflet/animation/GOAnimationWay.js, line 356 -
获取路径线颜色。
Returns:
Type Description string 路径线颜色。 -
getPathType(){WayPathType}
leaflet/animation/GOAnimationWay.js, line 419 -
获取路径线类型。
Returns:
Type Description WayPathType 路径线类型。 -
getPathWidth(){number}
leaflet/animation/GOAnimationWay.js, line 386 -
获取路径线宽度。
Returns:
Type Description number 路径线宽度。 -
inherited getPlaySpeed(){number}
leaflet/animation/GOAnimation.js, line 508 -
获取动画播放倍速
Returns:
Type Description number - 播放倍数
-
inherited getStartTime(){number}
leaflet/animation/GOAnimation.js, line 269 -
获取动画的开始时间。
Returns:
Type Description number 动画的开始时间。 -
getWayPoints(){Array.<L.LatLng>}
leaflet/animation/GOAnimationWay.js, line 316 -
获取路径动画点数组。
Returns:
Type Description Array.<L.LatLng> 路径点数组。 -
inherited pause()
leaflet/animation/GOAnimation.js, line 382 -
暂停。
-
inherited play()
leaflet/animation/GOAnimation.js, line 330 -
播放。
-
inherited reset()
leaflet/animation/GOAnimation.js, line 394 -
复位。
-
inherited setAnimationPlayType(playType)
leaflet/animation/GOAnimation.js, line 313 -
设置动画播放模式, 仅扩展类动画支持设置动画播放模式。
Name Type Description playType
AnimationPlayType 动画播放模式。
-
inherited setDuration(startTime)
leaflet/animation/GOAnimation.js, line 288 -
设置动画的时长。
Name Type Description startTime
number 动画时长。
-
inherited setFastForWardTime(forWardTime)
leaflet/animation/GOAnimation.js, line 543 -
设置动画快进时间时长
Name Type Description forWardTime
number 动画快进时长。
-
setPath(polyline)
leaflet/animation/GOAnimationWay.js, line 155 -
设置路径。
Name Type Description polyline
L.Polyline 路径。
-
setPathColor(color)
leaflet/animation/GOAnimationWay.js, line 334 -
设置路径线颜色。
Name Type Description color
string 路径线颜色。
-
setPathType(pathType)
leaflet/animation/GOAnimationWay.js, line 395 -
设置路径线类型。
Name Type Description pathType
WayPathType 路径线类型。
-
setPathWidth(width)
leaflet/animation/GOAnimationWay.js, line 365 -
设置路径线宽度。
Name Type Description width
number 路径线宽度。
-
inherited setPlaySpeed(playSpeed)
leaflet/animation/GOAnimation.js, line 518 -
设置动画播放倍速
Name Type Description playSpeed
number 动画播放倍速。
-
inherited setRewindTime(rewindTime)
leaflet/animation/GOAnimation.js, line 562 -
设置动画快退时间时长
Name Type Description rewindTime
number 动画快退时长。
-
setShowPath(value)
leaflet/animation/GOAnimationWay.js, line 145 -
设置是否显示动画路径。
Name Type Description value
boolean 是否显示路径。
-
inherited setStartTime(startTime){number}
leaflet/animation/GOAnimation.js, line 242 -
设置动画的起始时间。
Name Type Description startTime
number 动画起始时间。
Returns:
Type Description number 动画起始时间。 -
setTangentDirection(value)
leaflet/animation/GOAnimationWay.js, line 164 -
设置是否延切线方向。
Name Type Description value
boolean 是否延切线方向。
-
setWayPoints(pts)
leaflet/animation/GOAnimationWay.js, line 294 -
设置路径动画点数组。
Name Type Description pts
Array.<L.LatLng> 路径点数组。
-
inherited stop()
leaflet/animation/GOAnimation.js, line 372 -
停止。