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 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.

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 Config <optional>

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

tileLoadFunction LoadFunction <optional>

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

function(imageTile, src) {
  imageTile.getImage().src = src;
};
tileSize number | 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 | NearestDirectionFunction <optional>
0

Choose whether to use tiles with a higher or lower zoom level when between integer zoom levels. See getZForResolution.