Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TileSource

TileSource is an abstract object that is responsible for managing a single tile layer on a map view and providing additional functionality for the layer, such as controlling a layer's opacity and loading and running animations.

This class is intended to be subclassed by each supported mapping strategy in order to configure the appropriate underlying layer instance that is added to the strategy's map view.

Hierarchy

Implements

Index

Constructors

constructor

  • Initializes a new tile source instance configured with the specified AMP layer code and tile url template string.

    memberof

    TileSource

    Parameters

    Returns TileSource

Properties

code

code: string

Optional dataSource

dataSource: ITileDataSource

The receiver's data source.

memberof

TileSource

enabled

enabled: boolean

Whether the data source is enabled.

memberof

TileSource

isAnimationFrame

isAnimationFrame: boolean = false

key

key: string

Data key associated with the data source.

memberof

TileSource

Accessors

animation

  • Returns the animation associated with the static layer.

    Returns TileAnimation | ImageAnimation

identifier

  • get identifier(): string
  • set identifier(value: string): void
  • Identifier associated with the data source.

    memberof

    TileSource

    Returns string

  • Identifier associated with the data source.

    memberof

    TileSource

    Parameters

    • value: string

    Returns void

overlay

  • get overlay(): any
  • Underlying map layer instance that is added to a map view

    Returns any

service

  • Returns MapRequest

timestamp

  • get timestamp(): Date
  • set timestamp(value: Date): void
  • Current timestamp to use when requesting tile data

    Returns Date

  • Current timestamp to use when requesting tile data

    Parameters

    • value: Date

    Returns void

url

  • get url(): string
  • Tile template URL

    Returns string

Methods

animationLayerForDate

canShow

  • canShow(): boolean
  • Returns boolean

destroy

  • destroy(): void
  • Returns void

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 tile layer.

    Returns void

isAnimating

  • isAnimating(): boolean
  • Returns boolean

isAnimationActive

  • isAnimationActive(): boolean
  • Returns boolean

isFuture

  • isFuture(): boolean
  • Returns boolean

isVisible

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

    memberof

    TileSource

    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

remove

  • remove(): void
  • Returns void

setOpacity

  • setOpacity(value: number, update?: boolean): void
  • Updates the opacity of the tile layer.

    Parameters

    • value: number
    • Default value update: boolean = true

    Returns void

setOrder

  • setOrder(value: number): void
  • Updates the z-index order of the tile layer on the parent map view.

    Parameters

    • value: number

    Returns void

show

  • show(): void
  • Shows the tile layer.

    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

updateVisibility

  • updateVisibility(): void
  • Returns void

urlTemplate

  • urlTemplate(): string
  • Returns the url template string to use for tile requests based on the current timestamp.

    Returns string

Generated using TypeDoc