Classdesc

Base class for tiles.

Abstract

Hierarchy (view full)

Constructors

  • Parameters

    • tileCoord: TileCoord

      Tile coordinate.

    • state: any

      State.

    • Optional options: Options

      Tile options.

    Returns external.ol.Tile

Properties

disposed: boolean

The object has already been disposed.

interimTile: external.ol.Tile

An "interim" tile for this tile. The interim tile may be used while this one is loading, for "smooth" transitions when changing params/dimensions on the source.

interpolate: boolean
key: string

A key assigned to the tile. This is used by the tile source to determine if this tile can effectively be used, or if a new tile should be created and this one be used as an interim tile for this new tile.

state: any
tileCoord: TileCoord
transitionStarts_: {
    [x: string]: number;
}

Lookup of start times for rendering transitions. If the start time is equal to -1, the transition is complete.

Type declaration

  • [x: string]: number
transition_: number

The duration for the opacity transition.

Methods

  • Parameters

    • type: string

      Type.

    • listener: Listener

      Listener.

    Returns void

  • Protected

    Returns void

  • Dispatches an event and calls all listeners listening for events of this type. The event parameter can either be a string or an Object with a type property.

    Parameters

    • event: string | BaseEvent

      Event object.

    Returns undefined | boolean

    false if anyone called preventDefault on the event object or if any of the listeners returned false.

    Api

  • Clean up.

    Returns void

  • Protected

    Extension point for disposable objects.

    Returns void

  • Mark a transition as complete.

    Parameters

    • id: string

      An id for the renderer.

    Returns void

  • Get the alpha value for rendering.

    Parameters

    • id: string

      An id for the renderer.

    • time: number

      The render frame time.

    Returns number

    A number between 0 and 1.

  • Get the interim tile most suitable for rendering using the chain of interim tiles. This corresponds to the most recent tile that has been loaded, if no such tile exists, the original tile is returned.

    Returns external.ol.Tile

    Best tile for rendering.

  • Returns string

    Key.

  • Get the listeners for a specified event type. Listeners are returned in the order that they will be called in.

    Parameters

    • type: string

      Type.

    Returns undefined | Listener[]

    Listeners.

  • Returns any

    State.

  • Get the tile coordinate for this tile.

    Returns TileCoord

    The tile coordinate.

    Api

  • Parameters

    • Optional type: string

      Type. If not provided, true will be returned if this event target has any listeners.

    Returns boolean

    Has listeners.

  • Determine if a tile is in an alpha transition. A tile is considered in transition if tile.getAlpha() has not yet been called or has been called and returned 1.

    Parameters

    • id: string

      An id for the renderer.

    Returns boolean

    The tile is in transition.

  • Load the image or retry if loading previously failed. Loading is taken care of by the tile queue, and calling this method is only needed for preloading or for reloading in case of an error.

    Returns void

    Abstract

    Api

  • Goes through the chain of interim tiles and discards sections of the chain that are no longer relevant.

    Returns void

  • Called by the tile cache when the tile is removed from the cache due to expiry

    Returns void

  • Parameters

    • type: string

      Type.

    • listener: Listener

      Listener.

    Returns void

  • Sets the state of this tile. If you write your own module:ol/TileLoadFunction tileLoadFunction , it is important to set the state correctly to module:ol/TileStateERROR when the tile cannot be loaded. Otherwise the tile cannot be removed from the tile queue and will block other requests.

    Parameters

    • state: any

      State.

    Returns void

    Api