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>

Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.

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.

imageSmoothing boolean <optional>
true

Deprecated. Use the interpolate option instead.

interpolate boolean <optional>
true

Use interpolated values when resampling. By default, linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.

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.

zDirection number | module:ol/array~NearestDirectionFunction <optional>
0

Choose whether to use tiles with a higher or lower zoom level when between integer zoom levels. See module:ol/tilegrid/TileGrid~TileGrid#getZForResolution.