Options
All
  • Public
  • Public/Protected
  • All
Menu

Used to issue a request, without having them "deeply queued" by the browser.

todo
  • Track requests globally, across multiple servers

Type Parameters

  • Identiy

Hierarchy

  • TileRequestScheduler

Index

Constructors

Methods

Constructors

Methods

  • scheduleRequest(identiy: Identiy, getPriority?: ((identiy: Identiy) => number)): Promise<{ done: any }>
  • Called by an application that wants to issue a request, without having it deeply queued by the browser

    When the returned promise resolved, it is OK for the application to issue a request. The promise resolves to an object that contains a done method. When the application's request has completed (or failed), the application must call the done function

    Parameters

    • identiy: Identiy

      Identiy

    • getPriority: ((identiy: Identiy) => number) = ...

      will be called when request "slots" open up, allowing the caller to update priority or cancel the request Highest priority executes first, priority less than 0 cancels the request

        • (identiy: Identiy): number
        • Parameters

          • identiy: Identiy

          Returns number

    Returns Promise<{ done: any }>

    a promise resolves to a object (with a done field) when the request can be issued without queueing, resolves to null if the request has been cancelled (by the callback return less than 0). In this case the application should not issue the request