Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TileAnimation

A TileAnimation object is a subclass of Animation that is responsible for loading and managing a series of tile layers required for animation playback.

Hierarchy

Implements

Index

Constructors

constructor

Properties

provider

The receiver's data provider

memberof

TileAnimation

totalIntervals

totalIntervals: number

Accessors

bufferCount

  • get bufferCount(): number
  • Returns number

currentOffset

  • get currentOffset(): number
  • Returns the current time offset from the beginning of the animation in milliseconds.

    readonly
    memberof

    Animation

    Returns number

currentTime

  • get currentTime(): number
  • Returns the current time of the animation's position in milliseconds.

    readonly
    memberof

    Animation

    Returns number

duration

  • get duration(): number
  • set duration(value: number): void
  • Total time in seconds for the animation to complete. The animation speed will be determined by the duration and total intervals, so a longer duration will result in a slower animation speed for the same number of intervals.

    memberof

    Animation

    Returns number

  • Total time in seconds for the animation to complete. The animation speed will be determined by the duration and total intervals, so a longer duration will result in a slower animation speed for the same number of intervals.

    memberof

    Animation

    Parameters

    • value: number

    Returns void

endDelay

  • get endDelay(): number
  • set endDelay(value: number): void
  • Delay duration in seconds to hold the last interval of the animation before restarting from the beginning.

    memberof

    Animation

    Returns number

  • Delay duration in seconds to hold the last interval of the animation before restarting from the beginning.

    memberof

    Animation

    Parameters

    • value: number

    Returns void

from

  • get from(): number
  • set from(value: number): void
  • Starting Epoch timestamp in milliseconds.

    memberof

    Animation

    Returns number

  • Starting Epoch timestamp in milliseconds.

    memberof

    Animation

    Parameters

    • value: number

    Returns void

increment

  • get increment(): number
  • Returns number

key

  • get key(): string
  • The key associated with the animation, if any.

    readonly
    memberof

    Animation

    Returns string

now

  • get now(): Date
  • set now(value: Date): void
  • Current time value that represents now. This value is used to determine past/future time periods within the full time range.

    memberof

    Animation

    Returns Date

  • Current time value that represents now. This value is used to determine past/future time periods within the full time range.

    memberof

    Animation

    Parameters

    • value: Date

    Returns void

position

  • get position(): number
  • set position(value: number): void
  • The animation's current position in the range of 0 to 1.0, where 0 is the beginning and 1.0 is the end.

    memberof

    Animation

    Returns number

  • The animation's current position in the range of 0 to 1.0, where 0 is the beginning and 1.0 is the end.

    memberof

    Animation

    Parameters

    • value: number

    Returns void

showWhenLoading

  • get showWhenLoading(): boolean
  • set showWhenLoading(value: boolean): void
  • Returns boolean

  • Parameters

    • value: boolean

    Returns void

timeline

  • Parent timeline managing this animation, if any.

    memberof

    Animation

    Returns Timeline

  • Parent timeline managing this animation, if any.

    memberof

    Animation

    Parameters

    Returns void

to

  • get to(): number
  • set to(value: number): void
  • Ending Epoch timestamp in milliseconds.

    memberof

    Animation

    Returns number

  • Ending Epoch timestamp in milliseconds.

    memberof

    Animation

    Parameters

    • value: number

    Returns void

totalTime

  • get totalTime(): number
  • Returns the total time, in milliseconds, of the animation based on the start and end timestamps.

    readonly
    memberof

    Animation

    Returns number

Methods

alwaysShow

  • alwaysShow(): boolean
  • Returns whether the animation should be shown regardless of time.

    memberof

    Animation

    Returns boolean

canAnimate

  • canAnimate(): boolean
  • Returns whether the animation can animate based on whether or not animation data has loaded or is already cached.

    memberof

    TileAnimation

    Returns boolean

canShow

  • canShow(time?: number): boolean
  • Returns whether the animation should be visible for the specified time.

    This method will return false if the animation is specified as a future animation and the time is in the past, or if the animation is not specified as a future animation and the time is in the future.

    memberof

    Animation

    Parameters

    • Optional time: number

    Returns boolean

containsFuture

  • containsFuture(): boolean
  • Returns whether the animation's time range extends into the future.

    memberof

    Animation

    Returns boolean

containsPast

  • containsPast(): boolean
  • Returns whether the animation's time range extends into the past.

    memberof

    Animation

    Returns boolean

currentDate

  • currentDate(): Date
  • Returns the current time interval as a Date.

    memberof

    Animation

    Returns Date

currentInterval

  • currentInterval(): number
  • Returns the current time interval in milliseconds.

    memberof

    Animation

    Returns number

dataByTime

  • dataByTime(): {}
  • Returns the animation data keyed by time interval.

    memberof

    TileAnimation

    Returns {}

    • [key: string]: any

dataItems

  • dataItems(): any[]
  • Returns an array of cached raster data items for the animation.

    memberof

    TileAnimation

    Returns any[]

enabled

  • enabled(enable: boolean): void
  • Sets whether the animation should be enabled.

    memberof

    Animation

    Parameters

    • enable: boolean

    Returns void

endDate

  • endDate(): Date
  • Returns the end date of the animation.

    memberof

    Animation

    Returns Date

endOffset

  • endOffset(): number
  • Returns the current end offset relative to now, in milliseconds.

    memberof

    Animation

    Returns number

endsAtNow

  • endsAtNow(): boolean
  • Returns boolean

goToInit

  • goToInit(): void
  • Called when an animation is first created, stopped or reset and determines the time interval to display for the static position so that it's closest to the current time as possible.

    memberof

    Animation

    Returns void

