new SuperMap.TimeControlBase(options)
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
The open optional attributes of this class.
|
Members
-
currentTimenumber
-
Record the time, that is, the time that the current frame is running.
-
endTimenumber
-
The ending time of the record must be a number, If it is not set up, the initialization is set at the current time, and it is recommended to set up.
-
frequencynumber
-
Refresh rate (in ms), the interval at which the server is refreshed.
- Default Value: 1000
oldTimenumber
Record time of the last frame. That is the time to run before.
repeatboolean
Whether or not to repeat the cycle.
- Default Value: true
reverseboolean
Whether or not it is reverse.
runningboolean
Record whether the current is running.
speednumber
Speed. Can't less than 0(Express the interval between the data rendered for each frame is 1).
- Default Value: 1
startTimenumber
The starting time of the record must be a number, If it is not set up, the initialization is 0, and it is recommended to set up.
Methods
-
destroy()
TimeControlBase.js, line 404 -
destroy animator object, release resources.
-
getCurrentTime(){number}
TimeControlBase.js, line 344 -
Get current time.
Returns:
Type Description number Return to the current time. -
getEndTime(){number}
TimeControlBase.js, line 314 -
Get the endTime.
Returns:
Type Description number Return to the current endTime. -
getFrequency(){number}
TimeControlBase.js, line 248 -
Get frequency.
Returns:
Type Description number Return to the current frequency. -
getRepeat(){boolean}
TimeControlBase.js, line 364 -
Get whether to repeat the cycle.
Returns:
Type Description boolean Return to whether to repeat the cycle. -
getReverse(){boolean}
TimeControlBase.js, line 384 -
Get whether or not it is reverse.
Returns:
Type Description boolean The true meaning is running, and the false meaning is not running . -
getRunning(){boolean}
TimeControlBase.js, line 394 -
Get the running state.
Returns:
Type Description boolean The true meaning is running, and the false meaning is not running. -
getSpeed(){number}
TimeControlBase.js, line 222 -
Get speed.
Returns:
Type Description number Return to the current speed. -
getStartTime(){number}
TimeControlBase.js, line 281 -
Get startTime.
Returns:
Type Description number Return to the current startTime. -
pause()
TimeControlBase.js, line 164 -
Pause.
-
setCurrentTime(currentTime){boolean}
TimeControlBase.js, line 324 -
Set current time.
Name Type Description currentTime
number The current time that needs to be set.
Returns:
Type Description boolean True meaning set success, false meaning set failed. -
setEndTime(endTime){boolean}
TimeControlBase.js, line 291 -
Set endTime. When the setting is complete, if the current time is greater than the endTime, it starts from the start time.
Name Type Description endTime
number The end time that needs to be set.
Returns:
Type Description boolean True meaning set success, false meaning set failed .(it's failure when the endTime less than the start time). -
setFrequency(frequency){boolean}
TimeControlBase.js, line 232 -
Set frequency
Name Type Default Description frequency
number 1000 optional Refresh frequency. The unit is ms.
Returns:
Type Description boolean True meaning set success, false meaning set failed (it's failure when the frequency less than 0). -
setRepeat(repeat)
TimeControlBase.js, line 354 -
Set whether or not it is reverse.
Name Type Default Description repeat
boolean true optional Whether or not it is reverse.
-
setReverse(reverse)
TimeControlBase.js, line 374 -
Set whether or not it is reverse.
Name Type Default Description reverse
boolean false optional Whether or not it is reverse.
-
setSpeed(speed){boolean}
TimeControlBase.js, line 206 -
Set speed.
Name Type Default Description speed
number 1 optional Speed, Can't less than 0.
Returns:
Type Description boolean True meaning set success, false meaning set failed(it's failure when the speed less than 0). -
setStartTime(startTime){boolean}
TimeControlBase.js, line 258 -
Set start time. When the setting is completed, if the current time is less than the start time, it starts from the start time.
Name Type Description startTime
number Start time that needs to be set.
Returns:
Type Description boolean True meaning set success, false meaning set failed (it's failure when the startTime greater than the end time). -
start()
TimeControlBase.js, line 149 -
Start.
-
stop()
TimeControlBase.js, line 175 -
Stop. Return to start state after stopping
-
toggle()
TimeControlBase.js, line 191 -
Switch switching, Switching is the start and pause.
-
updateOptions(options)
TimeControlBase.js, line 111 -
Name Type Description options
Object Set optional parameters of the parameters. Set step length, refresh frequency, startTime, endTime, repeat, reverse.