# Class: TileJSON

## ol.source.TileJSON

Layer source for tile data in TileJSON format.

#### new ol.source.TileJSON(options) experimental

src/ol/source/tilejsonsource.js, line 33

  Name | Type | Description
  --- | --- | ---
  `options` | TileJSON options.
  Name | Type | Description
  --- | --- | ---
  `crossOrigin` | null | string | undefined | optional crossOrigin setting for image requests.
  `tileLoadFunction` | ol.TileLoadFunctionType | undefined | optional Optional function to load a tile given a URL.
  `url` | string | URL to the TileJSON file.

  ##### Fires:

  - `change` experimental - Triggered when the state of the source changes.

### Extends

- ol.source.TileImage

### Methods

#### dispatchChangeEvent() inherited experimental

src/ol/observable.js, line 41

  Dispatches a `change` event.

  ##### Fires:

  - `change` experimental

#### getState(){ol.source.State} inherited experimental

src/ol/source/source.js, line 142

  ##### Returns:

  State.

#### getTileGrid(){ol.tilegrid.TileGrid} inherited experimental

src/ol/source/tilesource.js, line 167

  ##### Returns:

  Tile grid.

#### getTileLoadFunction(){ol.TileLoadFunctionType} inherited experimental

src/ol/source/tileimagesource.js, line 130

  ##### Returns:

  TileLoadFunction

#### getTileUrlFunction(){ol.TileUrlFunctionType} inherited experimental

src/ol/source/tileimagesource.js, line 139

  ##### Returns:

  TileUrlFunction

#### on(type, listener, opt_this){goog.events.Key} inherited experimental

src/ol/observable.js, line 63

  Listen for a certain type of event.

  Name | Type | Description
  --- | --- | ---
  `type` | string | Array.<string> | The event type or array of event types.
  `listener` | function | The listener function.
  `this` | Object | optional The object to use as `this` in `listener`.

  ##### Returns:

  Unique key for the listener.

#### once(type, listener, opt_this){goog.events.Key} inherited experimental

src/ol/observable.js, line 76

  Listen once for a certain type of event.

  Name | Type | Description
  --- | --- | ---
  `type` | string | Array.<string> | The event type or array of event types.
  `listener` | function | The listener function.
  `this` | Object | optional The object to use as `this` in `listener`.

  ##### Returns:

  Unique key for the listener.

#### setTileLoadFunction(tileLoadFunction) inherited experimental

src/ol/source/tileimagesource.js, line 148

  Name | Type | Description
  --- | --- | ---
  `tileLoadFunction` | ol.TileLoadFunctionType | Tile load function.

#### setTileUrlFunction(tileUrlFunction) inherited experimental

src/ol/source/tileimagesource.js, line 159

  Name | Type | Description
  --- | --- | ---
  `tileUrlFunction` | ol.TileUrlFunctionType | Tile URL function.

#### un(type, listener, opt_this) inherited experimental

src/ol/observable.js, line 88

  Unlisten for a certain type of event.

  Name | Type | Description
  --- | --- | ---
  `type` | string | Array.<string> | The event type or array of event types.
  `listener` | function | The listener function.
  `this` | Object | optional The object to use as `this` in `listener`.

#### unByKey(key) inherited experimental

src/ol/observable.js, line 98

  Removes an event listener using the key returned by `on()` or `once()`.

  Name | Type | Description
  --- | --- | ---
  `key` | goog.events.Key | Key.