Classes
Type Definitions
-
Options{Object}
-
Properties:
Name Type Argument Default Description url
string URL to the OGC Map Tileset endpoint.
context
Object <optional>
A lookup of values to use in the tile URL template. The
{tileMatrix}
(zoom level),{tileRow}
, and{tileCol}
variables in the URL will always be provided by the source.mediaType
string <optional>
The content type for the tiles (e.g. "image/png"). If not provided, the source will try to find a link with rel="item" that uses a supported image type.
projection
ProjectionLike <optional>
Projection. By default, the projection will be derived from the
crs
of thetileMatrixSet
. You can override this by supplying a projection to the constructor.attributions
AttributionLike <optional>
Attributions.
cacheSize
number <optional>
Tile cache size. The default depends on the screen size. Will be ignored if too small.
crossOrigin
null | string <optional>
The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
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.
reprojectionErrorThreshold
number <optional>
0.5 Maximum allowed reprojection error (in pixels). Higher values can increase reprojection performance, but decrease precision.
tileLoadFunction
LoadFunction <optional>
Optional function to load a tile given a URL. The default is
function(tile, src) { tile.getImage().src = src; };
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
.