UNPKG

1.18 kBTypeScriptView Raw
1import Layer from './layer/Layer';
2import { OrderFunction } from './render';
3import Source from './source/Source';
4import Tile from './Tile';
5import { TileCoord } from './tilecoord';
6import TileState from './TileState';
7import VectorTile from './VectorTile';
8
9export interface ReplayState {
10 dirty: boolean;
11 renderedRenderOrder: null | OrderFunction;
12 renderedTileRevision: number;
13 renderedResolution: number;
14 renderedRevision: number;
15 renderedZ: number;
16 renderedTileResolution: number;
17 renderedTileZ: number;
18}
19export default class VectorRenderTile extends Tile {
20 constructor(
21 tileCoord: TileCoord,
22 state: TileState,
23 urlTileCoord: TileCoord,
24 getSourceTiles: (p0: VectorRenderTile) => VectorTile[],
25 );
26 getContext(layer: Layer<Source>): CanvasRenderingContext2D;
27 /**
28 * Get the Canvas for this tile.
29 */
30 getImage(layer: Layer<Source>): HTMLCanvasElement;
31 getReplayState(layer: Layer<Source>): ReplayState;
32 hasContext(layer: Layer<Source>): boolean;
33 /**
34 * Load the tile.
35 */
36 load(): void;
37 /**
38 * Remove from the cache due to expiry
39 */
40 release(): void;
41}