Skip to content

Both copy text to your clipboard — Build with AI copies a setup prompt to paste into Claude Code, Cursor, Codex or Copilot; Copy page as Markdown copies this page to paste into a chat. How it works

Tile ​

Defined in: src/source/tile.ts:53

A tile object is the combination of a Coordinate, which defines its place, as well as a unique ID and data tracking for its content

Constructors ​

Constructor ​

new Tile(tileID: OverscaledTileID, size: number): Tile

Defined in: src/source/tile.ts:103

Parameters ​

ParameterTypeDescription
tileIDOverscaledTileIDthe tile ID
sizenumberThe tile size

Returns ​

Tile

Methods ​

loadVectorData() ​

loadVectorData(data: WorkerTileResult, painter: any, justReloaded?: boolean): void

Defined in: src/source/tile.ts:154

Given a data object with a 'buffers' property, load it into this tile's elementGroups and buffers properties and set loaded to true. If the data is null, like in the case of an empty GeoJSON tile, no-op but still set loaded to true.

Parameters ​

ParameterTypeDescription
dataWorkerTileResultThe data from the worker
painteranythe painter
justReloaded?booleantrue to just reload

Returns ​

void


unloadVectorData() ​

unloadVectorData(): void

Defined in: src/source/tile.ts:227

Release any data or WebGL resources referenced by this tile.

Returns ​

void