goToTime

  • Advances the animation to the specified time.

    memberof

    Animation

    Parameters

    • time: number | Date

      The time in milliseconds to update the animation's playhead to, which must be within the to and from time range.

    Returns Animatable

has

  • has(type: string): boolean
  • Returns whether the listeners are registered for the specified event name.

    memberof

    EventDispatcher

    Parameters

    • type: string

    Returns boolean

hide

  • hide(): void
  • Hides the animation content.

    memberof

    TileAnimation

    Returns void

isAnimating

  • isAnimating(): boolean
  • Returns whether the animation is currently running.

    memberof

    Animation

    Returns boolean

isAutoPlay

  • isAutoPlay(): boolean
  • Returns whether the animation should automatically begin playback after being created.

    memberof

    Animation

    Returns boolean

isEnabled

  • isEnabled(): boolean
  • Returns whether the animation is currently enabled. Disabled animations would not animate during playback.

    memberof

    Animation

    Returns boolean

isFuture

  • isFuture(): boolean
  • Returns whether the animation has been specified as a future-only animation, meaning it's only valid for time intervals into the future.

    memberof

    Animation

    Returns boolean

isLoading

  • isLoading(): boolean
  • Returns whether the animation is currently loading data.

    memberof

    TileAnimation

    Returns boolean

isPaused

  • isPaused(): boolean
  • Returns whether the animation is currently paused.

    memberof

    Animation

    Returns boolean

isReady

  • isReady(): boolean
  • Returns whether the animation is ready for playback.

    A tile animation is only ready once all images have been loaded.

    memberof

    TileAnimation

    Returns boolean

isVisible

  • isVisible(): boolean
  • Returns whether the animation element is currently visible.

    memberof

    TileAnimation

    Returns boolean

neededIntervals

  • neededIntervals(): number[]
  • Returns an array of timestamps defining the interval steps that will be rendered during playback.

    Total intervals returned will be evenly distributed across the animations time range based on the value for opts.intervals.

    memberof

    Animation

    Returns number[]

needsData

  • needsData(): boolean
  • Returns boolean

off

  • Removes a registered listener function for the specified event.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to remove the listener for.

    • callback: Function

      Handler function to remove so it won't be executed next time the event is triggered.

    • Default value scope: any = null

    Returns EventDispatcher

offAll

on

  • on(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed each time an event occurs

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

once

  • once(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed the first time an event occurs.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

opt

  • opt(key: string, value?: any): any
  • Sets or returns the configuration value for the specified key path.

    memberof

    Animation

    Parameters

    • key: string
    • Optional value: any

    Returns any

pause

  • pause(): void
  • Pauses the animation at the current position.

    To resume playback from a paused animation's current position, use resume().

    memberof

    Animation

    Returns void

play

  • play(): void
  • Begins playing the animation if not currently running.

    If images required for playback have not been loaded, then all images will be requested before playback can begin.

    memberof

    TileAnimation

    Returns void

refresh

  • refresh(): void
  • Updates the animation's start and end times based on the configured offsets and the current time and date.

    memberof

    Animation

    Returns void

reset

  • reset(updateTime?: boolean): void
  • Resets the animation to its original state.

    All images that were cached during animation playback will be removed and new images will have to be requested again when playback begins.

    memberof

    TileAnimation

    Parameters

    • Default value updateTime: boolean = false

    Returns void

restart

  • restart(): void
  • Restarts the animation from the beginning.

    memberof

    Animation

    Returns void

resume

  • resume(): void
  • Resumes playing the animation from the paused position.

    memberof

    Animation

    Returns void

setEndDate

  • setEndDate(date: Date | number): this
  • Sets the end date of the animation.

    memberof

    Animation

    Parameters

    • date: Date | number

      Either a Date instance or epoch time in milliseconds to update the end time to

    Returns this

setEndOffset

  • setEndOffset(offset: number): this
  • Sets the end date of the animation based on the specified offset relative to now, in milliseconds.

    memberof

    Animation

    Parameters

    • offset: number

    Returns this

setOpacity

  • setOpacity(value: number): void
  • Updates the opacity for all raster-related data associated with the animation.

    memberof

    ImageAnimation

    Parameters

    • value: number

    Returns void

setStartDate

  • setStartDate(date: Date | number): this
  • Sets the start date of the animation.

    memberof

    Animation

    Parameters

    • date: Date | number

      Either a Date instance or epoch time in milliseconds to update the start time to

    Returns this

setStartOffset

  • setStartOffset(offset: number): this
  • Sets the start date of the animation based on the specified offset relative to now, in milliseconds.

    memberof

    Animation

    Parameters

    • offset: number

    Returns this

setTimes

  • setTimes(times: (number | Date)[], every?: number): void
  • Parameters

    • times: (number | Date)[]
    • Default value every: number = 1

    Returns void

show

  • show(): void
  • Shows the animation content.

    memberof

    TileAnimation

    Returns void

startDate

  • startDate(): Date
  • Returns the start date of the animation.

    memberof

    Animation

    Returns Date

startOffset

  • startOffset(): number
  • Returns the current start offset relative to now, in milliseconds.

    memberof

    Animation

    Returns number

startsAtNow

  • startsAtNow(): boolean

stop

  • stop(): void
  • Stops playing the animation if currently running.

    Starting the animation again using start() after calling stop() will restart the animation from the beginning.

    memberof

    TileAnimation

    Returns void

toggle

  • toggle(): void
  • Either plays or stops the animation playback depending on the current state.

    memberof

    Animation

    Returns void

trigger

  • Triggers the specified event so that all registered listeners will be executed with the specified parameters.

    memberof

    EventDispatcher

    Parameters

    • type: any

      Event name to trigger

    • Default value data: any = null

    Returns EventDispatcher

Generated using TypeDoc