Module: ol/source/TileJSON

ol/source/TileJSON


Classes

TileJSON

Type Definitions

Config{Object}

Properties:
Name Type Argument Description
name string <optional>

The name.

description string <optional>

The description.

version string <optional>

The version.

attribution string <optional>

The attribution.

template string <optional>

The template.

legend string <optional>

The legend.

scheme string <optional>

The scheme.

tiles Array.<string>

The tile URL templates.

grids Array.<string> <optional>

Optional grids.

minzoom number <optional>

Minimum zoom level.

maxzoom number <optional>

Maximum zoom level.

bounds Array.<number> <optional>

Optional bounds.

center Array.<number> <optional>

Optional center.

Options{Object}

Properties:
Name Type Argument Default Description
attributions module:ol/source/Source~AttributionLike <optional>

Attributions.

cacheSize number <optional>

Tile cache size. The default depends on the screen size. Will increase if too small.

crossOrigin null | string <optional>

The crossOrigin attribute for loaded images. Note that you must provide a crossOrigin value if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.

jsonp boolean <optional>
false

Use JSONP with callback to load the TileJSON. Useful when the server does not support CORS..

reprojectionErrorThreshold number <optional>
0.5

Maximum allowed reprojection error (in pixels). Higher values can increase reprojection performance, but decrease precision.

tileJSON module:ol/source/TileJSON~Config <optional>

TileJSON configuration for this source. If not provided, url must be configured.

tileLoadFunction module:ol/Tile~LoadFunction <optional>

Optional function to load a tile given a URL. The default is

function(imageTile, src) {
  imageTile.getImage().src = src;
};
tileSize number | module:ol/size~Size <optional>
[256, 256]

The tile size used by the tile service. Note: tileSize and other non-standard TileJSON properties are currently ignored.

url string <optional>

URL to the TileJSON file. If not provided, tileJSON must be configured.

wrapX boolean <optional>
true

Whether to wrap the world horizontally.

transition number <optional>

Duration of the opacity transition for rendering. To disable the opacity transition, pass transition: 0.