Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BaseTileLoader

internal

Base class for tile loaders that provides state handling, request abortion and a load promise.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Protected dataSource

dataSource: DataSource

The DataSource the tile belongs to.

Optional error

error: Error

Error object if loading or decoding failed.

Protected m_priority

m_priority: number = 0

state

state: TileLoaderState = TileLoaderState.Initialized

Protected tileKey

tileKey: TileKey

The quadtree address of a Tile.

Accessors

isFinished

  • get isFinished(): boolean

priority

  • get priority(): number
  • set priority(value: number): void

Methods

cancel

  • cancel(): void

Protected cancelImpl

  • cancelImpl(): void

loadAndDecode

Protected Abstract loadImpl

  • loadImpl(abortSignal: AbortSignal, onDone: (doneState: TileLoaderState) => void, onError: (error: Error) => void): void
  • Called on tile load.

    Parameters

    • abortSignal: AbortSignal

      Signal emitted to abort loading.

    • onDone: (doneState: TileLoaderState) => void

      Callback that must be called once the loading is done.

    • onError: (error: Error) => void

      Callback that must be called on loading error.

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns void

waitSettled

Generated using TypeDoc