# Class: Tile

This documentation is for OpenLayers v10.9.0. The latest is v.

## ol/Tile~Tile

Base class for tiles.

### Subclasses

- DataTile
- ImageTile
- VectorTile

### Extends

- Target

### Methods

#### dispatchEvent(event){boolean | undefined} inherited

events/Target.js, line 85

  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.

  Name | Type | Description
  --- | --- | ---
  `event` | BaseEvent | string | Event object.

  ##### Returns:

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

#### getTileCoord(){TileCoord}

Tile.js, line 155

  Get the tile coordinate for this tile.

  ##### Returns:

  The tile coordinate.

#### load()

Tile.js, line 193

  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.

#### setState(state)

Tile.js, line 174

  Sets the state of this tile. If you write your own `tileLoadFunction` , it is important to set the state correctly to `ERROR` when the tile cannot be loaded. Otherwise the tile cannot be removed from the tile queue and will block other requests.

  Name | Type | Description
  --- | --- | ---
  `state` | ol/TileState | State.